public class DimensionSwapper extends ReaderWrapper
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<CoreMetadata> |
core
Core metadata associated with this dimension swapper.
|
readerCAN_GROUP, CANNOT_GROUP, MUST_GROUP| Constructor and Description |
|---|
DimensionSwapper()
Constructs a DimensionSwapper around a new image reader.
|
DimensionSwapper(IFormatReader r)
Constructs a DimensionSwapper with the given reader.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<CoreMetadata> |
getCoreMetadataList()
Obtains the core metadata values for the current file.
|
java.lang.String |
getDimensionOrder()
Gets a five-character string representing the
dimension order in which planes will be returned.
|
int |
getIndex(int z,
int c,
int t)
Gets the rasterized index corresponding
to the given Z, C and T coordinates (real sizes).
|
int |
getIndex(int z,
int c,
int t,
int moduloZ,
int moduloC,
int moduloT)
Gets the rasterized index corresponding to the given Z, C, T,
moduloZ, moduloC and moduloT coordinates (effective sizes).
|
java.lang.String |
getInputOrder() |
int |
getSizeC()
Gets the size of the C dimension.
|
int |
getSizeT()
Gets the size of the T dimension.
|
int |
getSizeX()
Gets the size of the X dimension.
|
int |
getSizeY()
Gets the size of the Y dimension.
|
int |
getSizeZ()
Gets the size of the Z dimension.
|
int[] |
getZCTCoords(int no)
Gets the Z, C and T coordinates (real sizes) corresponding to the
given rasterized index value.
|
int[] |
getZCTModuloCoords(int index)
Gets the Z, C, T, moduloZ, moduloC and moduloT coordinates
(effective sizes) corresponding to the given rasterized index
value.
|
static DimensionSwapper |
makeDimensionSwapper(IFormatReader r)
Converts the given reader into a DimensionSwapper, wrapping if needed.
|
byte[] |
openBytes(int no)
Obtains the specified image plane from the current file as a byte array.
|
byte[] |
openBytes(int no,
byte[] buf)
Obtains the specified image plane from the current file into a
pre-allocated byte array of
(sizeX * sizeY * bytesPerPixel * RGB channel count).
|
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.
|
byte[] |
openBytes(int no,
int x,
int y,
int w,
int h)
Obtains a sub-image of the specified image plane,
whose upper-left corner is given by (x, y).
|
byte[] |
openThumbBytes(int no)
Obtains a thumbnail for the specified image plane from the current file,
as a byte array.
|
protected int |
reorder(int no) |
void |
setId(java.lang.String id)
Sets the current file name.
|
void |
setOutputOrder(java.lang.String outputOrder)
Sets the output dimension order according to the given string (e.g.,
"XYZCT").
|
void |
swapDimensions(java.lang.String order)
Sets the input dimension order according to the given string (e.g.,
"XYZCT").
|
close, close, coreIndexToSeries, duplicate, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getBitsPerPixel, getCoreIndex, getCurrentFile, getDatasetStructureDescription, getDomains, getEffectiveSizeC, getFormat, getGlobalMetadata, getImageCount, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getModuloC, getModuloT, getModuloZ, getNativeDataType, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getReader, getRequiredDirectories, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesCount, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSuffixes, getSupportedMetadataLevels, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getUsedFiles, getUsedFiles, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, openPlane, reopenFile, seriesToCoreIndex, setCoreIndex, setFlattenedResolutions, setGroupFiles, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, unwrap, unwrap, unwrapprivate java.util.List<CoreMetadata> core
public DimensionSwapper()
public DimensionSwapper(IFormatReader r)
public static DimensionSwapper makeDimensionSwapper(IFormatReader r)
public void swapDimensions(java.lang.String order)
public void setOutputOrder(java.lang.String outputOrder)
public java.lang.String getInputOrder()
public int getSizeX()
IFormatReadergetSizeX in interface IFormatReadergetSizeX in class ReaderWrapperpublic int getSizeY()
IFormatReadergetSizeY in interface IFormatReadergetSizeY in class ReaderWrapperpublic int getSizeZ()
IFormatReadergetSizeZ in interface IFormatReadergetSizeZ in class ReaderWrapperpublic int getSizeC()
IFormatReadergetSizeC in interface IFormatReadergetSizeC in class ReaderWrapperpublic int getSizeT()
IFormatReadergetSizeT in interface IFormatReadergetSizeT in class ReaderWrapperpublic java.lang.String getDimensionOrder()
IFormatReaderIFormatReader.isInterleaved() method will return true.getDimensionOrder in interface IFormatReadergetDimensionOrder in class ReaderWrapperpublic byte[] openBytes(int no)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperFormatExceptionjava.io.IOExceptionIFormatReader.openBytes(int, byte[])public byte[] openBytes(int no,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperFormatExceptionjava.io.IOExceptionpublic byte[] openBytes(int no,
byte[] buf)
throws FormatException,
java.io.IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperno - the plane index within the current series.buf - a pre-allocated buffer.buf 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.public 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 ReaderWrapperno - 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.public byte[] openThumbBytes(int no)
throws FormatException,
java.io.IOException
IFormatReaderopenThumbBytes in interface IFormatReaderopenThumbBytes in class ReaderWrapperFormatExceptionjava.io.IOExceptionpublic int[] getZCTCoords(int no)
IFormatReadergetZCTCoords in interface IFormatReadergetZCTCoords in class ReaderWrapperpublic int[] getZCTModuloCoords(int index)
IFormatReadergetZCTModuloCoords in interface IFormatReadergetZCTModuloCoords in class ReaderWrapperpublic int getIndex(int z,
int c,
int t)
IFormatReadergetIndex in interface IFormatReadergetIndex in class ReaderWrapperpublic int getIndex(int z,
int c,
int t,
int moduloZ,
int moduloC,
int moduloT)
IFormatReadergetIndex in interface IFormatReadergetIndex in class ReaderWrapperpublic java.util.List<CoreMetadata> getCoreMetadataList()
IFormatReadergetCoreMetadataList in interface IFormatReadergetCoreMetadataList in class ReaderWrapperpublic void setId(java.lang.String id)
throws FormatException,
java.io.IOException
IFormatHandlersetId in interface IFormatHandlersetId in class ReaderWrapperFormatExceptionjava.io.IOExceptionprotected int reorder(int no)
Copyright © 2021 Open Microscopy Environment