fast::MetaImageExporter class

Export an Image to disk with the metaimage format (.mhd/.raw)

This exporter writes 2D and 3D images using the MetaImage format which are pairs of .mhd text files and .raw files containing raw pixel data. Supports compression (.zraw) using the zlib library. All meta data in the Image is stored in the .mhd text file.

Input ports

0: Image

Base classes

class FileExporter
Abstract class for file exporters.

Public functions

auto create(std::string filename, bool compress) -> std::shared_ptr<MetaImageExporter>
void enableCompression()
void disableCompression()
void setMetadata(std::string key, std::string value)

Private functions

void execute() virtual

Function documentation

std::shared_ptr<MetaImageExporter> fast::MetaImageExporter::create(std::string filename, bool compress)

Parameters
filename
compress

Enable or disable lossless compression

void fast::MetaImageExporter::enableCompression()

Deprecated

void fast::MetaImageExporter::disableCompression()

Deprecated

void fast::MetaImageExporter::setMetadata(std::string key, std::string value)

Parameters
key
value

Add additional meta data to the mhd file. This can also be added to the input image object.