MeVisLab Toolbox Reference
ml::MLImageFormatTools Class Reference

Basic tool functions used to store, load, and modify a PagedImage in a file, used by the MLImageFormat. More...

#include <mlImageFormatTools.h>

Public Types

enum  SaveModeBits { DefaultSaveMode = 0 , AllowPartialPages = 1 , SaveOnlyDefaultValue = 2 }
 Mode bits describing special save options. More...
 
typedef void MLImageFormatNotifyCB(double progress, void *usrData)
 Callback type which can be registered in save and overwrite functions to interrupt processing and to get process state information.
 

Static Public Member Functions

static MLuint32 calcCheckSum (const void *dataPtr, size_t numBytes, size_t voxSize)
 Calculates a 24 bit check sum for the data given by dataPtr.
 
static void setDICOMTreeSourceFileName (PagedImage &outImg, const std::string &fileName)
 If the paged image has DicomTreeImagePropertyExtensions then set their file names, because other modules perhaps want to derive destination file names from them as it is done for example in ImageSave.
 
PUBLIC FILE MANAGEMENT.
static MLErrorCode open (MLImageFormatInfos *&infos, const std::string &fileName, bool truncate=false, const std::string &compressorName="", const MLImageFormatTagList &compressionTagList=MLImageFormatTagList::getDefaultEmptyTagList(), const MLImageFormatTagList &userTagList=MLImageFormatTagList::getDefaultEmptyTagList(), const MLImageFormatTagList &privateTagList=MLImageFormatTagList::getDefaultEmptyTagList(), const std::string &defaultVoxelValue="0", bool rewritable=true, bool suppressReadCheckSumTests=false)
 Opens a file in binary mode returning a descriptor for the opened file.
 
static MLErrorCode open (MLImageFormatInfos *&infos, MLImageFormatAbstractFileHandle *fileHandle, bool truncate=false, const std::string &compressorName="", const MLImageFormatTagList &compressionTagList=MLImageFormatTagList::getDefaultEmptyTagList(), const MLImageFormatTagList &userTagList=MLImageFormatTagList::getDefaultEmptyTagList(), const MLImageFormatTagList &privateTagList=MLImageFormatTagList::getDefaultEmptyTagList(), const std::string &defaultVoxelValue="0", bool rewritable=true, bool suppressReadCheckSumTests=false)
 Overload of open() with a virtual file handle, have a look at open(..., filename, ...).
 
static MLErrorCode close (MLImageFormatInfos *&infos)
 Closes an open file.
 
static MLErrorCode save (MLImageFormatInfos &infos, PagedImage &inputPagedImg, const SubImageBox &box=SubImageBox(), MLImageFormatNotifyCB *callback=nullptr, void *userData=nullptr, const ScaleShiftData &scaleShiftData=ScaleShiftData(), MLuint32 saveModeBits=DefaultSaveMode, MLdouble *saveTime=nullptr, MLdouble *prepTime=nullptr)
 Saves the data of the paged image inputPagedImg from the region given by box in the file.
 
static MLErrorCode overwriteHeaderAndPageList (const MLImageFormatInfos &infos, MLuint32 saveModeBits)
 Save the file header information a second time over the already written file.
 
static MLErrorCode overwrite (MLImageFormatInfos &infos, PagedImage &inputPagedImg, const SubImageBox &box, MLImageFormatNotifyCB *callback, void *userData, const ScaleShiftData &scaleShiftData, MLuint32 saveModeBits=DefaultSaveMode, MLdouble *saveTime=nullptr, MLdouble *prepTime=nullptr)
 Overwrites a region in a file which has been written before (with save).
 
static MLErrorCode overwrite (MLImageFormatInfos &infos, const SubImage &inputSubImg, MLImageFormatNotifyCB *callback, void *userData, const ScaleShiftData &scaleShiftData, MLuint32 saveModeBits=DefaultSaveMode, MLdouble *saveTime=nullptr, MLdouble *prepTime=nullptr)
 Overwrites a region in a file which has been written before (with save).
 
static MLErrorCode getTile (const MLImageFormatInfos &infos, SubImage &subImgToFill, bool useFileDataType, bool useFileRegion, const ScaleShiftData &scaleShiftData)
 Loads a subimage from the specified file and returns an MLErrorCode describing success or failure.
 

Static Public Attributes

static const std::string ML_FILE_VERSION_STRING
 Basic file version string used for MeVisLab release 1.5.
 
static const std::string ML_FILE_VERSION_STRING_EXT
 Basic file version string used for MeVisLab release 1.5 plus addOns which endanger backward compatibility to version ML_FILE_VERSION_STRING.
 
static const size_t ML_MAX_VERSION_AND_FIRST_PAIR_SIZE
 Number of characters which will not be exceeded by version string and first tag pair.
 

Static Protected Member Functions

static MLErrorCode _loadFileProperties (MLImageFormatInfos &infos)
 Reads all information from the file given by fileHandle in infos and stores it the returned information object.
 
static MLErrorCode _destroyFileProperties (MLImageFormatInfos *&infos)
 Destroys the MLImageFileInfo object and resets the pointer to NULL.
 
static MLErrorCode _loadPage (const MLImageFormatInfos &infos, MLint pageId, SubImage &pageBuf)
 Read page given by id pageId into memory handled by pageBuf.
 
static MLErrorCode _decompressPageData (const MLImageFormatInfos &infos, const size_t savedPageSizeInBytes, const size_t expectedSizeInBytes, MLuint8 *&loadedPage, bool &isLossy)
 Decompress and replace data given as pointer in loadedPage.
 
static MLErrorCode _saveIndexTableAndPages (MLImageFormatInfos &infos, const SubImageBox &box, PagedImage *inputPagedImg, const SubImage *inputSubImg, MLImageFormatNotifyCB *callback, void *userData, const ScaleShiftData &scaleShiftData, bool replaceAreaToSave, MLuint32 saveModeBits, MLdouble *saveTime=nullptr, MLdouble *prepTime=nullptr)
 Save or overwrite pages overlapping areaToSave of inputPagedImg.
 
static MLErrorCode _savePage (MLImageFormatInfos &infos, const MLint pageId, const bool isOutsideAreaToSave, const MLTypeData *defaultVoxelPtr, const SubImage &subImgToSave, const bool replaceOnlyWrittenPageIds, const MLuint32 saveModeBits, TimeCounter &saveTimer, MLdouble &saveTime, TimeCounter &calcTimer, MLdouble &calcTime)
 Store the page subImgToSave in file given by infos and update the corresponding entry in the index table.
 
static MLErrorCode _compressPageData (DataCompressor *compressor, SubImage &dataSubImg, MLint &dstBufSize)
 Compresses data of a subimage.
 

Friends

class MLImageFormatSaveHandler
 

Detailed Description

Basic tool functions used to store, load, and modify a PagedImage in a file, used by the MLImageFormat.

Definition at line 39 of file mlImageFormatTools.h.

Member Typedef Documentation

◆ MLImageFormatNotifyCB

typedef void ml::MLImageFormatTools::MLImageFormatNotifyCB(double progress, void *usrData)

Callback type which can be registered in save and overwrite functions to interrupt processing and to get process state information.

Definition at line 58 of file mlImageFormatTools.h.

Member Enumeration Documentation

◆ SaveModeBits

Mode bits describing special save options.

Enumerator
DefaultSaveMode 

Normal save, readable by version 000.000.000.

AllowPartialPages 

Allows storage of pages reaching outside image as partial pages pages; cannot be read by version 000.000.000 code any more.

SaveOnlyDefaultValue 

Written pages are only filled with default value and no data is requested from the input image; used for fast creation of empty images.

Not supported for overwriting existing regions.

Definition at line 45 of file mlImageFormatTools.h.

Member Function Documentation

◆ _compressPageData()

static MLErrorCode ml::MLImageFormatTools::_compressPageData ( DataCompressor * compressor,
SubImage & dataSubImg,
MLint & dstBufSize )
staticprotected

Compresses data of a subimage.

Parameters
compressorInstance of MLDataCompressor used for compression of page data if non NULL. If NULL the page data is not compressed.
dataSubImgSubimage containing the data to compress. Its data chunk is (only) overwritten with compressed data on effective and successful compression.
dstBufSizeSize of compressed data or 0 if no compression took place (because it was ineffective or no compressor was available).
Returns
ML_RESULT_OK on success and if data was not compressed. On failure an error describing code is returned.

◆ _decompressPageData()

static MLErrorCode ml::MLImageFormatTools::_decompressPageData ( const MLImageFormatInfos & infos,
const size_t savedPageSizeInBytes,
const size_t expectedSizeInBytes,
MLuint8 *& loadedPage,
bool & isLossy )
staticprotected

Decompress and replace data given as pointer in loadedPage.

Parameters
infosThe information structure about the current working file. Its settings must fit with corresponding settings of inputPagedImg.
savedPageSizeInBytesMust be exactly the size of the compressed memory buffer given in loadedPage.
expectedSizeInBytesThe expected size of the uncompressed memory.
loadedPagemust be a valid pointer to loaded and compressed page data. It will be freed with MLFree() and replaced with decompressed data if decompression takes place. On failure is also could be returned as NULL.
isLossywill be overwritten to false if data was lossless compressed, otherwise true.

◆ _destroyFileProperties()

static MLErrorCode ml::MLImageFormatTools::_destroyFileProperties ( MLImageFormatInfos *& infos)
staticprotected

Destroys the MLImageFileInfo object and resets the pointer to NULL.

Returns ML_RESULT_OK on success or on failure an MLErrorCode describing the problem.

◆ _loadFileProperties()

static MLErrorCode ml::MLImageFormatTools::_loadFileProperties ( MLImageFormatInfos & infos)
staticprotected

Reads all information from the file given by fileHandle in infos and stores it the returned information object.

Parameters
infosinfos must be a valid information structure created by open() on the file to read from.
Returns
ML_RESULT_OK on success or on failure an MLErrorCode describing the problem.

◆ _loadPage()

static MLErrorCode ml::MLImageFormatTools::_loadPage ( const MLImageFormatInfos & infos,
MLint pageId,
SubImage & pageBuf )
staticprotected

Read page given by id pageId into memory handled by pageBuf.

pageBuf must provide enough data for a full loaded page extent. Returns ML_RESULT_OK on success and another MLErrorCode otherwise. Requires that infos is valid, that it describes a file opened for reading and that all passed parameters (index table and tag list) are already read from that open file. It also requires that data type and box of pageBuf are set correctly. Note that the loading process may cause that the page box is modified to match the valid image region.

◆ _saveIndexTableAndPages()

static MLErrorCode ml::MLImageFormatTools::_saveIndexTableAndPages ( MLImageFormatInfos & infos,
const SubImageBox & box,
PagedImage * inputPagedImg,
const SubImage * inputSubImg,
MLImageFormatNotifyCB * callback,
void * userData,
const ScaleShiftData & scaleShiftData,
bool replaceAreaToSave,
MLuint32 saveModeBits,
MLdouble * saveTime = nullptr,
MLdouble * prepTime = nullptr )
staticprotected

Save or overwrite pages overlapping areaToSave of inputPagedImg.

Note that only one of both pointers, inputPagedImg and inputSubImg, may be non NULL to define a unique source for the data to be written. Whichever is used - its data type must fit the setting in info and it must contain the box to be saved if box is non empty.

Parameters
infosThe information structure about the current working file. Its settings must fit with corresponding settings of inputPagedImg.
boxbox describing the pages to be written, pages outside are not stored and marked as pages filled with defaultVoxelValue. Regions outside but inside of pages are filled with defaultVoxelValue. An empty box is considered as full image.
inputPagedImgThe paged image from where page data and/or image properties are taken to be stored. It must be up to date.
inputSubImgThe subimage from which page data and image properties are taken to be stored. It must be up to date.
callbackFunction to be called on different processing and storage to notify and/or break the storage process. May be passed as NULL pointer and is ignored then.
userDataApplication data passed to the callback function or NULL not needed.
scaleShiftDataDefines a linear transformation to be applied on data from inputPagedImg or inputSubImg before saving it on disc. Default is the identical transformation.
replaceAreaToSaveif true then the area to save is overwritten without changes of other file contents outside that region. If false then all pages are overwritten, even if outside the areaToSave. Note that true also may cause that partially written pages are loaded and rewritten with changes. It also may cause a fragmentation of the file if written pages do not fit into their former data gap. Default is false.
saveTimeIgnored if NULL, otherwise it returns the time needed for pure data saving without data preparation such as data reordering or compression.
prepTimeIgnored if NULL, otherwise it returns the time needed for data preparation such as reordering or compression without saving.
saveModeBitsBit combination setting special save options: See SaveModeBits for possible options.
Returns
ML_RESULT_OK on success or on failure an MLErrorCode describing the problem.

◆ _savePage()

static MLErrorCode ml::MLImageFormatTools::_savePage ( MLImageFormatInfos & infos,
const MLint pageId,
const bool isOutsideAreaToSave,
const MLTypeData * defaultVoxelPtr,
const SubImage & subImgToSave,
const bool replaceOnlyWrittenPageIds,
const MLuint32 saveModeBits,
TimeCounter & saveTimer,
MLdouble & saveTime,
TimeCounter & calcTimer,
MLdouble & calcTime )
staticprotected

Store the page subImgToSave in file given by infos and update the corresponding entry in the index table.

Note that pages outside the areaToSave are not stored - only the index table entries are updated. In this case subImgToSave does not need to have a valid data pointer. If saveModeBits allow storing partial pages then subImgToSave will be reduced to

Parameters
infosFile information structure from file open in writable and binary mode.
pageIdid of page to be stored.
isOutsideAreaToSavetrue if page is outside the area to save, false otherwise. If true then only entries of the index table are updated.
defaultVoxelPtrPointer to value used for non stored values outside box and for stored page regions outside box.
subImgToSaveThe page data to be saved. It must be up to date.
replaceOnlyWrittenPageIdsif true then entries of the index table are updated only if isOutsideAreaToSave is false. Otherwise all page ids are updated, even those whose pages are not stored.
saveModeBitsBit combination setting special save options: See SaveModeBits for possible options.
saveTimerTimeCounter used to measure the time needed for pure data saving without data preparation such as data reordering or compression.
saveTimeThe time measured with saveTimer is added to this value.
calcTimerTimeCounter used to measure the time needed for data processing such as compression, reordering and checksums without saving time.
calcTimeThe time measured with calcTimer is added to this value.
Returns
ML_RESULT_OK on success or on failure an MLErrorCode describing the problem.

◆ calcCheckSum()

static MLuint32 ml::MLImageFormatTools::calcCheckSum ( const void * dataPtr,
size_t numBytes,
size_t voxSize )
static

Calculates a 24 bit check sum for the data given by dataPtr.

All values of each byte in the data are multiplied with their byte position and added to the sum. The checkSum calculation traverses voxel data endianess independent; therefore it assumes that the data is in local machine endianess. Thus the calculated sum will be the same on machines with other endianess.

Parameters
dataPtrpoints to the chunk of data to be check-summed.
numBytesis the whole number of bytes to be included in checksum.
voxSizeis the size of a voxel in bytes stored in the data. numBytes must be divisible exactly by voxSize.

◆ close()

static MLErrorCode ml::MLImageFormatTools::close ( MLImageFormatInfos *& infos)
static

Closes an open file.

Closing a non open file causes an error.

Parameters
infosA pointer to a valid information structure created by open() on the file to be closed.
Returns
ML_RESULT_OK on success or another code describing the problem. Pointer to infos is always reset to NULL.

◆ getTile()

static MLErrorCode ml::MLImageFormatTools::getTile ( const MLImageFormatInfos & infos,
SubImage & subImgToFill,
bool useFileDataType,
bool useFileRegion,
const ScaleShiftData & scaleShiftData )
static

Loads a subimage from the specified file and returns an MLErrorCode describing success or failure.

Previous settings of the subimage are overwritten. Subimage memory will be (re)allocated if its pointer is NULL or if memory denoted by box and data type is too small, otherwise memory will be reused.

Parameters
infosinfos must be a valid information structure created by open() on the file to read from.
subImgToFillThe subimage to be manage the loaded data.
useFileDataTypeIf true then the data type of the stored file is used; if false the data type of subImgToFill is used. Default is to use the data type of the subimage.
useFileRegionIf true then the extent of the file is loaded as tile and the subImgToFill box is overwritten; if false the region of subImgToFill is used. Default is to use the region of the subimage.
scaleShiftDataSpecifies scale factor and offset for loaded data. If not passed the data will not be rescaled.
Returns
An MLErrorCode describing the success or failure of the operation and ML_RESULT_OK on success.

Note that this routine will use subImgToFill.free() and subImgToFill.allocate() to (re)allocate the data if its size is not enough. Be sure that eventually set subimage data was also allocated with subImgToFill.allocate() or MLAllocateMemory (and not with new or so) to avoid collisions of memory managers. Automatically opens the file if still not done and closes it after operation if autoClose is true (the default).

◆ open() [1/2]

static MLErrorCode ml::MLImageFormatTools::open ( MLImageFormatInfos *& infos,
const std::string & fileName,
bool truncate = false,
const std::string & compressorName = "",
const MLImageFormatTagList & compressionTagList = MLImageFormatTagList::getDefaultEmptyTagList(),
const MLImageFormatTagList & userTagList = MLImageFormatTagList::getDefaultEmptyTagList(),
const MLImageFormatTagList & privateTagList = MLImageFormatTagList::getDefaultEmptyTagList(),
const std::string & defaultVoxelValue = "0",
bool rewritable = true,
bool suppressReadCheckSumTests = false )
static

Opens a file in binary mode returning a descriptor for the opened file.

Parameters
infosA NULL MLImageFormatPointer which is initialized with an object with open file information.
fileNameis the UTF8 encoded path and name of the file to be opened.
truncateopens the file for new or overwriting the file and discarding the previous contents if true. Reopens an exiting file for reading and manipulation if false.
compressorNamename of DataCompressor used for data compression if not "" (the default).
compressionTagListis the list of MLImageFormatTags storing arguments for the compressor passed in compressor argument. Ignored if compressor is NULL.
userTagListis the list of MLImageFormatTags storing user information.
privateTagListis the list of MLImageFormatTags storing private information.
defaultVoxelValueis the string value used for all non existing pages and not written pages to define a background value for sparsely written image.
rewritableIf truncate is false then this flag decides whether the file is opened as read only or as a rewritable file. Default is true which means that opening is done in read-write mode. This flag is ignored if truncate is true.
suppressReadCheckSumTestsIf true then checksum tests are disabled while reading page data to gain maximum load performance; the default is off, because this is not recommended. Not allowed if the file is created or modified.
Returns
a new MLImageFormatInfo structure with a valid file handle on success or NULL on failure. On failures the file is closed.

◆ open() [2/2]

static MLErrorCode ml::MLImageFormatTools::open ( MLImageFormatInfos *& infos,
MLImageFormatAbstractFileHandle * fileHandle,
bool truncate = false,
const std::string & compressorName = "",
const MLImageFormatTagList & compressionTagList = MLImageFormatTagList::getDefaultEmptyTagList(),
const MLImageFormatTagList & userTagList = MLImageFormatTagList::getDefaultEmptyTagList(),
const MLImageFormatTagList & privateTagList = MLImageFormatTagList::getDefaultEmptyTagList(),
const std::string & defaultVoxelValue = "0",
bool rewritable = true,
bool suppressReadCheckSumTests = false )
static

Overload of open() with a virtual file handle, have a look at open(..., filename, ...).

The ownership of the MLImageFormatAbstractFileHandle is passed to the MLImageFormatInfos and it will be deleted when calling close().

◆ overwrite() [1/2]

static MLErrorCode ml::MLImageFormatTools::overwrite ( MLImageFormatInfos & infos,
const SubImage & inputSubImg,
MLImageFormatNotifyCB * callback,
void * userData,
const ScaleShiftData & scaleShiftData,
MLuint32 saveModeBits = DefaultSaveMode,
MLdouble * saveTime = nullptr,
MLdouble * prepTime = nullptr )
static

Overwrites a region in a file which has been written before (with save).

Parameters
infosinfos must be a valid information structure created by open() on the file to write in.
inputSubImgis the ML subimage which shall overwrite the corresponding area in the file.
callbackfunction to be executed during the save process to update process state or NULL (the default) if not set.
userDataapplication data to be passed to the callback function if it is called. Otherwise it is ignored.
scaleShiftDataDefines a linear transformation to be applied on data from inputPagedImg or inputSubImg before saving it on disc. Default is the identical transformation.
saveModeBitsBit combination setting special save options: See SaveModeBits for possible options.
saveTimeIgnored if NULL, otherwise it returns the time needed for pure data saving without data preparation such as data reordering or compression.
prepTimeIgnored if NULL, otherwise it returns the time needed for data preparation such as reordering or compression without saving.
Returns
ML_RESULT_OK on success or on failure an MLErrorCode describing the problem.

◆ overwrite() [2/2]

static MLErrorCode ml::MLImageFormatTools::overwrite ( MLImageFormatInfos & infos,
PagedImage & inputPagedImg,
const SubImageBox & box,
MLImageFormatNotifyCB * callback,
void * userData,
const ScaleShiftData & scaleShiftData,
MLuint32 saveModeBits = DefaultSaveMode,
MLdouble * saveTime = nullptr,
MLdouble * prepTime = nullptr )
static

Overwrites a region in a file which has been written before (with save).

Parameters
infosinfos must be a valid information structure created by open() on the file to write in.
inputPagedImgis the ML paged image providing the image data to be stored.
boxonly pages overlapping with box are written into the file. It defaults to the empty box. An empty box means that the whole image is to be stored.
callbackfunction to be executed during the save process to update process state or NULL (the default) if not set.
userDataapplication data to be passed to the callback function if it is called. Otherwise it is ignored.
scaleShiftDataDefines a linear transformation to be applied on data from inputPagedImg or inputSubImg before saving it on disc. Default is the identical transformation.
saveModeBitsBit combination setting special save options: See SaveModeBits for possible options.
saveTimeIgnored if NULL, otherwise it returns the time needed for pure data saving without data preparation such as data reordering or compression.
prepTimeIgnored if NULL, otherwise it returns the time needed for data preparation such as reordering or compression without saving.
Returns
ML_RESULT_OK on success or on failure an MLErrorCode describing the problem.

◆ overwriteHeaderAndPageList()

static MLErrorCode ml::MLImageFormatTools::overwriteHeaderAndPageList ( const MLImageFormatInfos & infos,
MLuint32 saveModeBits )
static

Save the file header information a second time over the already written file.

It requires that the file is already written (for example with save()) and that the file is open. It allows an update of already written tags, for example after correcting the minimum or maximum voxel values or other image properties. WARNING, IMPORTANT: It is only possible to overwrite the tag list correctly if its binary size is unchanged and page properties and indexes remain consistent. It is left to the caller to guarantee this consistency. So use this method with care!

Parameters
infosinfos must be a valid information structure created by open() on the file to write in.
saveModeBitsBit combination setting special save options: See SaveModeBits for possible options.
Returns
ML_RESULT_OK on success or another code in case of failure.

◆ save()

static MLErrorCode ml::MLImageFormatTools::save ( MLImageFormatInfos & infos,
PagedImage & inputPagedImg,
const SubImageBox & box = SubImageBox(),
MLImageFormatNotifyCB * callback = nullptr,
void * userData = nullptr,
const ScaleShiftData & scaleShiftData = ScaleShiftData(),
MLuint32 saveModeBits = DefaultSaveMode,
MLdouble * saveTime = nullptr,
MLdouble * prepTime = nullptr )
static

Saves the data of the paged image inputPagedImg from the region given by box in the file.

Regions outside box are filled with the value given in infos. Existing files will be overwritten without check.

Parameters
infosinfos must be a valid information structure created by open() on the file to write in.
inputPagedImgis the ML paged image providing the image data to be stored.
boxonly pages overlapping with box are written into the file. It defaults to the empty box. An empty box means that the whole image is to be stored.
callbackfunction to be executed during the save process to update process state or NULL (the default) if not set.
userDataapplication data to be passed to the callback function if it is called. Otherwise it is ignored.
scaleShiftDataDefines a linear transformation to be applied on data from inputPagedImg or inputSubImg before saving it on disc. Default is the identical transformation.
saveModeBitsBit combination setting special save options: See SaveModeBits for possible options.
saveTimeIgnored if NULL, otherwise it returns the time needed for pure data saving without data preparation such as data reordering or compression.
prepTimeIgnored if NULL, otherwise it returns the time needed for data preparation such as reordering or compression without saving.
Returns
ML_RESULT_OK on success or on failure an MLErrorCode describing the problem.

◆ setDICOMTreeSourceFileName()

static void ml::MLImageFormatTools::setDICOMTreeSourceFileName ( PagedImage & outImg,
const std::string & fileName )
static

If the paged image has DicomTreeImagePropertyExtensions then set their file names, because other modules perhaps want to derive destination file names from them as it is done for example in ImageSave.

If there is no such extension then create an empty one, because the file name if often needed. Invalid output images are not modified and no names are set.

Parameters
outImgis the output image in whose DICOM property extensions the file names shall be set.
fileNameis the file name to be set.

Friends And Related Symbol Documentation

◆ MLImageFormatSaveHandler

friend class MLImageFormatSaveHandler
friend

Definition at line 42 of file mlImageFormatTools.h.

Member Data Documentation

◆ ML_FILE_VERSION_STRING

const std::string ml::MLImageFormatTools::ML_FILE_VERSION_STRING
static

Basic file version string used for MeVisLab release 1.5.

Version string used by the first MLImageFormat source. If possible all future versions should be able to read it. The length of the string will not change in future versions.

Definition at line 69 of file mlImageFormatTools.h.

◆ ML_FILE_VERSION_STRING_EXT

const std::string ml::MLImageFormatTools::ML_FILE_VERSION_STRING_EXT
static

Basic file version string used for MeVisLab release 1.5 plus addOns which endanger backward compatibility to version ML_FILE_VERSION_STRING.

Definition at line 75 of file mlImageFormatTools.h.

◆ ML_MAX_VERSION_AND_FIRST_PAIR_SIZE

const size_t ml::MLImageFormatTools::ML_MAX_VERSION_AND_FIRST_PAIR_SIZE
static

Number of characters which will not be exceeded by version string and first tag pair.

Definition at line 81 of file mlImageFormatTools.h.


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