Package loci.plugins.util
Class ImageProcessorReader
java.lang.Object
loci.formats.ReaderWrapper
loci.plugins.util.ImageProcessorReader
- All Implemented Interfaces:
Closeable,AutoCloseable,ICompressedTileReader,IFormatHandler,IFormatReader,IMetadataConfigurable,IPyramidHandler
A low-level reader for
ImageProcessor objects.
For a higher-level reader that returns ImagePlus objects,
see ImagePlusReader instead.-
Field Summary
Fields inherited from class loci.formats.ReaderWrapper
readerFields inherited from interface loci.formats.IFormatReader
CAN_GROUP, CANNOT_GROUP, MUST_GROUP -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an ImageProcessorReader around a new image reader.Constructs an ImageProcessorReader with the given reader. -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[][]convertTo8Bit(short[][] shortTable) private ij.process.LUTClass<?> Returns the native data type of image planes for this reader, as returned byIFormatReader.openPlane(int, int, int, int, int)orIFormatWriter.savePlane(int, java.lang.Object).static ImageProcessorReaderConverts the given reader into a ImageProcessorReader, wrapping if needed.openPlane(int no, int x, int y, int w, int h) Obtains the specified image plane (or sub-image thereof) in the reader's native data structure.ij.process.ImageProcessor[]openProcessors(int no) Creates an ImageJ image processor object for the image plane at the given position.ij.process.ImageProcessor[]openProcessors(int no, int x, int y, int w, int h) Returns an array of ImageProcessors that represent the given slice.ij.process.ImageProcessor[]openThumbProcessors(int no) Methods inherited from class loci.formats.ReaderWrapper
close, close, coreIndexToSeries, duplicate, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getBitsPerPixel, getCoreIndex, getCoreMetadataList, getCurrentFile, getDatasetStructureDescription, getDimensionOrder, getDomains, getEffectiveSizeC, getFillColor, getFormat, getGlobalMetadata, getImageCount, getIndex, getIndex, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getModuloC, getModuloT, getModuloZ, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getReader, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesCount, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getSuffixes, getSupportedMetadataLevels, getThumbSizeX, getThumbSizeY, getTileCodec, getTileCodecOptions, getTileColumns, getTileRows, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, openBytes, openBytes, openBytes, openBytes, openCompressedBytes, openCompressedBytes, openThumbBytes, reopenFile, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, unwrap, unwrap, unwrap
-
Constructor Details
-
ImageProcessorReader
public ImageProcessorReader()Constructs an ImageProcessorReader around a new image reader. -
ImageProcessorReader
Constructs an ImageProcessorReader with the given reader.
-
-
Method Details
-
makeImageProcessorReader
Converts the given reader into a ImageProcessorReader, wrapping if needed. -
openProcessors
Creates an ImageJ image processor object for the image plane at the given position.- Parameters:
no- Position of image plane.- Throws:
FormatExceptionIOException
-
openThumbProcessors
- Throws:
FormatExceptionIOException
-
openProcessors
public ij.process.ImageProcessor[] openProcessors(int no, int x, int y, int w, int h) throws FormatException, IOException Returns an array of ImageProcessors that represent the given slice. There is one ImageProcessor per RGB channel; i.e., length of returned array == getRGBChannelCount().- Parameters:
no- Position of image plane.- Throws:
FormatExceptionIOException
-
getNativeDataType
Description copied from interface:IFormatHandlerReturns the native data type of image planes for this reader, as returned byIFormatReader.openPlane(int, int, int, int, int)orIFormatWriter.savePlane(int, java.lang.Object). For most readers this type will be a byte array; however, some readers call external APIs that work with other types such asBufferedImage.- Specified by:
getNativeDataTypein interfaceIFormatHandler- Overrides:
getNativeDataTypein classReaderWrapper
-
openPlane
Description copied from interface:IFormatReaderObtains the specified image plane (or sub-image thereof) in the reader's native data structure. For most readers this is a byte array; however, some readers call external APIs that work with other types such asBufferedImage. The openPlane method exists to maintain generality and efficiency while avoiding pollution of the API with AWT-specific logic.- Specified by:
openPlanein interfaceIFormatReader- Overrides:
openPlanein classReaderWrapper- Throws:
FormatExceptionIOException- See Also:
-
createColorModel
- Throws:
FormatExceptionIOException
-
convertTo8Bit
private byte[][] convertTo8Bit(short[][] shortTable)
-