public abstract class AbstractVirtualStack
extends ij.VirtualStack
VirtualStack.
 
 This class is intended to be used in ImageJVirtualStack and PlanarImgToVirtualStack.
| Constructor and Description | 
|---|
| AbstractVirtualStack(int width,
                    int height,
                    int size,
                    int bitDepth) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addSlice(ij.process.ImageProcessor ip) | 
| void | addSlice(String name) | 
| void | addSlice(String sliceLabel,
        ij.process.ImageProcessor ip) | 
| void | addSlice(String sliceLabel,
        ij.process.ImageProcessor ip,
        int n) | 
| void | addSlice(String sliceLabel,
        Object pixels) | 
| void | addUnsignedShortSlice(String sliceLabel,
                     Object pixels) | 
| ij.ImageStack | convertToFloat() | 
| ij.ImageStack | crop(int x,
    int y,
    int z,
    int width,
    int height,
    int depth) | 
| void | deleteLastSlice() | 
| void | deleteSlice(int n) | 
| void | drawSphere(double radius,
          int xc,
          int yc,
          int zc) | 
| ij.ImageStack | duplicate() | 
| int | getBitDepth() | 
| ColorModel | getColorModel() | 
| String | getDirectory() | 
| String | getFileName(int n) | 
| int | getHeight() | 
| Object[] | getImageArray() | 
| Object | getPixels(int n) | 
| protected abstract Object | getPixelsZeroBasedIndex(int index)This method is used internally by  AbstractVirtualStackto implementgetPixels(int). | 
| ij.process.ImageProcessor | getProcessor(int n) | 
| Rectangle | getRoi() | 
| String | getShortSliceLabel(int n) | 
| int | getSize() | 
| String | getSliceLabel(int n) | 
| String[] | getSliceLabels() | 
| protected RandomAccessibleInterval<?> | getSliceZeroBasedIndex(int index)This method is used internally by  AbstractVirtualStackto implementgetVoxels(int, int, int, int, int, int, float[])andsetVoxels(int, int, int, int, int, int, float[]). | 
| float[] | getVoxels(int x0,
         int y0,
         int z0,
         int w,
         int h,
         int d,
         float[] voxels) | 
| float[] | getVoxels(int x0,
         int y0,
         int z0,
         int w,
         int h,
         int d,
         float[] voxels,
         int channel) | 
| int | getWidth() | 
| boolean | isHSB() | 
| boolean | isLab() | 
| boolean | isRGB() | 
| boolean | isVirtual() | 
| protected boolean | isWritable()If this method return's false the methods  setPixels(java.lang.Object, int)andsetVoxels(int, int, int, int, int, int, float[])will have no effect. | 
| int | saveChanges(int n)Currently not implemented | 
| void | setBitDepth(int bitDepth) | 
| void | setColorModel(ColorModel cm) | 
| protected void | setMinAndMax(double min,
            double max) | 
| void | setPixels(Object pixels,
         int n) | 
| protected abstract void | setPixelsZeroBasedIndex(int index,
                       Object pixels)This method is used internally by  AbstractVirtualStackto implementsetPixels(java.lang.Object, int). | 
| void | setProcessor(ij.process.ImageProcessor ip,
            int n) | 
| void | setRoi(Rectangle roi) | 
| void | setSliceLabel(String label,
             int n) | 
| void | setVoxels(int x0,
         int y0,
         int z0,
         int w,
         int h,
         int d,
         float[] voxels) | 
| void | setVoxels(int x0,
         int y0,
         int z0,
         int w,
         int h,
         int d,
         float[] voxels,
         int channel) | 
| int | size() | 
| ij.ImageStack | sortDicom(String[] strings,
         String[] info,
         int maxDigits) | 
| String | toString() | 
| void | trim() | 
| void | update(ij.process.ImageProcessor ip) | 
public AbstractVirtualStack(int width,
                            int height,
                            int size,
                            int bitDepth)
protected void setMinAndMax(double min,
                            double max)
public final Object getPixels(int n)
getPixels in class ij.VirtualStackpublic final void setPixels(Object pixels, int n)
setPixels in class ij.VirtualStackprotected boolean isWritable()
setPixels(java.lang.Object, int) and setVoxels(int, int, int, int, int, int, float[]) will have no effect.protected abstract Object getPixelsZeroBasedIndex(int index)
AbstractVirtualStack to implement getPixels(int).
 
 Returns an array that contains the pixels of the specified XY-plane.
 The type of the array must be byte[], short[], int[] or float[] and must match the type indicated by getBitDepth().
index - Zero based index of the plane. (Warning VirtualStack.getPixels(int) uses one base indices).ImageStack.getBitDepth()protected abstract void setPixelsZeroBasedIndex(int index,
                                                Object pixels)
AbstractVirtualStack to implement setPixels(java.lang.Object, int).
 Set all pixels in the specified XY-plane.
index - Zero based index of the plane. (Warning VirtualStack.getPixels(int) uses one base indices).pixels - Array that contains the pixel data. Array length must equal getWidth() times getHeight().
               Type of the array must be byte[], short[], int[] or float[] and match the type indicated by getBitDepth().protected RandomAccessibleInterval<?> getSliceZeroBasedIndex(int index)
AbstractVirtualStack to implement getVoxels(int, int, int, int, int, int, float[]) and setVoxels(int, int, int, int, int, int, float[]).
 
 Returns a two dimensional RandomAccessibleInterval that provides read and write access to the specified XY-plane.
 The pixel type must be match getBitDepth(). RealType for 8, 16 and 32 bit images, and ARGBType
 fot 32-bit images.
index - Zero based index of the plane. (Warning VirtualStack.getPixels(int) uses one base indices).public ij.process.ImageProcessor getProcessor(int n)
getProcessor in class ij.VirtualStackpublic void addSlice(String name)
addSlice in class ij.VirtualStackpublic void addSlice(String sliceLabel, Object pixels)
addSlice in class ij.VirtualStackpublic void addSlice(String sliceLabel, ij.process.ImageProcessor ip)
addSlice in class ij.VirtualStackpublic void addSlice(String sliceLabel, ij.process.ImageProcessor ip, int n)
addSlice in class ij.VirtualStackpublic void deleteSlice(int n)
deleteSlice in class ij.VirtualStackpublic void deleteLastSlice()
deleteLastSlice in class ij.VirtualStackpublic int saveChanges(int n)
saveChanges in class ij.VirtualStackpublic int getSize()
getSize in class ij.VirtualStackpublic String getSliceLabel(int n)
getSliceLabel in class ij.VirtualStackpublic Object[] getImageArray()
getImageArray in class ij.VirtualStackpublic void setSliceLabel(String label, int n)
setSliceLabel in class ij.VirtualStackpublic boolean isVirtual()
isVirtual in class ij.VirtualStackpublic void trim()
trim in class ij.VirtualStackpublic String getDirectory()
getDirectory in class ij.VirtualStackpublic String getFileName(int n)
getFileName in class ij.VirtualStackpublic void setBitDepth(int bitDepth)
setBitDepth in class ij.VirtualStackpublic int getBitDepth()
getBitDepth in class ij.VirtualStackpublic ij.ImageStack sortDicom(String[] strings, String[] info, int maxDigits)
sortDicom in class ij.VirtualStackpublic void addUnsignedShortSlice(String sliceLabel, Object pixels)
addUnsignedShortSlice in class ij.ImageStackpublic void addSlice(ij.process.ImageProcessor ip)
addSlice in class ij.ImageStackpublic int getWidth()
getWidth in class ij.ImageStackpublic int getHeight()
getHeight in class ij.ImageStackpublic void setRoi(Rectangle roi)
setRoi in class ij.ImageStackpublic Rectangle getRoi()
getRoi in class ij.ImageStackpublic void update(ij.process.ImageProcessor ip)
update in class ij.ImageStackpublic int size()
size in class ij.VirtualStackpublic String[] getSliceLabels()
getSliceLabels in class ij.ImageStackpublic String getShortSliceLabel(int n)
getShortSliceLabel in class ij.ImageStackpublic void setProcessor(ij.process.ImageProcessor ip,
                         int n)
setProcessor in class ij.ImageStackpublic void setColorModel(ColorModel cm)
setColorModel in class ij.ImageStackpublic ColorModel getColorModel()
getColorModel in class ij.ImageStackpublic boolean isRGB()
isRGB in class ij.ImageStackpublic boolean isHSB()
isHSB in class ij.ImageStackpublic boolean isLab()
isLab in class ij.ImageStackpublic String toString()
toString in class ij.ImageStackpublic float[] getVoxels(int x0,
                         int y0,
                         int z0,
                         int w,
                         int h,
                         int d,
                         float[] voxels)
getVoxels in class ij.ImageStackpublic float[] getVoxels(int x0,
                         int y0,
                         int z0,
                         int w,
                         int h,
                         int d,
                         float[] voxels,
                         int channel)
getVoxels in class ij.ImageStackpublic void setVoxels(int x0,
                      int y0,
                      int z0,
                      int w,
                      int h,
                      int d,
                      float[] voxels)
setVoxels in class ij.ImageStackpublic void setVoxels(int x0,
                      int y0,
                      int z0,
                      int w,
                      int h,
                      int d,
                      float[] voxels,
                      int channel)
setVoxels in class ij.ImageStackpublic void drawSphere(double radius,
                       int xc,
                       int yc,
                       int zc)
drawSphere in class ij.ImageStackpublic ij.ImageStack duplicate()
duplicate in class ij.ImageStackpublic ij.ImageStack crop(int x,
                          int y,
                          int z,
                          int width,
                          int height,
                          int depth)
crop in class ij.ImageStackpublic ij.ImageStack convertToFloat()
convertToFloat in class ij.ImageStackCopyright © 2015–2022 ImgLib2. All rights reserved.