Class FakeReader
- All Implemented Interfaces:
Closeable,AutoCloseable,loci.formats.IAxisOrientationReader,loci.formats.ICompressedTileReader,loci.formats.IFormatHandler,loci.formats.IFormatReader,loci.formats.IMetadataConfigurable,loci.formats.IPyramidHandler
Examples:
- showinf 'multi-series&series=11&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake' -series 9
- showinf '8bit-signed&pixelType=int8&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf '8bit-unsigned&pixelType=uint8&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf '16bit-signed&pixelType=int16&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf '16bit-unsigned&pixelType=uint16&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf '32bit-signed&pixelType=int32&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf '32bit-unsigned&pixelType=uint32&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf '32bit-floating&pixelType=float&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf '64bit-floating&pixelType=double&sizeZ=3&sizeC=5&sizeT=7&sizeY=50.fake'
- showinf 'SPW&plates=2&plateRows=3&plateCols=3&fields=8&plateAcqs=5.fake'
- showinf 'SPW&screens=2&plates=1&plateRows=3&plateCols=3&fields=1&plateAcqs=1.fake'
- showinf 'Plate&screens=0&plates=1&plateRows=3&plateCols=3&fields=8&plateAcqs=5.fake'
- showinf 'regions&points=10&ellipses=5&rectangles=10.fake'
- showinf 'pyramid&sizeX=10000&sizeY=10000&resolutions=5&resolutionScale=2.fake' -noflat -resolution 4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Stringstatic final intstatic final intstatic final intstatic final Stringstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class loci.formats.FormatReader
core, coreIndex, datasetDescription, domains, fillColor, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONFields inherited from class loci.formats.FormatHandler
COMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixesFields inherited from interface loci.formats.IFormatReader
CAN_GROUP, CANNOT_GROUP, MUST_GROUP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean fileOnly) short[][]byte[][]loci.formats.Orientation[]loci.formats.ome.OMEXMLMetadataloci.formats.services.OMEXMLServiceintintString[]getSeriesUsedFiles(boolean noPixels) loci.common.RegiongetTileBoundingBox(int no, int x, int y) loci.formats.codec.CodecgetTileCodec(int no) loci.formats.codec.CodecOptionsgetTileCodecOptions(int no, int x, int y) intgetTileColumns(int no) intgetTileRows(int no) protected voidbooleanisSingleFile(String id) booleanisThisType(String name, boolean open) byte[]openBytes(int no, byte[] buf, int x, int y, int w, int h) byte[]openCompressedBytes(int no, byte[] buf, int x, int y) byte[]openCompressedBytes(int no, int x, int y) static int[]readSpecialPixels(byte[] plane) Read byte-encoded metadata from the given plane.static int[]readSpecialPixels(byte[] plane, int pixelType, boolean little) Read byte-encoded metadata from the given plane.static int[]readSpecialPixels(byte[] plane, int pixelType, boolean little, int rgb, boolean interleaved) Read byte-encoded metadata from the given plane.voidMethods inherited from class loci.formats.FormatReader
addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, coreIndexToSeries, fileGroupOption, flattenHashtables, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getAvailableOptions, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentCore, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillColor, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getUsedFiles, getUsedFiles, getZCTCoords, getZCTModuloCoords, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, readPlane, seriesToCoreIndex, setCoreIndex, setFillColor, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, updateMetadataListsMethods inherited from class loci.formats.FormatHandler
checkSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface loci.formats.IFormatHandler
getFormat, getNativeDataType, getSuffixesMethods inherited from interface loci.formats.IMetadataConfigurable
getMetadataOptions, getSupportedMetadataLevels, setMetadataOptions
-
Field Details
-
BOX_SIZE
public static final int BOX_SIZE- See Also:
-
DEFAULT_SIZE_X
public static final int DEFAULT_SIZE_X- See Also:
-
DEFAULT_SIZE_Y
public static final int DEFAULT_SIZE_Y- See Also:
-
DEFAULT_SIZE_Z
public static final int DEFAULT_SIZE_Z- See Also:
-
DEFAULT_SIZE_C
public static final int DEFAULT_SIZE_C- See Also:
-
DEFAULT_SIZE_T
public static final int DEFAULT_SIZE_T- See Also:
-
DEFAULT_PIXEL_TYPE
public static final int DEFAULT_PIXEL_TYPE- See Also:
-
DEFAULT_RGB_CHANNEL_COUNT
public static final int DEFAULT_RGB_CHANNEL_COUNT- See Also:
-
DEFAULT_DIMENSION_ORDER
- See Also:
-
DEFAULT_RGB_DIMENSION_ORDER
- See Also:
-
DEFAULT_RESOLUTION_SCALE
public static final int DEFAULT_RESOLUTION_SCALE- See Also:
-
-
Constructor Details
-
FakeReader
public FakeReader()Constructs a new fake reader.
-
-
Method Details
-
readSpecialPixels
public static int[] readSpecialPixels(byte[] plane) Read byte-encoded metadata from the given plane. -
readSpecialPixels
public static int[] readSpecialPixels(byte[] plane, int pixelType, boolean little) Read byte-encoded metadata from the given plane. -
readSpecialPixels
public static int[] readSpecialPixels(byte[] plane, int pixelType, boolean little, int rgb, boolean interleaved) Read byte-encoded metadata from the given plane.FakeReader encodes the following information in the upper-left section of each plane: series, plane number, Z index, C index, T index. Given an image plane generated by FakeReader (or by anything that follows the same encoding rules), this method decodes the above information and returns it as an array of integers.
Note that the above numbers are encoded as valid pixels, so that the information is still retrievable after conversion to a pixel-oriented image format (this allows to use the class for testing the ImageJ plugin). Among other things, this implies that the maximum encodable values depend on the pixel type.
Note:
In the case of indexed color data, the returned values will be the indices of the actual values in the relevant lookup table (see
get8BitLookupTable()andget16BitLookupTable()).- Parameters:
plane- an image plane as a byte arraypixelType- the pixel type of the image; seeFormatToolslittle- true if the byte order is little-endian, false otherwisergb- the RGB channel countinterleaved- true if the channels are interleaved, false otherwise- Returns:
- an array of integers representing, in order: series; plane number; Z index; C index, T index
-
getTileRows
public int getTileRows(int no) - Specified by:
getTileRowsin interfaceloci.formats.ICompressedTileReader- Overrides:
getTileRowsin classloci.formats.FormatReader
-
getTileColumns
public int getTileColumns(int no) - Specified by:
getTileColumnsin interfaceloci.formats.ICompressedTileReader- Overrides:
getTileColumnsin classloci.formats.FormatReader
-
getTileBoundingBox
public loci.common.Region getTileBoundingBox(int no, int x, int y) - Specified by:
getTileBoundingBoxin interfaceloci.formats.ICompressedTileReader
-
openCompressedBytes
public byte[] openCompressedBytes(int no, int x, int y) throws loci.formats.FormatException, IOException - Specified by:
openCompressedBytesin interfaceloci.formats.ICompressedTileReader- Throws:
loci.formats.FormatExceptionIOException
-
openCompressedBytes
public byte[] openCompressedBytes(int no, byte[] buf, int x, int y) throws loci.formats.FormatException, IOException - Specified by:
openCompressedBytesin interfaceloci.formats.ICompressedTileReader- Throws:
loci.formats.FormatExceptionIOException
-
getTileCodec
public loci.formats.codec.Codec getTileCodec(int no) throws loci.formats.FormatException, IOException - Specified by:
getTileCodecin interfaceloci.formats.ICompressedTileReader- Throws:
loci.formats.FormatExceptionIOException
-
getTileCodecOptions
public loci.formats.codec.CodecOptions getTileCodecOptions(int no, int x, int y) throws loci.formats.FormatException, IOException - Specified by:
getTileCodecOptionsin interfaceloci.formats.ICompressedTileReader- Throws:
loci.formats.FormatExceptionIOException
-
getAxisOrientations
public loci.formats.Orientation[] getAxisOrientations()- Specified by:
getAxisOrientationsin interfaceloci.formats.IAxisOrientationReader
-
get8BitLookupTable
- Specified by:
get8BitLookupTablein interfaceloci.formats.IFormatReader- Overrides:
get8BitLookupTablein classloci.formats.FormatReader- Throws:
loci.formats.FormatExceptionIOException
-
get16BitLookupTable
- Specified by:
get16BitLookupTablein interfaceloci.formats.IFormatReader- Overrides:
get16BitLookupTablein classloci.formats.FormatReader- Throws:
loci.formats.FormatExceptionIOException
-
getOptimalTileWidth
public int getOptimalTileWidth()- Specified by:
getOptimalTileWidthin interfaceloci.formats.IFormatReader- Overrides:
getOptimalTileWidthin classloci.formats.FormatReader
-
getOptimalTileHeight
public int getOptimalTileHeight()- Specified by:
getOptimalTileHeightin interfaceloci.formats.IFormatReader- Overrides:
getOptimalTileHeightin classloci.formats.FormatReader
-
openBytes
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws loci.formats.FormatException, IOException - Specified by:
openBytesin interfaceloci.formats.IFormatReader- Specified by:
openBytesin classloci.formats.FormatReader- Throws:
loci.formats.FormatExceptionIOException
-
isSingleFile
- Specified by:
isSingleFilein interfaceloci.formats.IFormatReader- Overrides:
isSingleFilein classloci.formats.FormatReader- Throws:
loci.formats.FormatExceptionIOException
-
isThisType
- Specified by:
isThisTypein interfaceloci.formats.IFormatReader- Overrides:
isThisTypein classloci.formats.FormatReader
-
getSeriesUsedFiles
- Specified by:
getSeriesUsedFilesin interfaceloci.formats.IFormatReader- Overrides:
getSeriesUsedFilesin classloci.formats.FormatReader
-
close
- Specified by:
closein interfaceloci.formats.IFormatReader- Overrides:
closein classloci.formats.FormatReader- Throws:
IOException
-
getOmeXmlMetadata
public loci.formats.ome.OMEXMLMetadata getOmeXmlMetadata() -
getOmeXmlService
public loci.formats.services.OMEXMLService getOmeXmlService() -
initFile
- Overrides:
initFilein classloci.formats.FormatReader- Throws:
loci.formats.FormatExceptionIOException
-
reopenFile
- Specified by:
reopenFilein interfaceloci.formats.IFormatReader- Overrides:
reopenFilein classloci.formats.FormatReader- Throws:
IOException
-