public class NativeND2Reader extends SubResolutionFormatReader
| Modifier and Type | Class and Description | 
|---|---|
(package private) static class  | 
NativeND2Reader.ChunkMapEntry  | 
| Modifier and Type | Field and Description | 
|---|---|
private ND2Handler | 
backupHandler  | 
private static int | 
BUFFER_SIZE  | 
private java.util.Map<java.lang.String,java.lang.Integer> | 
channelColors  | 
private Codec | 
codec
Codec to use when decompressing pixel data. 
 | 
private int[] | 
colors  | 
private java.util.ArrayList<java.lang.Double> | 
exposureTime  | 
private int | 
fieldIndex  | 
private boolean | 
isJPEG
Whether or not the pixel data is compressed using JPEG 2000. 
 | 
private boolean | 
isLossless
Whether or not the pixel data is losslessly compressed. 
 | 
private int | 
lastChannel  | 
static long | 
ND2_MAGIC_BYTES_1  | 
static long | 
ND2_MAGIC_BYTES_2  | 
private int | 
nXFields  | 
private long[][] | 
offsets
Array of image offsets. 
 | 
private long | 
pfsOffset  | 
private long | 
pfsStateOffset  | 
private int | 
positionCount  | 
private java.util.ArrayList<ome.units.quantity.Length> | 
posX  | 
private java.util.ArrayList<ome.units.quantity.Length> | 
posY  | 
private java.util.ArrayList<ome.units.quantity.Length> | 
posZ  | 
private java.lang.Double | 
refractiveIndex  | 
private boolean | 
split  | 
private java.util.ArrayList<java.lang.String> | 
textChannelNames  | 
private boolean | 
textData  | 
private java.util.ArrayList<java.lang.Double> | 
textEmissionWavelengths  | 
private double | 
trueSizeX  | 
private double | 
trueSizeY  | 
private java.lang.Double | 
trueSizeZ  | 
private java.util.ArrayList<java.lang.Double> | 
tsT  | 
static boolean | 
USE_CHUNKMAP_DEFAULT  | 
static java.lang.String | 
USE_CHUNKMAP_KEY  | 
private java.lang.Boolean | 
useZ  | 
private long | 
xOffset  | 
private long | 
yOffset  | 
private long | 
zOffset  | 
corecoreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSIONCOMPRESSION_SUFFIXES, currentId, format, LOGGER, metadataOptions, suffixesCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description | 
|---|
NativeND2Reader()
Constructs a new ND2 reader. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close(boolean fileOnly)
Closes the currently open file. 
 | 
private void | 
copyPixels(int x,
          int y,
          int w,
          int h,
          int bpp,
          int scanlinePad,
          byte[] pix,
          byte[] buf,
          boolean split)  | 
private Codec | 
createCodec(boolean isJPEG)  | 
short[][] | 
get16BitLookupTable()
Gets the 16-bit color lookup table associated with
 the most recently opened image. 
 | 
byte[][] | 
get8BitLookupTable()
Gets the 8-bit color lookup table associated with
 the most recently opened image. 
 | 
protected java.util.ArrayList<java.lang.String> | 
getAvailableOptions()
Returns the list of available metadata options. 
 | 
private int | 
getScanlinePad()  | 
protected void | 
initFile(java.lang.String id)
Initializes the given file (parsing header information, etc.). 
 | 
boolean | 
isThisType(loci.common.RandomAccessInputStream stream)
Checks if the given stream is a valid stream for this file format. 
 | 
private void | 
iterateIn(loci.common.RandomAccessInputStream in,
         java.lang.Long stop)
Function for iterating through ND2 metaAttributes 
 | 
byte[] | 
openBytes(int no,
         byte[] buf,
         int x,
         int y,
         int w,
         int h)
Obtains a sub-image of the specified image plane
 into a pre-allocated byte array. 
 | 
private void | 
parseText(java.lang.String textString,
         int offsetCount,
         boolean useDimensions)  | 
private void | 
populateMetadataStore(ND2Handler handler)  | 
static java.lang.String | 
sanitizeControl(java.lang.String s)
Remove control and invalid characters from the given string. 
 | 
boolean | 
useChunkMap()  | 
coreIndexToSeries, flattenHashtables, getCoreIndex, getCoreMetadataList, getCurrentCore, getResolution, getResolutionCount, getSeries, getSeriesCount, seriesToCoreIndex, setCoreIndex, setResolution, setSeriesaddGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMeta, addGlobalMetaList, addMeta, addMetaList, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMeta, addSeriesMetaList, close, fileGroupOption, getAcquisitionMode, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getArcType, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getMarker, getMedium, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getRGBChannelCount, getRotationTransform, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, 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, isSingleFile, isThisType, isThisType, isThisType, isThumbnailSeries, isUsedFile, makeFilterMetadata, openBytes, openBytes, openBytes, openPlane, openThumbBytes, readPlane, readPlane, reopenFile, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataStore, setNormalized, setOriginalMetadataPopulated, updateMetadataListscheckSuffix, checkSuffix, getFormat, getMetadataOptions, getNativeDataType, getSuffixes, getSupportedMetadataLevels, setMetadataOptionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormat, getNativeDataType, getSuffixesgetMetadataOptions, getSupportedMetadataLevels, setMetadataOptionspublic static final long ND2_MAGIC_BYTES_1
public static final long ND2_MAGIC_BYTES_2
private static final int BUFFER_SIZE
public static final java.lang.String USE_CHUNKMAP_KEY
public static final boolean USE_CHUNKMAP_DEFAULT
private long[][] offsets
private boolean isJPEG
private Codec codec
private boolean isLossless
private java.util.ArrayList<java.lang.Double> tsT
private int positionCount
private int fieldIndex
private long xOffset
private long yOffset
private long zOffset
private long pfsOffset
private long pfsStateOffset
private java.util.ArrayList<ome.units.quantity.Length> posX
private java.util.ArrayList<ome.units.quantity.Length> posY
private java.util.ArrayList<ome.units.quantity.Length> posZ
private java.util.ArrayList<java.lang.Double> exposureTime
private java.util.Map<java.lang.String,java.lang.Integer> channelColors
private boolean split
private int lastChannel
private int[] colors
private java.lang.Boolean useZ
private int nXFields
private ND2Handler backupHandler
private double trueSizeX
private double trueSizeY
private java.lang.Double trueSizeZ
private java.util.ArrayList<java.lang.String> textChannelNames
private java.util.ArrayList<java.lang.Double> textEmissionWavelengths
private boolean textData
private java.lang.Double refractiveIndex
public boolean useChunkMap()
public boolean isThisType(loci.common.RandomAccessInputStream stream)
                   throws java.io.IOException
IFormatReaderisThisType in interface IFormatReaderisThisType in class FormatReaderstream - A RandomAccessInputStream representing the file to check.
    The first byte in the stream is assumed to be the first byte
    in the file.java.io.IOExceptionpublic byte[][] get8BitLookupTable()
IFormatReaderIFormatReader.isIndexed() returns
 false, then this may return null. Also, if IFormatReader.getPixelType() returns
 anything other than FormatTools.INT8 or FormatTools.UINT8,
 this method will return null.get8BitLookupTable in interface IFormatReaderget8BitLookupTable in class FormatReaderpublic short[][] get16BitLookupTable()
IFormatReaderIFormatReader.isIndexed() returns
 false, then this may return null. Also, if IFormatReader.getPixelType() returns
 anything other than FormatTools.INT16 or FormatTools.UINT16, this method will return null.get16BitLookupTable in interface IFormatReaderget16BitLookupTable in class FormatReaderpublic byte[] openBytes(int no,
                        byte[] buf,
                        int x,
                        int y,
                        int w,
                        int h)
                 throws FormatException,
                        java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class FormatReaderno - the plane index within the current series.buf - a pre-allocated buffer.x - X coordinate of the upper-left corner of the sub-imagey - Y coordinate of the upper-left corner of the sub-imagew - width of the sub-imageh - height of the sub-imagebuf for convenience.FormatException - if there was a problem parsing the metadata of the
   file.java.io.IOException - if there was a problem reading the file.IFormatReader.openBytes(int, byte[], int, int, int, int)public void close(boolean fileOnly)
           throws java.io.IOException
IFormatReaderCloseable.close().close in interface IFormatReaderclose in class SubResolutionFormatReaderjava.io.IOExceptionprotected java.util.ArrayList<java.lang.String> getAvailableOptions()
FormatReadergetAvailableOptions in class FormatReaderprotected void initFile(java.lang.String id)
                 throws FormatException,
                        java.io.IOException
SubResolutionFormatReaderinitFile in class SubResolutionFormatReaderFormatException - if a parsing error occurs processing the file.java.io.IOException - if an I/O error occurs processing the fileprivate void iterateIn(loci.common.RandomAccessInputStream in,
                       java.lang.Long stop)
in - stream of bytes from filestop - position where to stopprivate void populateMetadataStore(ND2Handler handler) throws FormatException
FormatExceptionprivate Codec createCodec(boolean isJPEG)
private void copyPixels(int x,
                        int y,
                        int w,
                        int h,
                        int bpp,
                        int scanlinePad,
                        byte[] pix,
                        byte[] buf,
                        boolean split)
                 throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String sanitizeControl(java.lang.String s)
private int getScanlinePad()
private void parseText(java.lang.String textString,
                       int offsetCount,
                       boolean useDimensions)
Copyright © 2021 Open Microscopy Environment