public class DimensionSwapper extends ReaderWrapper
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 |
|---|---|
int[] |
getChannelDimLengths()
Gets the lengths of each subdimension of C,
in fastest-to-slowest rasterization order.
|
String[] |
getChannelDimTypes()
Gets the name of each subdimension of C,
in fastest-to-slowest rasterization order.
|
CoreMetadata[] |
getCoreMetadata()
Obtains the core metadata values for the current file.
|
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.
|
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 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(String id)
Sets the current file name.
|
void |
setOutputOrder(String outputOrder)
Sets the output dimension order according to the given string (e.g.,
"XYZCT").
|
void |
swapDimensions(String order)
Sets the input dimension order according to the given string (e.g.,
"XYZCT").
|
close, close, copyCoreMetadata, duplicate, fileGroupOption, get16BitLookupTable, get8BitLookupTable, getAdvancedSeriesUsedFiles, getAdvancedUsedFiles, getBitsPerPixel, getCoreIndex, getCurrentFile, getDatasetStructureDescription, getDomains, getEffectiveSizeC, getFormat, getGlobalMetadata, getImageCount, getMetadata, getMetadataOptions, getMetadataStore, getMetadataStoreRoot, getMetadataValue, getNativeDataType, getOptimalTileHeight, getOptimalTileWidth, getPixelType, getPossibleDomains, getReader, getResolution, getResolutionCount, getRGBChannelCount, getSeries, getSeriesCount, getSeriesMetadata, getSeriesMetadataValue, getSeriesUsedFiles, getSeriesUsedFiles, getSuffixes, getSupportedMetadataLevels, getThumbSizeX, getThumbSizeY, getUnderlyingReaders, getUsedFiles, getUsedFiles, hasCompanionFiles, hasFlattenedResolutions, isFalseColor, isGroupFiles, isIndexed, isInterleaved, isInterleaved, isLittleEndian, isMetadataCollected, isMetadataComplete, isMetadataFiltered, isNormalized, isOrderCertain, isOriginalMetadataPopulated, isRGB, isSingleFile, isThisType, isThisType, isThisType, isThisType, isThumbnailSeries, openPlane, setFlattenedResolutions, setGroupFiles, setMetadataCollected, setMetadataFiltered, setMetadataOptions, setMetadataStore, setNormalized, setOriginalMetadataPopulated, setResolution, setSeries, unwrap, unwrap, unwrappublic DimensionSwapper()
public DimensionSwapper(IFormatReader r)
public static DimensionSwapper makeDimensionSwapper(IFormatReader r)
public void swapDimensions(String order)
public void setOutputOrder(String outputOrder)
public 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 int[] getChannelDimLengths()
IFormatReadergetChannelDimLengths in interface IFormatReadergetChannelDimLengths in class ReaderWrapperpublic String[] getChannelDimTypes()
IFormatReaderFormatTools.getChannelDimTypes in interface IFormatReadergetChannelDimTypes in class ReaderWrapperpublic String getDimensionOrder()
IFormatReaderIFormatReader.isInterleaved() method will return true.getDimensionOrder in interface IFormatReadergetDimensionOrder in class ReaderWrapperpublic byte[] openBytes(int no)
throws FormatException,
IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperFormatExceptionIOExceptionIFormatReader.openBytes(int, byte[])public byte[] openBytes(int no,
int x,
int y,
int w,
int h)
throws FormatException,
IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperFormatExceptionIOExceptionpublic byte[] openBytes(int no,
byte[] buf)
throws FormatException,
IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperno - the image index within the file.buf - a pre-allocated buffer.buf for convenience.FormatException - if there was a problem parsing the metadata of the
file.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,
IOException
IFormatReaderopenBytes in interface IFormatReaderopenBytes in class ReaderWrapperno - 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 byte[] openThumbBytes(int no)
throws FormatException,
IOException
IFormatReaderopenThumbBytes in interface IFormatReaderopenThumbBytes in class ReaderWrapperFormatExceptionIOExceptionpublic int[] getZCTCoords(int no)
IFormatReadergetZCTCoords in interface IFormatReadergetZCTCoords in class ReaderWrapperpublic int getIndex(int z,
int c,
int t)
IFormatReadergetIndex in interface IFormatReadergetIndex in class ReaderWrapperpublic CoreMetadata[] getCoreMetadata()
IFormatReadergetCoreMetadata in interface IFormatReadergetCoreMetadata in class ReaderWrapperpublic void setId(String id) throws FormatException, IOException
IFormatHandlersetId in interface IFormatHandlersetId in class ReaderWrapperFormatExceptionIOExceptionprotected int reorder(int no)
Copyright © 2014 Open Microscopy Environment