public class FakeReader extends FormatReader
Examples:
Modifier and Type | Field and Description |
---|---|
private int |
ac
Channel of last opened image plane.
|
private static boolean |
ANN_BOOLEAN_VALUE |
private static String |
ANN_COMMENT_VALUE |
private static Double |
ANN_DOUBLE_VALUE |
private static long |
ANN_LONG_VALUE |
private static String |
ANN_TAG_VALUE |
private static String |
ANN_TERM_VALUE |
private static Timestamp |
ANN_TIME_VALUE |
private static String |
ANN_XML_VALUE_END |
private static String |
ANN_XML_VALUE_START |
private static String |
ANNOTATION_NAMESPACE |
private static String |
ANNOTATION_PREFIX |
static int |
BOX_SIZE |
static String |
DEFAULT_DIMENSION_ORDER |
static int |
DEFAULT_PIXEL_TYPE |
static int |
DEFAULT_RGB_CHANNEL_COUNT |
static int |
DEFAULT_SIZE_C |
static int |
DEFAULT_SIZE_T |
static int |
DEFAULT_SIZE_X |
static int |
DEFAULT_SIZE_Y |
static int |
DEFAULT_SIZE_Z |
private Time |
exposureTime
exposure time per plane info
|
private List<String> |
fakeSeries
List of used files if the fake is a SPW structure
|
private int[][] |
indexToValue
For indexed color, mapping from indices to values and vice versa.
|
private String |
iniFile
Properties companion file which can be associated with this fake file
|
private short[][][] |
lut16
16-bit lookup table, if indexed color, one per channel.
|
private byte[][][] |
lut8
8-bit lookup table, if indexed color, one per channel.
|
private OMEXMLMetadata |
omeXmlMetadata |
private OMEXMLService |
omeXmlService |
private Length |
physicalSizeX |
private Length |
physicalSizeY |
private Length |
physicalSizeZ |
private double |
scaleFactor
Scale factor for gradient, if any.
|
private static long |
SEED |
private static String |
TOKEN_SEPARATOR |
private int[][] |
valueToIndex
For indexed color, mapping from indices to values and vice versa.
|
core, coreIndex, datasetDescription, domains, filterMetadata, flattenedResolutions, group, hasCompanionFiles, in, indexedAsRGB, metadata, metadataOptions, metadataStore, normalizeData, resolution, saveOriginalMetadata, series, suffixNecessary, suffixSufficient, THUMBNAIL_DIMENSION
COMPRESSION_SUFFIXES, currentId, format, LOGGER, suffixes
CAN_GROUP, CANNOT_GROUP, MUST_GROUP
Constructor and Description |
---|
FakeReader()
Constructs a new fake reader.
|
Modifier and Type | Method and Description |
---|---|
void |
close(boolean fileOnly)
Closes the currently open file.
|
private void |
createIndexMap(int num)
Creates a mapping between indices and color values.
|
private String[] |
extractTokensFromFakeSeries(String path) |
private void |
fillExposureTime(MetadataStore store) |
private void |
fillPhysicalSizes(MetadataStore store) |
private void |
findLogFiles() |
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.
|
OMEXMLMetadata |
getOmeXmlMetadata() |
OMEXMLService |
getOmeXmlService() |
String[] |
getSeriesUsedFiles(boolean noPixels)
Returns an array of filenames needed to open the current series.
|
protected void |
initFile(String id)
Initializes the given file (parsing header information, etc.).
|
boolean |
isSingleFile(String id)
Returns true if this is a single-file format.
|
private boolean |
isSPWStructure(String path) |
boolean |
isThisType(String name,
boolean open)
Checks if a file matches the type of this format reader.
|
private List<String> |
listFakeSeries(String traversedDirectory)
Traverses a fake file folder structure indicated by traversedDirectory
|
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 int |
parseColor(String value) |
private Length |
parseLength(String value,
String defaultUnit) |
private int |
populateSPW(MetadataStore store,
int screens,
int plates,
int rows,
int cols,
int fields,
int acqs) |
private static void |
shuffle(int c,
int[] array)
Fisher-Yates shuffle with constant seeds to ensure reproducibility.
|
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, getBinning, getBitsPerPixel, getCompression, getContrastMethod, getCoreIndex, getCoreMetadataList, getCorrection, getCurrentFile, getDatasetStructureDescription, getDetectorType, getDimensionOrder, getDimensionOrder, getDomains, getEffectiveSizeC, getExperimentType, getFilamentType, getFillRule, getFilterType, getFontFamily, getFontStyle, getGlobalMeta, getGlobalMetadata, getIlluminationType, getImageCount, getImmersion, getIndex, getIndex, getLaserMedium, getLaserType, getLineCap, getMarker, getMedium, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getMicrobeamManipulationType, getMicroscopeType, getModuloC, getModuloT, getModuloZ, getNamingConvention, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPixelType, getPossibleDomains, getPulse, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getRotationTransform, getSeries, getSeriesCount, getSeriesMeta, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSizeC, getSizeT, getSizeX, getSizeY, getSizeZ, getSupportedMetadataLevels, 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, reopenFile, seriesToCoreIndex, setCoreIndex, setFlattenedResolutions, setGroupFiles, setId, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries
checkSuffix, checkSuffix, getFormat, getNativeDataType, getSuffixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFormat, getNativeDataType, getSuffixes
private static final long ANN_LONG_VALUE
private static final Double ANN_DOUBLE_VALUE
private static final String ANNOTATION_PREFIX
private static final String ANNOTATION_NAMESPACE
private static final String ANN_TERM_VALUE
private static final String ANN_TAG_VALUE
private static final Timestamp ANN_TIME_VALUE
private static final boolean ANN_BOOLEAN_VALUE
private static final String ANN_COMMENT_VALUE
private static final String ANN_XML_VALUE_START
private static final String ANN_XML_VALUE_END
public static final int BOX_SIZE
public static final int DEFAULT_SIZE_X
public static final int DEFAULT_SIZE_Y
public static final int DEFAULT_SIZE_Z
public static final int DEFAULT_SIZE_C
public static final int DEFAULT_SIZE_T
public static final int DEFAULT_PIXEL_TYPE
public static final int DEFAULT_RGB_CHANNEL_COUNT
public static final String DEFAULT_DIMENSION_ORDER
private static final String TOKEN_SEPARATOR
private static final long SEED
private Time exposureTime
private Length physicalSizeX
private Length physicalSizeY
private Length physicalSizeZ
private double scaleFactor
private byte[][][] lut8
private short[][][] lut16
private int[][] indexToValue
private int[][] valueToIndex
private int ac
private String iniFile
private OMEXMLMetadata omeXmlMetadata
private OMEXMLService omeXmlService
public byte[][] get8BitLookupTable() throws FormatException, IOException
IFormatReader
IFormatReader.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 IFormatReader
get8BitLookupTable
in class FormatReader
FormatException
IOException
public short[][] get16BitLookupTable() throws FormatException, IOException
IFormatReader
IFormatReader.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 IFormatReader
get16BitLookupTable
in class FormatReader
FormatException
IOException
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class FormatReader
no
- the image index within the file.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.IOException
- if there was a problem reading the file.public boolean isSingleFile(String id) throws FormatException, IOException
IFormatReader
isSingleFile
in interface IFormatReader
isSingleFile
in class FormatReader
FormatException
IOException
public boolean isThisType(String name, boolean open)
FormatReader
FormatReader.isThisType(RandomAccessInputStream)
.isThisType
in interface IFormatReader
isThisType
in class FormatReader
open
- If true, and the file extension is insufficient to determine
the file type, the (existing) file is opened for further analysis.public String[] getSeriesUsedFiles(boolean noPixels)
IFormatReader
getSeriesUsedFiles
in interface IFormatReader
getSeriesUsedFiles
in class FormatReader
private void findLogFiles()
public void close(boolean fileOnly) throws IOException
IFormatReader
Closeable.close()
.close
in interface IFormatReader
close
in class FormatReader
IOException
public OMEXMLMetadata getOmeXmlMetadata()
public OMEXMLService getOmeXmlService()
protected void initFile(String id) throws FormatException, IOException
FormatReader
initFile
in class FormatReader
FormatException
- if a parsing error occurs processing the file.IOException
- if an I/O error occurs processing the fileprivate void fillPhysicalSizes(MetadataStore store)
private void fillExposureTime(MetadataStore store)
private boolean isSPWStructure(String path)
private int populateSPW(MetadataStore store, int screens, int plates, int rows, int cols, int fields, int acqs)
private void createIndexMap(int num)
private List<String> listFakeSeries(String traversedDirectory)
private static void shuffle(int c, int[] array)
private int parseColor(String value)
Copyright © 2016 Open Microscopy Environment