public interface WritableHeader extends ReadableHeader
ORIENTATION_CERTAINTY_HIGH, ORIENTATION_CERTAINTY_LOW, ORIENTATION_CERTAINTY_MID
Modifier and Type | Method and Description |
---|---|
boolean |
canCompress()
Returns true if the format supports compressed data.
|
File |
formatImageFile(File headerFile)
Returns a formatted image file (string) based on a header file (i.e., a header type might have a convention for naming the image file relative to header
file name).
|
int[] |
getSupportedBytesForType(int type)
Returns an array of byte counts that supported for a datatype.
|
String[] |
getSupportedOrientations()
Returns an array of valid data orientations in the format "XYZ+--" where the first character represents the fastest moving dimension and that third
character represents the slowest moving dimension.
|
int[] |
getSupportedTypesForBytes(int bytes)
Returns an array of datatypes that are supported for a number of bytes.
|
boolean |
isSupportedBigEndian()
Returns true if this image format supports writing in big endian byte order.
|
boolean |
isSupportedDataScaleIntercept()
Returns true if this image format supports a data scale intercept.
|
boolean |
isSupportedDataScaleSlope()
Returns true if this image format supports a data scale slope.
|
boolean |
isSupportedLittleEndian()
Returns true if this image format supports writing in little endian byte order.
|
boolean |
isSupportedMultipleDataScales()
Returns true if this image format supports multiple data scale values, such as a data scale per slice or per volume.
|
boolean |
willWriteImage()
If for some reason the application should not attempt to write the image (i.e., the image is not stored as contiguous data), then this method should
return true.
|
byte[] |
writeHeader(ImageDimensions id,
VoxelDimensions vd,
ImageType it,
ImageRange ir,
ImageDescription imdes,
boolean compress,
Coordinate origin,
String orientation,
ImageTransform[] transforms,
File headerFile,
File imageFile,
ByteBuffer[] imageBuffers,
File tempDir)
Writes the header.
|
byte[][] |
writeSeriesHeaders(ImageDimensions id,
VoxelDimensions vd,
ImageType it,
ImageRange ir,
ImageDescription imdes,
boolean compress,
Coordinate origin,
String orientation,
ImageTransform[] transforms,
File headerFile,
File imageFile,
ByteBuffer[] imageBuffers,
File tempDir)
Writes a series of headers.
|
getImage, getImageBuffers, getImageDescription, getImageDimensions, getImageFile, getImageRange, getImageType, getOrientation, getOrientationCertainty, getOrigin, getPreferredFileExtension, getPreviewImage, getSliceAnnotation, getSliceMetadata, getTransforms, getVoxelDimensions, isThisFormat, readHeader, readHeader, toString
getMinimumVersionSupported, getPluginName, getPluginURL, getVersion, hasNewerVersion
boolean canCompress()
File formatImageFile(File headerFile)
headerFile
- the header fileint[] getSupportedBytesForType(int type)
type
- the datatype (see ImageType for possible values)String[] getSupportedOrientations()
int[] getSupportedTypesForBytes(int bytes)
bytes
- the number of bytes (possible values will be 1, 2, or 4)boolean isSupportedBigEndian()
boolean isSupportedDataScaleIntercept()
boolean isSupportedDataScaleSlope()
boolean isSupportedLittleEndian()
boolean isSupportedMultipleDataScales()
boolean willWriteImage()
byte[] writeHeader(ImageDimensions id, VoxelDimensions vd, ImageType it, ImageRange ir, ImageDescription imdes, boolean compress, Coordinate origin, String orientation, ImageTransform[] transforms, File headerFile, File imageFile, ByteBuffer[] imageBuffers, File tempDir) throws Exception
id
- image dimensionsvd
- voxel dimensionsit
- image typeir
- image rangeimdes
- image descriptioncompress
- user selected compression option (if supported, plugin should write gzip compressed header file to disk)origin
- the origin voxel location relative to the native orientation of the dataorientation
- the orientation (e.g., XYZ+--)transforms
- an array of image transforms (image or world) or null if there is noneheaderFile
- the file that this header will be written toimageFile
- image file (if same as header file, data should be returned as byte array)imageBuffers
- the image buffer (contains float data)tempDir
- directory to store temporary files, if necessaryException
- exceptionbyte[][] writeSeriesHeaders(ImageDimensions id, VoxelDimensions vd, ImageType it, ImageRange ir, ImageDescription imdes, boolean compress, Coordinate origin, String orientation, ImageTransform[] transforms, File headerFile, File imageFile, ByteBuffer[] imageBuffers, File tempDir) throws Exception
id
- image dimensionsvd
- voxel dimensionsit
- image typeir
- image rangeimdes
- image descriptioncompress
- user selected compression option (if supported, plugin should write gzip compressed header file to disk)origin
- the origin voxel location relative to the native orientation of the dataorientation
- the orientation (e.g., XYZ+--)transforms
- an array of image transforms (image or world) or null if there is noneheaderFile
- the file that this header will be written toimageFile
- image file (if same as header file, data should be returned as byte array)imageBuffers
- the image buffer (contains float data)tempDir
- directory to store temporary files, if necessaryException
- exception