public class PlanarImgToVirtualStack extends AbstractVirtualStack
PlanarImg to an ImagePlus
without copying data. It is restricted to certain pixel types:
UnsignedByteType, UnsignedShortType, ARGBType and FloatType.| Modifier and Type | Method and Description |
|---|---|
protected Object |
getPixelsZeroBasedIndex(int index)
This method is used internally by
AbstractVirtualStack to implement AbstractVirtualStack.getPixels(int). |
static boolean |
isSupported(ImgPlus<?> imgPlus)
Returns true, if
wrap(ImgPlus) supports the given image. |
protected void |
setPixelsZeroBasedIndex(int index,
Object pixels)
This method is used internally by
AbstractVirtualStack to implement AbstractVirtualStack.setPixels(java.lang.Object, int). |
static ij.ImagePlus |
wrap(ImgPlus<?> imgPlus)
|
static ij.VirtualStack |
wrap(PlanarImg<?,?> img) |
addSlice, addSlice, addSlice, addSlice, addSlice, addUnsignedShortSlice, convertToFloat, crop, deleteLastSlice, deleteSlice, drawSphere, duplicate, getBitDepth, getColorModel, getDirectory, getFileName, getHeight, getImageArray, getPixels, getProcessor, getRoi, getShortSliceLabel, getSize, getSliceLabel, getSliceLabels, getSliceZeroBasedIndex, getVoxels, getVoxels, getWidth, isHSB, isLab, isRGB, isVirtual, isWritable, saveChanges, setBitDepth, setColorModel, setMinAndMax, setPixels, setProcessor, setRoi, setSliceLabel, setVoxels, setVoxels, size, sortDicom, toString, trim, updatepublic static boolean isSupported(ImgPlus<?> imgPlus)
wrap(ImgPlus) supports the given image.public static ij.ImagePlus wrap(ImgPlus<?> imgPlus)
ImgPlus, that is backed by an PlanarImg into and
ImagePlus. The returned ImagePlus uses the same pixel
buffer as the given image. Changes to the ImagePlus are therefore
reflected in the ImgPlus.
The image must be UnsignedByteType, UnsignedShortType,
ARGBType or FloatType. Only up to five dimensions are
support. Axes oder must start with X, Y axes. Channel, Time and Z axes
might follow in arbitrary order. The image title and calibration are
derived from the given image.
Use isSupported(ImgPlus) to check if an ImagePlus is
supported.
isSupported(ImgPlus)public static ij.VirtualStack wrap(PlanarImg<?,?> img)
protected Object getPixelsZeroBasedIndex(int index)
AbstractVirtualStackAbstractVirtualStack to implement AbstractVirtualStack.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 AbstractVirtualStack.getBitDepth().
getPixelsZeroBasedIndex in class AbstractVirtualStackindex - Zero based index of the plane. (Warning VirtualStack.getPixels(int) uses one base indices).ImageStack.getBitDepth()protected void setPixelsZeroBasedIndex(int index,
Object pixels)
AbstractVirtualStackAbstractVirtualStack to implement AbstractVirtualStack.setPixels(java.lang.Object, int).
Set all pixels in the specified XY-plane.
setPixelsZeroBasedIndex in class AbstractVirtualStackindex - 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 AbstractVirtualStack.getWidth() times AbstractVirtualStack.getHeight().
Type of the array must be byte[], short[], int[] or float[] and match the type indicated by AbstractVirtualStack.getBitDepth().Copyright © 2015–2022 ImgLib2. All rights reserved.