public class DimensionSwapper extends ReaderWrapper
reader
CAN_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, unwrap
public 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()
IFormatReader
getSizeX
in interface IFormatReader
getSizeX
in class ReaderWrapper
public int getSizeY()
IFormatReader
getSizeY
in interface IFormatReader
getSizeY
in class ReaderWrapper
public int getSizeZ()
IFormatReader
getSizeZ
in interface IFormatReader
getSizeZ
in class ReaderWrapper
public int getSizeC()
IFormatReader
getSizeC
in interface IFormatReader
getSizeC
in class ReaderWrapper
public int getSizeT()
IFormatReader
getSizeT
in interface IFormatReader
getSizeT
in class ReaderWrapper
public int[] getChannelDimLengths()
IFormatReader
getChannelDimLengths
in interface IFormatReader
getChannelDimLengths
in class ReaderWrapper
public String[] getChannelDimTypes()
IFormatReader
FormatTools
.getChannelDimTypes
in interface IFormatReader
getChannelDimTypes
in class ReaderWrapper
public String getDimensionOrder()
IFormatReader
IFormatReader.isInterleaved()
method will return true.getDimensionOrder
in interface IFormatReader
getDimensionOrder
in class ReaderWrapper
public byte[] openBytes(int no) throws FormatException, IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
FormatException
IOException
IFormatReader.openBytes(int, byte[])
public byte[] openBytes(int no, int x, int y, int w, int h) throws FormatException, IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
FormatException
IOException
public byte[] openBytes(int no, byte[] buf) throws FormatException, IOException
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
no
- 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
IFormatReader
openBytes
in interface IFormatReader
openBytes
in class ReaderWrapper
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 byte[] openThumbBytes(int no) throws FormatException, IOException
IFormatReader
openThumbBytes
in interface IFormatReader
openThumbBytes
in class ReaderWrapper
FormatException
IOException
public int[] getZCTCoords(int no)
IFormatReader
getZCTCoords
in interface IFormatReader
getZCTCoords
in class ReaderWrapper
public int getIndex(int z, int c, int t)
IFormatReader
getIndex
in interface IFormatReader
getIndex
in class ReaderWrapper
public CoreMetadata[] getCoreMetadata()
IFormatReader
getCoreMetadata
in interface IFormatReader
getCoreMetadata
in class ReaderWrapper
public void setId(String id) throws FormatException, IOException
IFormatHandler
setId
in interface IFormatHandler
setId
in class ReaderWrapper
FormatException
IOException
protected int reorder(int no)
Copyright © 2014 Open Microscopy Environment