[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
VolumeExportInfo Class Reference |
Argument object for the function exportVolume(). More...
#include <vigra/multi_impex.hxx>
Public Types | |
typedef ArrayVector< unsigned char > | ICCProfile |
Public Member Functions | |
const ICCProfile & | getICCProfile () const |
const char * | getPixelType () const |
Diff2D | getPosition () const |
VolumeExportInfo & | setCompression (const char *type) |
VolumeExportInfo & | setFileNameBase (const char *name_base) |
VolumeExportInfo & | setFileNameExt (const char *name_ext) |
VolumeExportInfo & | setFileType (const char *) |
VolumeExportInfo & | setICCProfile (const ICCProfile &profile) |
VolumeExportInfo & | setPixelType (const char *) |
VolumeExportInfo & | setPosition (const Diff2D &pos) |
VolumeExportInfo & | setXResolution (float) |
VolumeExportInfo & | setYResolution (float) |
VolumeExportInfo & | setZResolution (float) |
VolumeExportInfo (const char *filename) | |
VolumeExportInfo (const char *name_base, const char *name_ext) | |
Argument object for the function exportVolume().
See exportVolume() for usage example. This object must be used to define the properties of a volume to be written to disk.
#include <vigra/imageinfo.hxx>
Namespace: vigra
typedef ArrayVector<unsigned char> ICCProfile |
ICC profiles (handled as raw data so far). see getICCProfile()/setICCProfile()
VolumeExportInfo | ( | const char * | filename | ) |
Construct VolumeExportInfo object to output volume data as a multi-page tiff.
The filename must refer to a TIFF file (extension '.tif' or '.tiff'). This function is only available when libtiff is installed.
VolumeExportInfo | ( | const char * | name_base, |
const char * | name_ext | ||
) |
Construct VolumeExportInfo object to output volume data as an image stack.
The volume will be stored in a by-slice manner, where the number of slices equals the depth of the volume. The file names will be enumerated like name_base+"000"+name_ext
, name_base+"001"+name_ext
etc. (the actual number of zeros depends on the depth). If the target image type does not support the source voxel type, all slices will be mapped simultaneously to the appropriate target range. The file type will be guessed from the extension unless overridden by setFileType().
Recognized extensions: '.bmp', '.gif', '.jpeg', '.jpg', '.p7', '.png', '.pbm', '.pgm', '.pnm', '.ppm', '.ras', '.tif', '.tiff', '.xv', '.hdr'.
JPEG support requires libjpeg, PNG support requires libpng, and TIFF support requires libtiff.
If name_ext is an empty string, the data is written as a multi-page tiff.
VolumeExportInfo& setFileNameBase | ( | const char * | name_base | ) |
Set volume file name base.
VolumeExportInfo& setFileNameExt | ( | const char * | name_ext | ) |
Set volume file name extension.
The file type will be guessed from the extension unless overridden by setFileType(). Recognized extensions: '.bmp', '.gif', '.jpeg', '.jpg', '.p7', '.png', '.pbm', '.pgm', '.pnm', '.ppm', '.ras', '.tif', '.tiff', '.xv', '.hdr'.
JPEG support requires libjpeg, PNG support requires libpng, and TIFF support requires libtiff.
VolumeExportInfo& setFileType | ( | const char * | ) |
Store volume as given file type.
This will override any type guessed from the file name's extension. Recognized file types:
With the exception of TIFF, VIFF, PNG, and PNM all file types store only 1 byte (gray scale and mapped RGB) or 3 bytes (RGB) per pixel.
PNG can store UInt8 and UInt16 values, and supports 1 and 3 channel images. One additional alpha channel is also supported.
PNM can store 1 and 3 channel images with UInt8, UInt16 and UInt32 values in each channel.
TIFF and VIFF are additionally able to store short and long integers (2 or 4 bytes) and real values (32 bit float and 64 bit double) without conversion. So you will need to use TIFF or VIFF if you need to store images with high accuracy (the appropriate type to write is automatically derived from the image type to be exported). However, many other programs using TIFF (e.g. ImageMagick) have not implemented support for those pixel types. So don't be surprised if the generated TIFF is not readable in some cases. If this happens, export the image as 'unsigned char' or 'RGBValue<unsigned char>' by calling ImageExportInfo::setPixelType().
Support to reading and writing ICC color profiles is provided for TIFF, JPEG, and PNG images.
VolumeExportInfo& setCompression | ( | const char * | type | ) |
Set compression type and quality.
See ImageExportInfo::setCompression() for details.
VolumeExportInfo& setPixelType | ( | const char * | ) |
Set the pixel type of the volume file(s). Possible values are:
const char* getPixelType | ( | ) | const |
Get the pixel type of the images in the volume. Possible values are:
VolumeExportInfo& setXResolution | ( | float | ) |
Set the volume resolution in horizontal direction
VolumeExportInfo& setYResolution | ( | float | ) |
Set the image resolution in vertical direction
VolumeExportInfo& setZResolution | ( | float | ) |
Set the image resolution in depth direction
VolumeExportInfo& setPosition | ( | const Diff2D & | pos | ) |
Set the position of the upper Left corner on a global canvas.
Currently only supported by TIFF and PNG files.
The offset is encoded in the XPosition and YPosition TIFF tags.
pos | position of the upper left corner in pixels (must be >= 0) |
Diff2D getPosition | ( | ) | const |
Get the position of the upper left corner on a global canvas.
const ICCProfile& getICCProfile | ( | ) | const |
Returns a reference to the ICC profile.
VolumeExportInfo& setICCProfile | ( | const ICCProfile & | profile | ) |
Sets the ICC profile. ICC profiles are currently supported by TIFF, PNG and JPEG images. (Otherwise, the profile data is silently ignored.)
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|