edu.stanford.rsl.konrad.utils
Class ImageProcessorBuffer

java.lang.Object
  extended by edu.stanford.rsl.konrad.utils.ImageProcessorBuffer

public class ImageProcessorBuffer
extends java.lang.Object

Class to buffer ImageProcessors which were processed in a parallel manner. Can also be used to sort the ImageProcessors efficiently.

Author:
akmaier

Constructor Summary
ImageProcessorBuffer()
          creates a new ImageProcessorBuffer object.
 
Method Summary
 void add(ij.process.ImageProcessor image, int index)
          adds the Image at index i; Previous entry will be overwritten.
 ij.process.ImageProcessor get(int index)
          Returns the ImageProcessor at index index.
 void remove(int index)
          Removes the image at the given index.
 int size()
          returns the number of stored ImageProcessors
 ij.process.ImageProcessor[] toArray()
          Returns a sorted array of the buffered ImageProcessors
 ij.ImagePlus toImagePlus(java.lang.String title)
          Returns a sorted ImagePlus of the buffered ImageProcessors
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageProcessorBuffer

public ImageProcessorBuffer()
creates a new ImageProcessorBuffer object.

Method Detail

add

public void add(ij.process.ImageProcessor image,
                int index)
adds the Image at index i; Previous entry will be overwritten.

Parameters:
image -
index -

get

public ij.process.ImageProcessor get(int index)
Returns the ImageProcessor at index index. Returns null if the index is not found.

Parameters:
index - the index
Returns:
the ImageProcessor

remove

public void remove(int index)
Removes the image at the given index.

Parameters:
index - the index.

toArray

public ij.process.ImageProcessor[] toArray()
Returns a sorted array of the buffered ImageProcessors

Returns:
the array.

toImagePlus

public ij.ImagePlus toImagePlus(java.lang.String title)
Returns a sorted ImagePlus of the buffered ImageProcessors

Returns:
the ImagePlus.

size

public int size()
returns the number of stored ImageProcessors

Returns:
the number