Module io.scif
Package io.scif.img

Interface ImgUtilityService

    • Method Detail

      • makeType

        net.imglib2.type.Type<?> makeType​(int pixelType)
        Converts SCIFIO pixel type to ImgLib2 Type object.
      • getDimLengths

        long[] getDimLengths​(Metadata m,
                             int imageIndex,
                             SCIFIOConfig config)
        Compiles an N-dimensional list of axis lengths from the given Metadata.
      • getConstrainedLengths

        long[] getConstrainedLengths​(Metadata m,
                                     int imageIndex,
                                     SCIFIOConfig config)
        Returns an N-dimensional list of axis lengths from the given Metadata, constrained by the provided SubRegion (if present)
      • isCompressible

        <T extends net.imglib2.type.numeric.RealType<T> & net.imglib2.type.NativeType<T>> boolean isCompressible​(net.imagej.ImgPlus<T> img)
        Currently there are limits as to what types of Images can be saved. All images must ultimately adhere to an, at most, five-dimensional structure using the known axes X, Y, Z, Channel and Time. Unknown axes (U) can potentially be handled by coercing to the Channel axis. For example, X Y Z U C U T would be valid, as would X Y Z U T. But X Y C Z U T would not, as the unknown axis can not be compressed with Channel. This method will return true if the axes of the provided image can be represented with a valid 5D String, and false otherwise.
      • guessDimOrder

        String guessDimOrder​(net.imagej.axis.CalibratedAxis[] axes,
                             long[] dimLengths,
                             long[] newLengths)
        The ImgLib axes structure can contain multiple unknown axes. This method will determine if the provided dimension order, obtained from an ImgLib AxisType array, can be converted to a 5-dimensional sequence compatible with SCIFIO, and returns that sequence if it exists and null otherwise.
        Parameters:
        newLengths - - updated to hold the lengths of the newly ordered axes
      • decodeWord

        double decodeWord​(byte[] plane,
                          int index,
                          int pixelType,
                          boolean little)
        Parameters:
        plane - - byte array from the desired plane
        index - - pixel index into the plane (NOT an array index)
        pixelType - - base pixel type of the plane's data
        little - - endianness of the plane's bytes
        Returns:
        A double value for the specified pixel.
      • makeSCIFIOImgPlus

        <T> SCIFIOImgPlus<T> makeSCIFIOImgPlus​(net.imglib2.img.Img<T> img)
        Convenience method for wrapping an Img as a SCIFIOImgPlus .
        Parameters:
        img - Img to wrap
        Returns:
        SCIFIOImgPlus wrapping the provided Img, or if the provided Img is a SCIFIOImgPlus, casts and returns.