public interface ReadableHeader extends MangoPluginType
Modifier and Type | Field and Description |
---|---|
static int |
ORIENTATION_CERTAINTY_HIGH |
static int |
ORIENTATION_CERTAINTY_LOW |
static int |
ORIENTATION_CERTAINTY_MID |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getImage()
Deprecated.
|
ByteBuffer[] |
getImageBuffers()
Return null to have the application handle reading the image data or return an array of ByteBuffers.
|
ImageDescription |
getImageDescription()
Returns the image description.
|
ImageDimensions |
getImageDimensions()
Returns the image dimensions.
|
URI |
getImageFile()
Returns the image file (could be the same as the header file).
|
ImageRange |
getImageRange()
Returns the image range.
|
ImageType |
getImageType()
Returns the image type.
|
String |
getOrientation()
Returns the orientation (e.g., XYZ+--).
|
int |
getOrientationCertainty()
Returns the orientation certainty (0=Unknown/Default, 1=Incomplete/Suspicious, 2=Complete/Sufficient).
|
Coordinate |
getOrigin()
Returns the origin voxel location relative to the native orientation of the data.
|
String |
getPreferredFileExtension()
Returns the preferred file extension of this format.
|
float[] |
getPreviewImage()
Return null to have the application handle reading the image preview.
|
short[] |
getSliceAnnotation(int slice,
int seriesPoint)
Returns a bitmap of annotation data associated with the specified slice.
|
String |
getSliceMetadata(int slice,
int seriesPoint)
Returns a formatted text representation of the image header associated with the specified slice.
|
ImageTransform[] |
getTransforms()
Returns an array of any transforms stored in the header.
|
VoxelDimensions |
getVoxelDimensions()
Returns the voxel dimensions.
|
boolean |
isThisFormat(File file)
Used to determine if a file is of this format (e.g., read magic number, check file size, check file extension, etc.).
|
void |
readHeader(File file,
File tempDir)
Reads the file.
|
void |
readHeader(URI uri,
File tempDir)
Reads the URI.
|
String |
toString()
Returns a formatted text representation of the image header (such as would be displayed in the 'Image Info' window).
|
getMinimumVersionSupported, getPluginName, getPluginURL, getVersion, hasNewerVersion
static final int ORIENTATION_CERTAINTY_HIGH
static final int ORIENTATION_CERTAINTY_LOW
static final int ORIENTATION_CERTAINTY_MID
@Deprecated ByteBuffer getImage()
ByteBuffer[] getImageBuffers()
ImageDescription getImageDescription()
ImageDimensions getImageDimensions()
URI getImageFile()
ImageRange getImageRange()
ImageType getImageType()
String getOrientation()
int getOrientationCertainty()
Coordinate getOrigin()
String getPreferredFileExtension()
float[] getPreviewImage()
ImageTransform[] getTransforms()
VoxelDimensions getVoxelDimensions()
boolean isThisFormat(File file)
file
- the file to readvoid readHeader(File file, File tempDir) throws InvalidHeaderException, Exception
file
- the file to readtempDir
- directory to store temporary filesInvalidHeaderException
- An exception that should be thrown if the header is invalid or cannot be read successfully.Exception
- Anything else that might have gone wrong.void readHeader(URI uri, File tempDir) throws InvalidHeaderException, Exception
uri
- the file to readtempDir
- directory to store temporary files (only useful for local files)InvalidHeaderException
- An exception that should be thrown if the header is invalid or cannot be read successfully.Exception
- Anything else that might have gone wrong.String toString()
String getSliceMetadata(int slice, int seriesPoint)
slice
- the slice numberseriesPoint
- the series pointshort[] getSliceAnnotation(int slice, int seriesPoint)
slice
- the slice numberseriesPoint
- the series point