IOFormat IOF_v1.5.2_releaseENABLED_SECTIONS += INTERNAL
Loading...
Searching...
No Matches
Plugins

There are 2 different kinds of plugins:

  • Extractors : for data extraction from a stream or a file
  • Writers : for data encoding into a stream or a file

IOFormat is delivered with a collection of plugins (extractors and/or writers) but external plugins can also be added. All plugins present and compatible will be loaded at start-up.

Extractor plugins

Extractors are designated by a name, by a list of supported formats and by their extensions. The name of the plugin can be used in IOFormat APIs to specifically require its use if many others are available. The format can be used in IOFormat APIs to indicate the encoding of a dataset for reading. In the case where more than one plugin can handle this format, the IOFormat configuration will determine the plugins to apply and their priority.

Here is the list of extractor plugins delivered with IOFormat:

Title Plugin Name Handled Formats Supported Extensions
LDM LdmPlugin LDM ldm, lda
DICOM GdcmPlugin DICOM acr, dcm, dc3, dic, dicom
MRC MrcPlugin MRC mrc, rec, ali
PNG PngPlugin PNG png
TIFF TiffPlugin TIFF, OME-TIFF tiff, tif, tf2, tf8, btf
JPEG TurboJpegPlugin JPEG jpeg, jpg
OpenJPEG OpenJpegPlugin JPEG2000, JPEG2000_CODESTREAM jp2, jpc, j2c, j2k
BMP EasyBmpPlugin BMP bmp
WebP WebPPlugin WEBP webp
GIF GifLibPlugin GIF gif
Amira AmiraMeshPlugin AM am
Digital Micrograph GatanPlugin DM dm3, dm4
CSV CsvPlugin CSV csv
Visilog VisilogPlugin VISILOG_3, VISILOG_4, VISILOG_5, VISILOG_6 im3, im4, im5, im6

LDM Extractor

This extractor is written from native code, without third party libraries.

The input must be a valid LDM header, and it will search the tile data relative to it.

LDM extractor returns a LodImageView which contains 3D ImageView instances.

All metadata from LDM format are supported by the extractor.

Metadata path in tree Comment
DataFilename /LDM/VolumeInformation
U /LDM/VolumeInformation/Size
V /LDM/VolumeInformation/Size
W /LDM/VolumeInformation/Size
DataType /LDM/VolumeInformation
U /LDM/VolumeInformation/TileSize
V /LDM/VolumeInformation/TileSize
W /LDM/VolumeInformation/TileSize
Border /LDM/VolumeInformation
NumSignificantBits /LDM/VolumeInformation
Min /LDM/VolumeInformation
Max /LDM/VolumeInformation
N /LDM/VolumeInformation/Histogram/ItemXXXXX Number of occurences for XXXXXth item (0 to max 65536)
V /LDM/VolumeInformation/Histogram/ItemXXXXX XXXXXth range value (integer or float)

DICOM Extractor

This extractor is based on the GDCM library.

Supported types for input:

  • UNSIGNED_INTEGER
  • SIGNED_INTEGER

Supported color space:

  • MONOCHROME1
  • MONOCHROME2
  • RGB

Dimensions:

  • 2D (images)
  • 3D (sequences)

This extractor returns a readable ImageView with at least two dimensions.

All metadata from DICOM format supported by GDCM library are read by the extractor. Metadata are not identified by their tag value, but the associated name given by specification.

The library used is GDCM 3.0.20 under BSD License

MRC Extractor

Extractor is written from native code, without third party libraries.

It is based on MRC/CCP4 2014 file format and MRC/CCP4 2000 file format specifications.

To this day, the MRC reader supports all elements from the MRC specification. Extended headers are supported for FEI1, FEI2, and IMOD.

The MRC extractor returns a readable ImageView with two or three dimensions.

All metadata supported by the MRC format are handled by the extractor.

Metadata path in tree extension
start /MRC
sampling /MRC
cellSize /MRC
cellAngles /MRC
axisMapping /MRC
min /MRC
max /MRC
mean /MRC
origin /MRC
rms /MRC
spaceGroup /MRC
labels /MRC
extendedHeaderType /MRC
version /MRC
intCount /MRC/imod
realCount /MRC/imod
imodFlags /MRC/imod
idType /MRC/imod
lens /MRC/imod
nd1 /MRC/imod
nd2 /MRC/imod
vd1 /MRC/imod
vd2 /MRC/imod
originalTiltAngles /MRC/imod
currentTiltAngles /MRC/imod
timestamp /MRC/extended/n FEI1/2 (for each frame n)
microscopeType /MRC/extended/n FEI1/2 (for each frame n)
dNumber /MRC/extended/n FEI1/2 (for each frame n)
application /MRC/extended/n FEI1/2 (for each frame n)
applicationVersion /MRC/extended/n FEI1/2 (for each frame n)
highTension /MRC/extended/n/gun FEI1/2 (for each frame n)
dose /MRC/extended/n/gun FEI1/2 (for each frame n)
alphaTilt /MRC/extended/n/stage FEI1/2 (for each frame n)
betaTilt /MRC/extended/n/stage FEI1/2 (for each frame n)
stage /MRC/extended/n/stage FEI1/2 (for each frame n)
tiltAxisAngle /MRC/extended/n/stage FEI1/2 (for each frame n)
dualAxisRotation /MRC/extended/n/stage FEI1/2 (for each frame n)
pixelSize /MRC/extended/n/stage FEI1/2 (for each frame n)
defocus /MRC/extended/n/optics FEI1/2 (for each frame n)
stemDefocus /MRC/extended/n/optics FEI1/2 (for each frame n)
appliedDefocus /MRC/extended/n/optics FEI1/2 (for each frame n)
instrumentMode /MRC/extended/n/optics FEI1/2 (for each frame n)
projectionMode /MRC/extended/n/optics FEI1/2 (for each frame n)
objectiveLensMode /MRC/extended/n/optics FEI1/2 (for each frame n)
highMagnificationMode /MRC/extended/n/optics FEI1/2 (for each frame n)
probeMode /MRC/extended/n/optics FEI1/2 (for each frame n)
eftemOn /MRC/extended/n/optics FEI1/2 (for each frame n)
magnification /MRC/extended/n/optics FEI1/2 (for each frame n)
cameraLength /MRC/extended/n/optics FEI1/2 (for each frame n)
spotIndex /MRC/extended/n/optics FEI1/2 (for each frame n)
illuminatedArea /MRC/extended/n/optics FEI1/2 (for each frame n)
intensity /MRC/extended/n/optics FEI1/2 (for each frame n)
convergenceAngle /MRC/extended/n/optics FEI1/2 (for each frame n)
illuminationMode /MRC/extended/n/optics FEI1/2 (for each frame n)
wideConvergenceAngleRange /MRC/extended/n/optics FEI1/2 (for each frame n)
slitInserted /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
slitWidth /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
accelerationVoltageOffset /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
driftTubeVoltage /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
energyShift /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
shiftOffset /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
shift /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
integrationTime /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
binningWidth /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
binningHeight /MRC/extended/n/eftemImaging FEI1/2 (for each frame n)
cameraName /MRC/extended/n/camera FEI1/2 (for each frame n)
readoutAreaLeft /MRC/extended/n/camera FEI1/2 (for each frame n)
readoutAreaTop /MRC/extended/n/camera FEI1/2 (for each frame n)
readoutAreaRight /MRC/extended/n/camera FEI1/2 (for each frame n)
readoutAreaBottom /MRC/extended/n/camera FEI1/2 (for each frame n)
cetaNoiseReduction /MRC/extended/n/camera FEI1/2 (for each frame n)
cetaFrameSummed /MRC/extended/n/camera FEI1/2 (for each frame n)
directDetectorElectonCounting /MRC/extended/n/camera FEI1/2 (for each frame n)
directDetectorAlignFrames /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved0 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved1 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved2 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved3 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved4 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved5 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved6 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved7 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved8 /MRC/extended/n/camera FEI1/2 (for each frame n)
cameraParamReserved9 /MRC/extended/n/camera FEI1/2 (for each frame n)
phasePlate /MRC/extended/n/camera FEI1/2 (for each frame n)
stemDetectorName /MRC/extended/n/stem FEI1/2 (for each frame n)
gain /MRC/extended/n/stem FEI1/2 (for each frame n)
offset /MRC/extended/n/stem FEI1/2 (for each frame n)
stemParamReserved0 /MRC/extended/n/stem FEI1/2 (for each frame n)
stemParamReserved1 /MRC/extended/n/stem FEI1/2 (for each frame n)
stemParamReserved2 /MRC/extended/n/stem FEI1/2 (for each frame n)
stemParamReserved3 /MRC/extended/n/stem FEI1/2 (for each frame n)
stemParamReserved4 /MRC/extended/n/stem FEI1/2 (for each frame n)
dwellTime /MRC/extended/n/scanSettings FEI1/2 (for each frame n)
frameTime /MRC/extended/n/scanSettings FEI1/2 (for each frame n)
scanSizeLeft /MRC/extended/n/scanSettings FEI1/2 (for each frame n)
scanSizeTop /MRC/extended/n/scanSettings FEI1/2 (for each frame n)
scanSizeRight /MRC/extended/n/scanSettings FEI1/2 (for each frame n)
scanSizeBottom /MRC/extended/n/scanSettings FEI1/2 (for each frame n)
fullScanPov /MRC/extended/n/scanSettings FEI1/2 (for each frame n)
element /MRC/extended/n/edxElementMaps FEI1/2 (for each frame n)
energyIntervalLower /MRC/extended/n/edxElementMaps FEI1/2 (for each frame n)
energyIntervalHigher /MRC/extended/n/edxElementMaps FEI1/2 (for each frame n)
method /MRC/extended/n/edxElementMaps FEI1/2 (for each frame n)
isDoseFraction /MRC/extended/n/doseFractions FEI1/2 (for each frame n)
fractionNumber /MRC/extended/n/doseFractions FEI1/2 (for each frame n)
startFrame /MRC/extended/n/doseFractions FEI1/2 (for each frame n)
endFrame /MRC/extended/n/doseFractions FEI1/2 (for each frame n)
inputStackFilename /MRC/extended/n/reconstruction FEI1/2 (for each frame n)
alphaTiltMin /MRC/extended/n/reconstruction FEI1/2 (for each frame n)
alphaTiltMax /MRC/extended/n/reconstruction FEI1/2 (for each frame n)
diffractionPatternRotation /MRC/extended/n/reconstruction FEI2 (for each frame n)
imageRotation /MRC/extended/n/reconstruction FEI2 (for each frame n)
scanModeEnumeration /MRC/extended/n/reconstruction FEI2 (for each frame n)
acquisitionTimeStamp /MRC/extended/n/reconstruction FEI2 (for each frame n)
detectorCommercialName /MRC/extended/n/reconstruction FEI2 (for each frame n)
startTiltAngle /MRC/extended/n/reconstruction FEI2 (for each frame n)
endTiltAngle /MRC/extended/n/reconstruction FEI2 (for each frame n)
tiltPerImage /MRC/extended/n/reconstruction FEI2 (for each frame n)
tiltSpeed /MRC/extended/n/reconstruction FEI2 (for each frame n)
beamCenterPixel /MRC/extended/n/reconstruction FEI2 (for each frame n)
cfegFlashTimestamp /MRC/extended/n/reconstruction FEI2 (for each frame n)
phasePlatePositionIndex /MRC/extended/n/reconstruction FEI2 (for each frame n)
objectiveApertureName /MRC/extended/n/reconstruction FEI2 (for each frame n)
alphaTilt /MRC/extended/n/stage MRC2000(for each frame n)
betaTilt /MRC/extended/n/stage MRC2000(for each frame n)
stage /MRC/extended/n/stage MRC2000(for each frame n)
tiltAxisAngle /MRC/extended/n/stage MRC2000(for each frame n)
pixelSize /MRC/extended/n/stage MRC2000(for each frame n)
defocus /MRC/extended/n/optics MRC2000(for each frame n)
appliedDefocus /MRC/extended/n/optics MRC2000(for each frame n)
magnification /MRC/extended/n/optics MRC2000(for each frame n)
shift /MRC/extended/n/eftemImaging MRC2000(for each frame n)
integrationTime /MRC/extended/n/eftemImaging MRC2000(for each frame n)
binningWidth /MRC/extended/n/eftemImaging MRC2000(for each frame n)
binningHeight /MRC/extended/n/eftemImaging MRC2000(for each frame n)

PNG Extractor

Extractor based on libPNG library.

Input must support seeking. Sample bit depth under 8 bits is not supported.

Supported Color spaces:

  • Grayscale
  • RGB/Truecolor
  • Indexed/Paletted
  • Grayscale and Alpha
  • RGB/Truecolor and Alpha

The PNG extractor returns a readable 2D ImageView.

Metadata type supported
ICC Profile no
Textual information no
Textual data (tEXt) yes
Compressed textual data (zTXt) yes
International textual data (iTXt) yes
Miscellaneous information no
Additional information (EXIF) no

This reader uses libpng 1.6.39 Open Source license

TIFF Extractor

Extractor based on libTIFF library.

Baseline TIFF images, following the standard specification, are supported.

Some TIFF official extension are supported too:

  • Tiled images
  • Data sample format
  • YCbCr images
  • CMYK images

Only standard metadata are supported, private and proprietary fields cannot be accessed.

Since the TIFF format is an image container, the TIFF extractor returns either:

  • a readable MultiImageView when the file contains more than one frame.
  • a readable ImageView when the file only contains one frame.

Supported TIFF baseline tags:

Metadata name description path tree location
ImageDescription info about image /TIFF
Make scanner manufacturer name /TIFF
Model scanner model name/number /TIFF
Software name & release /TIFF
DateTime creation date and time /TIFF
Artist creator of image /TIFF
HostComputer machine where created /TIFF
Copyright copyright string /TIFF
Orientation image orientation /TIFF

EXIF metadata are also supported, but under the tag "EXIF" instead of "TIFF", you can see more details on these EXIF tags on the reference.

Metadata name Data Type
ExposureTime FLOAT
FNumber FLOAT
ExposureProgram UINT16
SpectralSensitivity UTF8_STRING
ISOSpeedratings UINT16 array
OECF UINT8 array
ExifVersion UTF8_STRING
DateTimeOriginal UTF8_STRING
DateTimeDigitized UTF8_STRING
ComponentsConfiguration UINT8 array
CompressedBitserPixel FLOAT
ShutterSpeedValue FLOAT
ApertureValue FLOAT
Brightnessvalue FLOAT
ExposureBiasValue FLOAT
MaxApertureValue FLOAT
SubjectDistance FLOAT
MeteringMode UINT16
LightSource UINT16
Flash UINT16
FocalLength FLOAT
SubjectArea UINT16 array
MakerNote UINT8 array
UserComment UINT8 array
SubsecTime UTF8_STRING
SubsecTimeOriginal UTF8_STRING
SubsecTimeDigitized UTF8_STRING
FlashpixVersion UTF8_STRING
ColorSpace UINT16
PixelXDimension UINT32
PixelYDimension UINT32
RelatedSoundFile UTF8_STRING
FlashEnergy FLOAT
SpatialFrenquencyResponse UINT8 array
FocalPlaneXResolution FLOAT
FocalPlaneYResolution FLOAT
FocalPlaneResolutionUNIT UINT16
SubjectLocation UINT16 array
ExposureIndex FLOAT
SensingMethod UINT16
FileSource UINT8
SceneType UINT8
CFAPattern UINT8 array
CustomRendered UINT16
ExposureMode UINT16
WhiteBalance UINT16
DigitalZoomRatio FLOAT
FocalLengthIn35mmFilm UINT16
SceneCaptureType UINT16
GainControl FLOAT
Contrast UINT16
Saturation UINT16
Sharpness UINT16
DeviceSettingDescription UINT8 array
SubjectDistanceRange UINT16
ImageUniqueID UTF8_STRING

TIFF custom tags for ThermoFisher:

Metadata name path tree location
FEIMetadataINI /TIFF
FEIMetadataXML /TIFF
EER_ACQUISITION_METADATA /TIFF
EER_ACQUISITION_METADATA /TIFF
EER_FINAL_IMAGE_PROCESSING_METADATA /TIFF
EER_FINAL_IMAGE_METADATA /TIFF
XML_DEFECTS /TIFF
  • Extension tags are not tested yet.
  • EXIF tags are not supported yet.

Due to TIFF format specification, in the case of a multi-frame file, retrieving the total count of frames involves reading the whole TIFF file. Depending on the input data location and the file size, this operation can last a while. The TIFF reader is optimized to only count frames when requested by the user, through the frameCount method in MultiImageView interface. You can directly request any frame without raising error, as long as this frame is present in the file.

This reader uses libTIFF 4.5.0 BSD-like licence

Specific case for format OME-TIFF: OME-TIFF reader (based on TIFF) provides the same metadata than TIFF. But, when a MultiImageView is returned, in some cases, OME-XML data, normally available in ImageDescription field, can be located in an external file. In this case, its content is given in MultiImageView metadata in a specific path OME-TIFF/MetadataFile.

If FEIMetadataXML metadata is present and its content is valid, it is used to determine ImageProperties of the image. The origin and spacing (pixel size) of the image are extracted from the Metadata.BinaryResult section.

JPEG Extractor

Extractor plugin based on libjpeg-turbo library.

  • Input must have seek access.
  • Sample bitDepth other than 8 bits is not supported.

Supported Color spaces for output:

  • JCS_GRAYSCALE
  • JCS_RGB

The JPEG extractor returns a readable ImageView, always with two dimensions.

EXIF metadata are not supported yet.

This reader uses libjpeg-turbo v2.1.4

OpenJPEG extractor

This extractor read JPEG2000 files using the OpenJPEG library.

This extractor needs input to support read and seek.

The ImageView instances returned have the READ capacity only, and are always two dimensional, with an IMAGE type.

No metadata is supported yet by the extractor.

This reader uses OpenJPEG 2.5.0

BMP Extractor

Extractor plugin based on easyBMP library.

Input must have seek access.

Compressed files are not managed. If a BMP file has an alpha channel (i.e. 16/32bits), this channel is ignored.

The BMP extractor returns a readable ImageView, always with 2 dimensions.

This reader uses easybmp v1.0.6

WEBP extractor

This extractor read WEBP files using the WEBP API library.

This extractor needs read and seek support for its input.

The ImageView instances returned have the READ capability only, and are always two dimensional, with an IMAGE type.

EXIF metadadata are not supported yet.

This reader uses Lib Webp 1.2.4

GIF extractor

This plugin decodes GIF images following the GIF89a specification.

It currently has support for 8-bits indexed files only.

This extractor needs read support for its input.

The ImageView instances returned have the READ capability only. If the image holds only one image, it will have a two dimensionnal shape, and its image type will be IMAGE. If it holds more than one image, its image type will be IMAGE_SEQUENCE and its shape will be three dimensional, with the third dimension being the frame index.

This reader uses GifLib 5.2.1

AmiraMesh extractor

This plugin decodes AmiraMesh volumes or images. This extractor is written from native code, without third party libraries. It does not manage meshes or colormaps (1D).

This extractor needs read support for its input.

The ImageView instances returned have the READ capability only. In case of two-dimensional images, the image type will be IMAGE. Otherwise, if three-dimensional, the image type will be VOLUME.

All metadata of the format are extracted and available in ‘/Parameters’ path.

Only 2D and 3D images are handled. ASCII data encoding is not managed, because it is generally used for 1D buffers.

Digital Micrograph extractor

This plugin decodes Digital Micrograph images by Gatan. This extractor is written from native code, without third party libraries.

This extractor needs read and seek support for its input.

This extractor returns a readable MultiImageView containing the multiple frames contained in the DM file. All the frames are 2D ImageView with the IMAGE type.

All metadata from the format are extracted and available in the "GATAN" node.

Files with an endianess that does not match the native one are currently unsupported.

CSV extractor

This plugin extracts data from CSV files. See RFC

This extractor is written from native code, without third party libraries.

This extractor needs read and seek support for its input.

This extractor returns a readable DataFrameView.

Only the following separators are supported: comma ",", semi-colon ";", pipe "|".

Files with only one column must have each line ending with a separator.

Column type is determined by checking each row content of a column. The most appropriate type will be chosen to support all the encountered situations:

  • if at least one row in a column contains a string, the whole column datatype will be UTF8_STRING.
  • if at least one row in a column of integer contains a float, the whole column datatype will be DOUBLE.
  • if all rows of a column contain integers, the whole column datatype will be INTEGER.

Visilog extractor

This plugin allows to extract visilog format files, and also to edit them. This extractor is written from native code, without third party libraries.

This extractor needs READ and SEEK capabilities support for its input. The image is also editable if its input supports the WRITE caability.

This extractor returns an ImageView, with the READ capability, and possibly WRITE too if its input accessor supports the WRITE capability.

Writer plugins

As extractors, writers are designated by a name, by a list of supported formats and their extensions. The name can be used to force IOFormat to write your dataset with this specific plugin. The format will be useful in the case where your plugin can handle many different formats. And of course extension could also be used to determine the output format of your dataset.

Writers can be configured with options, which are specific to each plugin. Without a configuration, default values are applied.

Here is the list of writer plugins delivered with IOFormat:

Title Plugin Name Supported Formats Output extensions
Jpeg JpegPlugin JPEG jpeg, jpg
PNG PngPlugin PNG png
MRC MrcPlugin MRC ali, rec, mrc
RAW RawPlugin RAW raw
TIFF TiffPlugin TIFF tiff, tif
JP2 OpenJpegPlugin JPEG2000 jp2
LDM LdmPlugin LDM ldm, lda
CSV CSVPlugin CSV csv
WEBP WebPPlugin WEBP webp

JPEG Writer

Writer plugin based on libjpeg-turbo library.

Writer accepts following kind of views as inputs:

frame ImageView MultiImageView
2D X not supported
3D Only with a CHANNEL dimension not supported

Three dimensional ImageView instances are only supported if the image type is MULTISPECTRAL_IMAGE, as it defines a planar image.

Following data types are supported: UINT8 and VEC3_UINT.

Image shall contain an image interpretation in properties as follows:

  • GRAYSCALE
  • RGB (without ALPHA)
  • UNKNOWN (default case, datatype will determine color space according to DataType)

Metadata shall be relevant with dataset.

Jpeg writer plugin support following options:

Option name description range of value Default value comment
quality quality of compression [0; 100] 90 impact the construction of the JPEG quantization tables - 100 will give a lossless result

This writer uses libjpeg-turbo v2.0.0

PNG Writer

Writer plugin based on libPNG library.

Writer accepts following kinds of views as input:

frame ImageView MultiImageView
2D X not supported
3D Only with a CHANNEL dimension not supported

Three dimensional ImageView instances are only supported if the image type is MULTISPECTRAL_IMAGE, as it defines a planar image.

Following DataTypes are supported: UINT8, UINT16, VECx_UINT8, VECx_UINT16.

Image shall contain an Image interpretation in properties as follows:

  • GRAYSCALE
  • RGB (with or without ALPHA)
  • UNKNOWN (default case, datatype will determine color space automatically)

Remark:

  • in the case of a 3D ImageView, the image is considered as 'planar', with the last dimension containing the different channels.
  • in the case of a MultiImageView, each frame represents a channel. Of course, the frames must be correctly ordered in the MultiImageView.

PNG writer plugin support following options:

Option name description range of value Default value comment
compressionlevel level of compression [0; 9] 3 The value 0 implies no compression and 9 implies maximal compression

Concerning metadata, only metadata located in "PNG" root node will be stored. Metadata located in PNG sub-tree won't be stored.

This writer uses libpng 1.6.35 Open Source license

MRC Writer

MRC writer has been written from native code, using no third party.

Writer accepts following kinds of views as inputs:

frame ImageView MultiImageView
2D X only with frames of same shape and datatype
3D X not supported

Following DataTypes are supported: INT8, INT16, FLOAT, UINT16.

Concerning metadata, only standard metadata located in "MRC" root node will be stored.

Calibration information (origin, spacing) are stored in Ångström unit. If ImageView calibration unit was different, a conversion will be attempted.

MRC writer plugin does not support any option for now.

RAW Writer

You can choose to store your image content without encoding, which is called RAW format, even if it is not really one. Data are written directly as they are read from memory.

Writer accepts following kinds of views as inputs:

frame ImageView MultiImageView
2D X only with frames of same shape and datatype
3D X only with frames of same shape and datatype
ND X not supported

Any DataTypes and dimensions are accepted.

Tiff Writer

Writer plugin based on libtiff library.

Writer accepts following kinds of views as inputs:

frame ImageView MultiImageView
2D yes yes
3D yes no
4D no no

All data types with the primitive type UNSIGNED_INTEGER, SIGNED_INTEGER, or FLOATING_POINT are supported, with an element count from one to four.

Output stream must support SEEK, READ and WRITE.

Image shall contain an Image interpretation in properties as follows:

  • GRAYSCALE
  • RGB
  • BINARY: When getting a binary image as input, we binarize data and pack them to reduce storage space. FLOATING_POINT binary images are not supported, as they do not support binarization very well.
  • UNKNOWN: in this case we try to guess using the number of channels.

Tiff writer plugin support following options:

  • compression: that enables user to specify what compression algorithm to use for the image's data compression. The currently available compressions schemes are:
    • none: no compression.
    • packbits: classic TIFF compression, mostly legacy.
    • jpeg: using the well known JPEG encoding, that perform better with color images.
    • lzw: a general purpose compression, that takes time to encode, but is fast to decode.
  • bigtiff: a value of 0 indicate that the option is disabled, and another value enables the option. Use the BigTIFF specification for the ouput, solving some problems of classic TIFF, like a limit on file size.

This writer supports metadata writing for baseline TIFF tags, that must be under a "TIFF" tag in the metadata tree.

Tag name Data type Description
ImageDescription UTF8_STRING A string that describes the subject of the image.
Make UTF8_STRING The scanner manufacturer.
Orientation INT16 Orientation of the image
Model UTF8_STRING The scanner model name or number.
Software UTF8_STRING Name and version number of the software package(s) used to create the image.
DateTime UTF8_STRING Date and time of image creation.
Artist UTF8_STRING Person who created the image.
HostComputer UTF8_STRING The computer and/or operating system in use at the time of image creation.
Copyright UTF8_STRING Copyright notice.

EXIF metadata are also supported, simply extracted from the first level metadata node "EXIF". You can see more details on these EXIF tags on the reference.

You can find a listing of the EXIF tags on the TIFF reader section.

The following private tags are supported for FEI metadata handling:

Tag name Tag Data type Description
FEIMetadataINI 34682 UTF8_STRING FEI metadata with sections
FEIMetadataXML 34683 UTF8_STRING FEI metadata as an XML document.

This writer uses libtiff 4.5.0

OpenJPEG Writer

Writer plugin using JPEG2000 compression, based on OpenJPEG library.

View instances accepted as input:

  • 2D ImageView instances
  • 3D ImageView instances with an ImageType of MULTISPECTRAL_IMAGE

DataTypes supported:

  • Unsigned integers, up to 32 bits (8, 16, and 32).
  • Signed integers, up to 32 bits (8, 16, and 32).
  • Vectorial variants of the ones above.

If the input image is an RGB image but does not have the RGB ImageInterpretation, some problems may occur, as OpenJPEG needs to convert to YCbCr internally, and will not do the conversion if the input color space is not specified.

OpenJpeg writer plugin supports following options:

  • tileSize: the tile size to use to split the image data.
  • ratio: specifies the target compression ratio.
  • quality: specifies the target PSNR. the higher it is the higher the quality and the image size is. The special value 0 indicates lossless compression.

Output images are always tiled, even if you do not use the associated option, the default tiling size being 1024. By default the image is compressed using a lossless algorithm.

The ratio and quality options are mutually exclusive, activating one will deactivate the other.

This writer uses OpenJPEG 2.3.1

LDM Writer

Writer plugin for LDM format.

View instances accepted as input:

  • 2D ImageView instances
  • 3D ImageView instances
  • MultiImageView instances containing 2D frames only which can be stacked
  • LodImageView instances (but only the high-resolution image is used)

DataTypes supported:

  • Unsigned and signed integers, up to 32 bits
  • Float
  • Double

According to DataType support, only grayscale images are supported.

LDM writer plugin supports following options:

  • tileSize: the tile size to use to split the image data (a 3-integer-value). Will impact the resolution level count.
  • compressor: the compression mode can be specified by either an empty string for "no compression" mode and "GzipDataCompressor" for the Gzip compression.
  • compressionLevel: integer value to indicate the level of compression (if compressor) is not set to 'no compression'. Default value is 1.
  • histogram: integer value to indicate if histogram must be generated (1) or not (0).

compressionLevel option is only used if compressor option is set to "GzipDataCompressor". histogram option is only available for non-float datasets for now.

Min and Max values in header file are computed from input dataset.

Borders are not supported.

CSV Writer

Writer for the CSV format (see [RFC 4180](rfc4180))

This plugins accepts DataFrameView instances as input. It currently handles the following datatypes for columns:

  • signed and unsigned integers from 8 to 64 bits
  • single and double precision floating-point numbers
  • UTF-8 strings

The first row of the file will list the names of the columns, followed by lines of string representation of data. String columns data are quoted for more robust parsing.

This writer only supports one option for now: delimiter, that enables to change the string used to separate columns values.

WEBP Writer

Writer plugin based on WEBP API library.

Writer accepts following kinds of views as input:

frame ImageView MultiImageView
2D X not supported
3D Only with a CHANNEL dimension not supported

Three dimensional ImageView instances are only supported if the image type is MULTISPECTRAL_IMAGE, as it defines a planar image.

Following DataTypes are supported: UINT8 (Grayscale), VEC2_UINT8 (GRayscale + Alpha), VEC3_UINT8 (RGB or YCbCr) and VEC4_UINT8 (RGBA or YCbCrA).

Image shall contain an Image interpretation in properties as follows:

  • GRAYSCALE (with or without ALPHA)
  • RGB (with or without ALPHA)
  • YCbCr (with or without ALPHA)
  • UNKNOWN (default case, GRAYSCALE will be chosen if DataType is UINT8 or VEC2_UINT8. Otherwise an error is raised)

Remark:

  • in the case of a 3D ImageView, the image is considered as 'planar', with the last dimension containing the different channels.

WEBP writer plugin support following options:

Option name description range of value Default value comment
lossless data lossless boolean true By default, image is compressed without any data loss
quality encoding quality [0, 100] 60.0 0 is the fastest but gives larger files compared to the slowest, but best value 100
method encoding method [0, 6] 3 quality/speed trade-off (0=fast, 6=slower-better)
alpha_compression alpha compression activation boolean true Algorithm for encoding the alpha plane (false = none, true = compressed with WebP lossless)
alpha_quality alpha encoding quality [0, 100] 100 Between 0 (smallest size) and 100 (lossless).

Metadata are not written for now.

This writer uses Lib Webp 1.2.4