- java.lang.Object
-
- ij.ImageStack
-
- ij.VirtualStack
-
- Direct Known Subclasses:
AVI_Reader,FileInfoVirtualStack,ListVirtualStack,PlotVirtualStack
public class VirtualStack extends ImageStack
This class represents an array of disk-resident images.
-
-
Field Summary
-
Fields inherited from class ij.ImageStack
cTable
-
-
Constructor Summary
Constructors Constructor Description VirtualStack()Default 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, java.lang.String options)Creates a virtual stack with no backing storage.
See: Help>Examples>JavaScript>Terabyte VirtualStackVirtualStack(int width, int height, java.awt.image.ColorModel cm, java.lang.String path)Creates an empty virtual stack.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSlice(java.lang.String fileName)Adds an image to the end of a virtual stack created using the VirtualStack(w,h,cm,path) constructor.voidaddSlice(java.lang.String sliceLabel, ImageProcessor ip)Does nothing..voidaddSlice(java.lang.String sliceLabel, ImageProcessor ip, int n)Does noting.voidaddSlice(java.lang.String sliceLabel, java.lang.Object pixels)Does nothing.voiddeleteLastSlice()Deletes the last slice in the stack.voiddeleteSlice(int n)Deletes the specified slice, where 1<=n<=nslices.intgetBitDepth()Returns the bit depth (8, 16, 24 or 32), or 0 if the bit depth is not known.java.lang.StringgetDirectory()Returns the path to the directory containing the images.java.lang.StringgetFileName(int n)Returns the file name of the specified slice, where 1<=n<=nslices.java.lang.Object[]getImageArray()Returns null.java.lang.ObjectgetPixels(int n)Returns the pixel array for the specified slice, where 1<=n<=nslices.ImageProcessorgetProcessor(int n)Returns an ImageProcessor for the specified slice, where 1<=n<=nslices.java.util.PropertiesgetProperties()Returns the ImagePlus Properties assoctated with the current slice, or null.intgetSize()java.lang.StringgetSliceLabel(int n)Returns the label of the Nth image.booleanisVirtual()Always return true.voidreduce(int factor)Reduces the number of slices in this stack by a factor.intsaveChanges(int n)Currently not implementedvoidsetBitDepth(int bitDepth)Sets the bit depth (8, 16, 24 or 32).voidsetIndexes(int[] indexes)Sets the table that translates slice numbers of hyperstacks not in default CZT order.voidsetPixels(java.lang.Object pixels, int n)Assigns a pixel array to the specified slice, where 1<=n<=nslices.voidsetSliceLabel(java.lang.String label, int n)Does nothing.intsize()Returns the number of slices in this stack.ImageStacksortDicom(java.lang.String[] strings, java.lang.String[] info, int maxDigits)inttranslate(int n)Translates slice numbers of hyperstacks not in default CZT order.voidtrim()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 Detail
-
VirtualStack
public VirtualStack()
Default constructor.
-
VirtualStack
public VirtualStack(int width, int height)
-
VirtualStack
public VirtualStack(int width, int height, java.awt.image.ColorModel cm, java.lang.String path)Creates an empty virtual stack.- Parameters:
width- image widthheight- image heightcm- ColorModel or nullpath- file path of directory containing the images- See Also:
addSlice(String), OpenAsVirtualStack.js
-
VirtualStack
public VirtualStack(int width, int height, int slices)Creates a virtual stack with no backing storage.
See: Help>Examples>JavaScript>Terabyte VirtualStack
-
VirtualStack
public VirtualStack(int width, int height, int slices, java.lang.String options)Creates a virtual stack with no backing storage.
See: Help>Examples>JavaScript>Terabyte VirtualStack
-
-
Method Detail
-
addSlice
public void addSlice(java.lang.String fileName)
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
public void addSlice(java.lang.String sliceLabel, java.lang.Object pixels)Does nothing.- Overrides:
addSlicein classImageStack
-
addSlice
public void addSlice(java.lang.String sliceLabel, ImageProcessor ip)Does nothing..- Overrides:
addSlicein classImageStack
-
addSlice
public void addSlice(java.lang.String sliceLabel, ImageProcessor ip, int n)Does noting.- Overrides:
addSlicein classImageStack
-
deleteSlice
public void deleteSlice(int n)
Deletes the specified slice, where 1<=n<=nslices.- Overrides:
deleteSlicein classImageStack
-
deleteLastSlice
public void deleteLastSlice()
Deletes the last slice in the stack.- Overrides:
deleteLastSlicein classImageStack
-
getPixels
public java.lang.Object getPixels(int n)
Returns the pixel array for the specified slice, where 1<=n<=nslices.- Overrides:
getPixelsin classImageStack
-
setPixels
public void setPixels(java.lang.Object pixels, int n)Assigns a pixel array to the specified slice, where 1<=n<=nslices.- Overrides:
setPixelsin classImageStack
-
getProcessor
public ImageProcessor getProcessor(int n)
Returns an ImageProcessor for the specified slice, where 1<=n<=nslices. Returns null if the stack is empty.- Overrides:
getProcessorin classImageStack
-
saveChanges
public int saveChanges(int n)
Currently not implemented
-
size
public int size()
Returns the number of slices in this stack.- Overrides:
sizein classImageStack
-
getSize
public int getSize()
- Overrides:
getSizein classImageStack
-
getSliceLabel
public java.lang.String getSliceLabel(int n)
Returns the label of the Nth image.- Overrides:
getSliceLabelin classImageStack
-
getImageArray
public java.lang.Object[] getImageArray()
Returns null.- Overrides:
getImageArrayin classImageStack
-
setSliceLabel
public void setSliceLabel(java.lang.String label, int n)Does nothing.- Overrides:
setSliceLabelin classImageStack
-
isVirtual
public boolean isVirtual()
Always return true.- Overrides:
isVirtualin classImageStack
-
trim
public void trim()
Does nothing.- Overrides:
trimin classImageStack
-
getDirectory
public java.lang.String getDirectory()
Returns the path to the directory containing the images.
-
getFileName
public java.lang.String getFileName(int n)
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:
setBitDepthin classImageStack
-
getBitDepth
public int getBitDepth()
Returns the bit depth (8, 16, 24 or 32), or 0 if the bit depth is not known.- Overrides:
getBitDepthin classImageStack
-
sortDicom
public ImageStack sortDicom(java.lang.String[] strings, java.lang.String[] info, int maxDigits)
-
getProperties
public java.util.Properties 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.
-
-