MeVisLab Toolbox Reference
ml::XYLibHeader Class Reference

Header information loader for files supported by xylib. More...

#include <XYLibHeader.h>

Public Member Functions

 XYLibHeader ()
 Constructor. More...
 
void clear ()
 Clears the file name and the data buffer to the construction state. More...
 
const std::string & getFileName () const
 Get the file name of the currently loaded header. More...
 
const std::string & getFormatName () const
 Get the name of the file format of the currently loaded header. More...
 
MLErrorCode loadHeader (const std::string &fileName)
 Loads the header from file and returns ML_RESULT_OK on success, otherwise an error code describing the problem. More...
 
ImageVector getImageExtent (double &minVal, double &maxVal) const
 Returns the extent of the (sub)image, (0,0,0,0,0,0) if cleaned, not loaded files, on errors, or if header contents are ambiguous and right version cannot be verified with file size. More...
 
Vector3 getVoxelSize () const
 Returns the voxel size of the image in mm, (1,1,1) if cleaned, not loaded, or on error. More...
 
MLDataType getDataType () const
 Get the data type of the image as ML data type, ML_INVALID_DATA_TYPE if cleaned, not loaded, or on error. More...
 
std::string getDataTypeAsString () const
 Get the data type of the image as descriptive string, "INVALID_DATA_TYPE" if cleaned, not loaded, or on error. More...
 
std::string getMetaDataDump () const
 Get the meta data of the file as string dump. More...
 
MLErrorCode fillSubImage (SubImage &dstSubImage)
 Copy overlapping regions in dstSubImage with image data from the loaded file; note that the calculation of the overlapping region depends on whether a PagedImage was set with setReferenceForFillingInReferenceCoordinates or not. More...
 

Detailed Description

Header information loader for files supported by xylib.

Definition at line 27 of file XYLibHeader.h.

Constructor & Destructor Documentation

◆ XYLibHeader()

ml::XYLibHeader::XYLibHeader ( )

Constructor.

Member Function Documentation

◆ clear()

void ml::XYLibHeader::clear ( )

Clears the file name and the data buffer to the construction state.

◆ fillSubImage()

MLErrorCode ml::XYLibHeader::fillSubImage ( SubImage dstSubImage)

Copy overlapping regions in dstSubImage with image data from the loaded file; note that the calculation of the overlapping region depends on whether a PagedImage was set with setReferenceForFillingInReferenceCoordinates or not.

Loaders which do not support filling in reference coordinates (which return false on supportsFillingInReferenceCoordinates()) will silently ignore the reference image.

Parameters
dstSubImageThe subimage to be filled with data from the loaded file where the image regions overlap. Non overlapping regions are left unchanged.
Returns
ML_RESULT_OK on success or an error or a descriptive code explaining the error. On error free operation and empty overlapping region also ML_RESULT_OK is returned.

◆ getDataType()

MLDataType ml::XYLibHeader::getDataType ( ) const

Get the data type of the image as ML data type, ML_INVALID_DATA_TYPE if cleaned, not loaded, or on error.

◆ getDataTypeAsString()

std::string ml::XYLibHeader::getDataTypeAsString ( ) const

Get the data type of the image as descriptive string, "INVALID_DATA_TYPE" if cleaned, not loaded, or on error.

◆ getFileName()

const std::string& ml::XYLibHeader::getFileName ( ) const

Get the file name of the currently loaded header.

◆ getFormatName()

const std::string& ml::XYLibHeader::getFormatName ( ) const

Get the name of the file format of the currently loaded header.

◆ getImageExtent()

ImageVector ml::XYLibHeader::getImageExtent ( double &  minVal,
double &  maxVal 
) const

Returns the extent of the (sub)image, (0,0,0,0,0,0) if cleaned, not loaded files, on errors, or if header contents are ambiguous and right version cannot be verified with file size.

◆ getMetaDataDump()

std::string ml::XYLibHeader::getMetaDataDump ( ) const

Get the meta data of the file as string dump.

◆ getVoxelSize()

Vector3 ml::XYLibHeader::getVoxelSize ( ) const

Returns the voxel size of the image in mm, (1,1,1) if cleaned, not loaded, or on error.

◆ loadHeader()

MLErrorCode ml::XYLibHeader::loadHeader ( const std::string &  fileName)

Loads the header from file and returns ML_RESULT_OK on success, otherwise an error code describing the problem.


The documentation for this class was generated from the following file: