java.lang.Object
ij.ImageStack
ij.VirtualStack
- Direct Known Subclasses:
AVI_Reader
,FileInfoVirtualStack
,ListVirtualStack
,PlotVirtualStack
This class represents an array of disk-resident images.
-
Field Summary
Fields inherited from class ij.ImageStack
cTable
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.VirtualStack
(int width, int height) VirtualStack
(int width, int height, int slices) Creates a virtual stack with no backing storage.
See: Help>Examples>JavaScript>Terabyte VirtualStackVirtualStack
(int width, int height, int slices, String options) Creates a virtual stack with no backing storage.
See: Help>Examples>JavaScript>Terabyte VirtualStackVirtualStack
(int width, int height, ColorModel cm, String path) Creates an empty virtual stack. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an image to the end of a virtual stack created using the VirtualStack(w,h,cm,path) constructor.void
addSlice
(String sliceLabel, ImageProcessor ip) Does nothing..void
addSlice
(String sliceLabel, ImageProcessor ip, int n) Does noting.void
Does nothing.void
Deletes the last slice in the stack.void
deleteSlice
(int n) Deletes the specified slice, where 1<=n<=nslices.int
Returns the bit depth (8, 16, 24 or 32), or 0 if the bit depth is not known.Returns the path to the directory containing the images.getFileName
(int n) Returns the file name of the specified slice, where 1<=n<=nslices.Object[]
Returns null.getPixels
(int n) Returns the pixel array for the specified slice, where 1<=n<=nslices.getProcessor
(int n) Returns an ImageProcessor for the specified slice, where 1<=n<=nslices.Returns the ImagePlus Properties assoctated with the current slice, or null.int
getSize()
getSliceLabel
(int n) Returns the label of the Nth image.boolean
Always return true.void
reduce
(int factor) Reduces the number of slices in this stack by a factor.int
saveChanges
(int n) Currently not implementedvoid
setBitDepth
(int bitDepth) Sets the bit depth (8, 16, 24 or 32).void
setIndexes
(int[] indexes) Sets the table that translates slice numbers of hyperstacks not in default CZT order.void
Assigns a pixel array to the specified slice, where 1<=n<=nslices.void
setSliceLabel
(String label, int n) Does nothing.int
size()
Returns the number of slices in this stack.int
translate
(int n) Translates slice numbers of hyperstacks not in default CZT order.void
trim()
Does nothing.Methods inherited from class ij.ImageStack
addSlice, addUnsignedShortSlice, convertToFloat, create, create, crop, drawSphere, duplicate, getColorModel, getHeight, getRoi, getShortSliceLabel, getShortSliceLabel, getSliceLabels, getVoxel, getVoxels, getVoxels, getWidth, isHSB, isHSB32, isLab, isRGB, setColorModel, setOptions, setProcessor, setRoi, setVoxel, setVoxels, setVoxels, toString, update
-
Constructor Details
-
VirtualStack
public VirtualStack()Default constructor. -
VirtualStack
public VirtualStack(int width, int height) -
VirtualStack
Creates an empty virtual stack.- Parameters:
width
- image widthheight
- image heightcm
- ColorModel or nullpath
- file path of directory containing the images- See Also:
-
VirtualStack
public VirtualStack(int width, int height, int slices) Creates a virtual stack with no backing storage.
See: Help>Examples>JavaScript>Terabyte VirtualStack -
VirtualStack
Creates a virtual stack with no backing storage.
See: Help>Examples>JavaScript>Terabyte VirtualStack
-
-
Method Details
-
addSlice
Adds an image to the end of a virtual stack created using the VirtualStack(w,h,cm,path) constructor. The argument can be a full file path (e.g., "C:/Users/wayne/dir1/image.tif") if the 'path' argument in the constructor is "". File names that start with '.' are ignored. -
addSlice
Does nothing.- Overrides:
addSlice
in classImageStack
-
addSlice
Does nothing..- Overrides:
addSlice
in classImageStack
-
addSlice
Does noting.- Overrides:
addSlice
in classImageStack
-
deleteSlice
public void deleteSlice(int n) Deletes the specified slice, where 1<=n<=nslices.- Overrides:
deleteSlice
in classImageStack
-
deleteLastSlice
public void deleteLastSlice()Deletes the last slice in the stack.- Overrides:
deleteLastSlice
in classImageStack
-
getPixels
Returns the pixel array for the specified slice, where 1<=n<=nslices.- Overrides:
getPixels
in classImageStack
-
setPixels
Assigns a pixel array to the specified slice, where 1<=n<=nslices.- Overrides:
setPixels
in classImageStack
-
getProcessor
Returns an ImageProcessor for the specified slice, where 1<=n<=nslices. Returns null if the stack is empty.- Overrides:
getProcessor
in classImageStack
-
saveChanges
public int saveChanges(int n) Currently not implemented -
size
public int size()Returns the number of slices in this stack.- Overrides:
size
in classImageStack
-
getSize
public int getSize()- Overrides:
getSize
in classImageStack
-
getSliceLabel
Returns the label of the Nth image.- Overrides:
getSliceLabel
in classImageStack
-
getImageArray
Returns null.- Overrides:
getImageArray
in classImageStack
-
setSliceLabel
Does nothing.- Overrides:
setSliceLabel
in classImageStack
-
isVirtual
public boolean isVirtual()Always return true.- Overrides:
isVirtual
in classImageStack
-
trim
public void trim()Does nothing.- Overrides:
trim
in classImageStack
-
getDirectory
Returns the path to the directory containing the images. -
getFileName
Returns the file name of the specified slice, where 1<=n<=nslices. -
setBitDepth
public void setBitDepth(int bitDepth) Sets the bit depth (8, 16, 24 or 32).- Overrides:
setBitDepth
in classImageStack
-
getBitDepth
public int getBitDepth()Returns the bit depth (8, 16, 24 or 32), or 0 if the bit depth is not known.- Overrides:
getBitDepth
in classImageStack
-
sortDicom
-
getProperties
Returns the ImagePlus Properties assoctated with the current slice, or null. -
setIndexes
public void setIndexes(int[] indexes) Sets the table that translates slice numbers of hyperstacks not in default CZT order. -
translate
public int translate(int n) Translates slice numbers of hyperstacks not in default CZT order. -
reduce
public void reduce(int factor) Reduces the number of slices in this stack by a factor.
-