DefaultImageS¶
-
public class
DefaultImageS
implements ImageS¶ The default implementation of the ImageS interface. The default implementation currently wraps ImageJ1’s ImageStack class. See https://imagej.nih.gov/ij/developer/api/ij/ImagePlus.html for more information.
Author: Kyle M. Douglass
Constructors¶
Methods¶
addImage¶
-
public void
addImage
(short[][] image)¶ Adds a 2D array of shorts to the dataset.
Parameters: - image – A 2D array of shorts.
addImage¶
-
public void
addImage
(int[][] image)¶ Converts a 2D array of ints to 16-bit shorts and adds it to the dataset.
Parameters: - image – A 2D array of ints indexed by xy.
Throws:
addImage¶
-
public void
addImage
(float[][] image)¶ Converts a 2D array of floats to 16-bit shorts and adds it to the dataset.
Parameters: - image – A 2D array of floats indexed by xy.
Throws:
concatenate¶
getHeight¶
-
public int
getHeight
()¶ Returns the height of the images in the dataset.
Returns: The height of the images in the dataset.
getPixelData¶
-
public short[]
getPixelData
(int index)¶ Returns the pixel data at the given index as a 1D array.
Parameters: - index – The index of the corresponding slice.
Returns: The pixel data at the provided index.
getSize¶
-
public int
getSize
()¶ Returns the number of images in the dataset.
Returns: The number of images in the dataset.
getSlice¶
-
public int
getSlice
()¶ Gets the active slice of the dataset (0-indexed). This is the image that will be displayed in the viewer.
Returns: The index of the active slice.
getTitle¶
getWidth¶
-
public int
getWidth
()¶ Returns the width of the images in the dataset.
Returns: The width of the images in the dataset.
serializeToArray¶
-
public byte[]
serializeToArray
()¶ Serializes the image stack to a TIFF-encoded byte array.
Returns: A TIFF-encoded byte array.
serializeToBuffer¶
-
public ByteBuffer
serializeToBuffer
()¶ Returns a buffer containing the dataset in a TIFF-encoded byte array.
Returns: A buffer containing the dataset in a TIFF-encoded byte array.
setSlice¶
-
public void
setSlice
(int index)¶ Sets the active slice of the dataset (0-indexed). This is the image that will be displayed in the viewer.
Parameters: - index – The index of the slice to activate.