MeVisLab Toolbox Reference
ml::MultiFileVolume Class Reference

Management class used by DirectDicomImport to create, represent and describe volumes composed of multiple DICOM or other files without needing additional intermediate representations or copies of the composed files. More...

#include <mlMultiFileVolume.h>

Public Member Functions

 MultiFileVolume ()
 Default constructor. More...
 
virtual ~MultiFileVolume ()
 Destructor. More...
 
 MultiFileVolume (const MultiFileVolume &ref)
 Copy constructor. More...
 
MultiFileVolumeoperator= (const MultiFileVolume &ref)
 Assignment operator. More...
 
void setSMFTree (DCMTree::Const_StructuredMFPtr tree)
 Set the SMF DCMTree of the volume. More...
 
const DCMTree::Const_StructuredMFPtr getSMFTree (bool checkImgProps=false) const
 Returns a constant pointer to the SMF DICOM tree available for this volume. More...
 
const DCMTree::Const_TreePtr getDCMTree (bool checkImgProps=false) const
 Returns a constant pointer to the DICOM tree available for this volume, however, it may not have loaded DCMTrees from .mlimage files. More...
 
DCMTree::Const_TreePtr getDCMTreeAlsoFromFiles () const
 Returns an associated DCMTree if there is any in the volume, otherwise nullptr; the difference to getDCMTree is that also the more expensive check for a dcmTree from files such as mlimage properties is done. More...
 
bool setUpIssues (const DicomMessageCollector *dcmMsgCollector=nullptr)
 Sets up the member 'issues' to a description of known problems for this volume and return true or - if no issues are known - set issues to an empty string vector and return false; if dcmMessagCollector is passed non-nullptr then issues are filtered in the manner "getIssues(setIssues())". More...
 
std::string getIssues (const DicomMessageCollector *dcmMsgCollector=nullptr) const
 Returns a string containing a description of issues related to the imported volume or "" if no problems are known (or filtered away during setUpIssues()). More...
 
const std::vector< std::string > & getIssuesVector () const
 String vector containing a description of issues related to the imported volume or empty if no problems are known (or filtered away during setUpIssues()). More...
 
std::string getInfoDump (const std::string &cacheFileRootDirPath, bool useRelativePaths, const DicomMessageCollector *dcmMsgCollector=nullptr) const
 Returns information about *this as human readable string. More...
 
MLErrorCode copyToSubImage (SubImage &outSubImg, DicomMessageCollector &dcmMsgCollector)
 Copies overlapping regions of the volume with outSubImg into outSubImg, non-constant since needed loader backends may be stored in private members for subsequent copy operations. More...
 
MLErrorCode copyToSubImage (SubImage &outSubImg, PagedImage &, DicomMessageCollector &dcmMsgCollector)
 Same as copyToSubImage(SubImage& outSubImg, DicomMessageCollector& dcmMsgCollector) for backward compatibility; PagedImg is not needed any more, non-constant since needed loader backends may be stored in private members for subsequent copy operations. More...
 
bool equals (const MultiFileVolume &obj) const
 Returns true if all properties stored with setFromString and restored with getAsString() of *this and obj are identical, otherwise it returns false. More...
 
std::string getVolumeInfoString (const std::string &lineEndStr, const std::string &cacheFileRootDirPath, bool useRelativePaths, const std::string &userInfo=std::string()) const
 Return a human-readable subset of information about this volume which is also used for persistence when creating cache files. More...
 
MLErrorCode appendToCache (const std::string &cacheDirPath, std::string &currCacheState, const std::string &lineEndStr, bool useRelativePaths, const std::string &optionalFilePrefix="")
 Converts the current state of this to a string, appends it to the currCacheState, stores DICOM trees in cacheDirPath if necessary, and updates _dicomSMFTagTreeCacheFileName to the possibly created DICOM tree instance (therefore non-constant). More...
 
MLErrorCode setFromString (const std::string &state, const std::string &cacheDirPath, size_t &readPos, bool lightLoad=false, DicomMessageCollector *dcmMsgCollector=nullptr)
 Reads the MultFileVolume state from the string state starting at readPos. More...
 
void appendFrameFile (MLint imgDim, const std::string &fileName, ImageVector &ext)
 Append an image frame with image dimension imgDim (where color extents > 1 are not considered as extent) which is stored in file fileName. More...
 
MLErrorCode removeSpatialSlices (std::vector< size_t > zIndexesToRemove)
 Removes all entries of pageFileNames in z-dimension which are given in zIndexesToRemove and updates the volume consistency after the change. More...
 
void setUpMetaDataDumpsFromAdditionalOptions ()
 Calls setUpMetaDataDumpsFromAdditionalOptions(this->_additionalOptions and this->_imgProps). More...
 
void invalidateImage (const std::string &stateInfo, MLErrorCode stateErrCode)
 Invalidate image properties, sets outOfDate and UpdateOfImagePropertiesNeeded flags, state info and and state error code. More...
 
MLImageFormat ** getMLImageFormatFileLoaderPointer ()
 Provide access to a pointer to an MLImageFormatLoader which is created on demand. More...
 
Module ** getMLItkImageFileReaderPointer ()
 Provide access to a pointer to an MLItkImageFileReader which is created on demand. More...
 
MultiFileVolumeAdditionalOptionsgetAdditionalOptionsContainer ()
 Provide access to the container with additional options. More...
 
bool searchFrameWithSOPInstanceUID (const std::string &sopInstanceUID, DICOMCachedIOFileHandle &foundHandle, DICOMTagTools::ZTUIndex &ztuPosition, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
 Returns position and file handle of the first frame with the given SOPInstanceUID. More...
 
bool searchFrameWithValueInTag (DCMTree::RawTagId tagId, const std::string &tagValue, DICOMCachedIOFileHandle &foundHandle, DICOMTagTools::ZTUIndex &ztuPosition, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
 Returns file handle and position of the first frame in the volume with the given tagValue in tag with id tagId. More...
 
bool hasTagWithValueInTree (DCMTree::RawTagId tagId, const std::string &tagValue, bool alsoSearchInSMFTrees) const
 Returns true if the DICOM tree of this has a tag with id tagId and value tagValue; otherwise false is returned. More...
 
void appendFilteredIssue (const std::string &issue, const DicomMessageCollector *dcmMsgCollector, bool separateWithTerminatorIfNecessary)
 If possible then filter issue with dcmMsgCollector and append it to getIssuesVector() if not filtered out, possibly terminated with a newline according to separateWithTerminatorIfNecessary. More...
 
size_t getZExt () const
 Z-Extent of the volume. More...
 
void setZExt (size_t nZ)
 
size_t getTExt () const
 Time extent of the volume. More...
 
void setTExt (size_t nT)
 
size_t getUExt () const
 U extent of the volume. More...
 
void setUExt (size_t nU)
 
int getFillValueUInt8 () const
 Fill value for gaps in volume. More...
 
void setFillValueUInt8 (int fVal)
 
int getPlanarConfig () const
 Planar configuration of the volume. More...
 
void setPlanarConfig (int pConfig)
 
DicomToMLTools::FillPageMethods getFillPageMethod () const
 The way how a page is filled with data from the source file or tree. More...
 
void setFillPageMethod (DicomToMLTools::FillPageMethods fpMode)
 
const DICOMCachedIOFileHandlegetFirstFileName () const
 Name of first file used to compose the output image. More...
 
void setFirstFileName (const std::string &fName)
 
const std::string & getOutVolumeName () const
 Name base (without extension) of generated output volumes or empty if no output is generated. More...
 
void setOutVolumeName (const std::string &fName)
 
const DICOMCachedIOFileHandlegetOvrDataSrcFile () const
 In case of DCM/Tiff pairs or other formats this stores the file the data comes from instead of the original DICOM file. More...
 
void setOvrDataSrcFile (const std::string &oDFile)
 
const PagedImagegetImageProperties () const
 MLPaged image properties of the volume. More...
 
PagedImagegetModifiableImageProperties ()
 
const std::string & getFileFormat () const
 String set to the file format if it is not a DICOM or DICOM/Tiff import. More...
 
void setFileFormat (const std::string &fFormat)
 
ZTUFileNameSetgetModifiablePageFileNames ()
 2D vector of all DICOM file names to be composed to the result image. More...
 
const ZTUFileNameSetgetConstPageFileNames () const
 
const DICOMCachedIOFileHandlegetDicomSMFTagTreeCacheFileName () const
 Name of the cache file associated with the dicomSMFTagTree if it was written to a cache or reloaded from one, otherwise "". More...
 
void setDicomSMFTagTreeCacheFileName (const std::string &fName)
 
const DICOMCachedIOFileHandlegetDirectDCMTreeFileName () const
 
void setDirectDCMTreeFileName (const std::string &fName)
 
MLdouble getImportTime () const
 Rough time needed to import this volume in seconds (not very precise). More...
 
void setImportTime (MLdouble iTime)
 
void addImportTime (MLdouble iTimeToAdd)
 
const std::string & getInputFilterLabel () const
 Return the volume label defined input filters; default is "". More...
 
void setInputFilterLabel (const std::string &label)
 
const std::string & getInputFilterConfig () const
 Return the DPL configuration defined by input filters; default is "". More...
 
void setInputFilterConfig (const std::string &config)
 

Static Public Member Functions

static void setUpMetaDataDumpsFromAdditionalOptions (const MultiFileVolumeAdditionalOptions &additionalOptions, PagedImage &imgProps)
 Setting up meta data from additionalOptions. More...
 

Static Public Attributes

static const char *const DDIVersionStringBase
 A constant version string used as base for all currently used version strings written to cache files. More...
 
static const char *const DDISMFTreeCacheFileSuffix
 A constant suffix for SMF tree file generated for cache files. More...
 

Detailed Description

Management class used by DirectDicomImport to create, represent and describe volumes composed of multiple DICOM or other files without needing additional intermediate representations or copies of the composed files.

Definition at line 38 of file mlMultiFileVolume.h.

Constructor & Destructor Documentation

◆ MultiFileVolume() [1/2]

ml::MultiFileVolume::MultiFileVolume ( )

Default constructor.

◆ ~MultiFileVolume()

virtual ml::MultiFileVolume::~MultiFileVolume ( )
virtual

Destructor.

◆ MultiFileVolume() [2/2]

ml::MultiFileVolume::MultiFileVolume ( const MultiFileVolume ref)

Copy constructor.

Member Function Documentation

◆ addImportTime()

void ml::MultiFileVolume::addImportTime ( MLdouble  iTimeToAdd)
inline

Definition at line 310 of file mlMultiFileVolume.h.

◆ appendFilteredIssue()

void ml::MultiFileVolume::appendFilteredIssue ( const std::string &  issue,
const DicomMessageCollector dcmMsgCollector,
bool  separateWithTerminatorIfNecessary 
)

If possible then filter issue with dcmMsgCollector and append it to getIssuesVector() if not filtered out, possibly terminated with a newline according to separateWithTerminatorIfNecessary.

◆ appendFrameFile()

void ml::MultiFileVolume::appendFrameFile ( MLint  imgDim,
const std::string &  fileName,
ImageVector ext 
)

Append an image frame with image dimension imgDim (where color extents > 1 are not considered as extent) which is stored in file fileName.

ext is the previous extent of the MultiFileVolume and is modified to the new extent.

◆ appendToCache()

MLErrorCode ml::MultiFileVolume::appendToCache ( const std::string &  cacheDirPath,
std::string &  currCacheState,
const std::string &  lineEndStr,
bool  useRelativePaths,
const std::string &  optionalFilePrefix = "" 
)

Converts the current state of this to a string, appends it to the currCacheState, stores DICOM trees in cacheDirPath if necessary, and updates _dicomSMFTagTreeCacheFileName to the possibly created DICOM tree instance (therefore non-constant).

Parameters
cacheDirPathDirectory location where the cache file shall be stored.
currCacheStateThe string to which *this is appended as string description.
lineEndStrIs appended to all lines in currCacheState as terminator string.
useRelativePathsIf false then all file names in the cache string are stored with absolute paths. If true and if all referenced and stored files are located in cacheDirPath then all files are stored relative to cacheDirPath. Files which are not in that path are stored with absolute paths.
optionalFilePrefixA prefix which is added before files which are created as sub files of the cache state, for example SMF trees which are stored on disk for caching will have this prefix.
Returns
ML_RESULT_OK in case of success or an error code describing the nature of the error.

◆ copyToSubImage() [1/2]

MLErrorCode ml::MultiFileVolume::copyToSubImage ( SubImage outSubImg,
DicomMessageCollector dcmMsgCollector 
)

Copies overlapping regions of the volume with outSubImg into outSubImg, non-constant since needed loader backends may be stored in private members for subsequent copy operations.

Parameters
outSubImgThe subimage to be filled with data from this.
dcmMsgCollectorCollects error, info and issue messages (typically related to a handle).
Returns
ML_RESULT_OK on success or another code on failure. On failure errHandling describes the handling of the error.

◆ copyToSubImage() [2/2]

MLErrorCode ml::MultiFileVolume::copyToSubImage ( SubImage outSubImg,
PagedImage ,
DicomMessageCollector dcmMsgCollector 
)

Same as copyToSubImage(SubImage& outSubImg, DicomMessageCollector& dcmMsgCollector) for backward compatibility; PagedImg is not needed any more, non-constant since needed loader backends may be stored in private members for subsequent copy operations.

◆ equals()

bool ml::MultiFileVolume::equals ( const MultiFileVolume obj) const

Returns true if all properties stored with setFromString and restored with getAsString() of *this and obj are identical, otherwise it returns false.

Note that DICOM trees are not compared.

◆ getAdditionalOptionsContainer()

MultiFileVolumeAdditionalOptions& ml::MultiFileVolume::getAdditionalOptionsContainer ( )
inline

Provide access to the container with additional options.

Definition at line 332 of file mlMultiFileVolume.h.

◆ getConstPageFileNames()

const ZTUFileNameSet& ml::MultiFileVolume::getConstPageFileNames ( ) const
inline

Definition at line 293 of file mlMultiFileVolume.h.

◆ getDCMTree()

const DCMTree::Const_TreePtr ml::MultiFileVolume::getDCMTree ( bool  checkImgProps = false) const

Returns a constant pointer to the DICOM tree available for this volume, however, it may not have loaded DCMTrees from .mlimage files.

If both, directDCMTree and dicomSMFTagTree, then the directDCMTree is preferred. If none is available a default (empty) Tree Pointer is returned. If checkImgProps is true (default is false) then also the current image properties are checked for an available DICOM tree.

◆ getDCMTreeAlsoFromFiles()

DCMTree::Const_TreePtr ml::MultiFileVolume::getDCMTreeAlsoFromFiles ( ) const

Returns an associated DCMTree if there is any in the volume, otherwise nullptr; the difference to getDCMTree is that also the more expensive check for a dcmTree from files such as mlimage properties is done.

◆ getDicomSMFTagTreeCacheFileName()

const DICOMCachedIOFileHandle& ml::MultiFileVolume::getDicomSMFTagTreeCacheFileName ( ) const
inline

Name of the cache file associated with the dicomSMFTagTree if it was written to a cache or reloaded from one, otherwise "".

Definition at line 297 of file mlMultiFileVolume.h.

◆ getDirectDCMTreeFileName()

const DICOMCachedIOFileHandle& ml::MultiFileVolume::getDirectDCMTreeFileName ( ) const
inline

Name of the DICOM tree file if it was a directly loaded one from which no SMFTree needs to be generated, because it maps directly to a single file; default is "".

Definition at line 303 of file mlMultiFileVolume.h.

◆ getFileFormat()

const std::string& ml::MultiFileVolume::getFileFormat ( ) const
inline

String set to the file format if it is not a DICOM or DICOM/Tiff import.

Definition at line 287 of file mlMultiFileVolume.h.

◆ getFillPageMethod()

DicomToMLTools::FillPageMethods ml::MultiFileVolume::getFillPageMethod ( ) const
inline

The way how a page is filled with data from the source file or tree.

Definition at line 257 of file mlMultiFileVolume.h.

◆ getFillValueUInt8()

int ml::MultiFileVolume::getFillValueUInt8 ( ) const
inline

Fill value for gaps in volume.

Definition at line 247 of file mlMultiFileVolume.h.

◆ getFirstFileName()

const DICOMCachedIOFileHandle& ml::MultiFileVolume::getFirstFileName ( ) const
inline

Name of first file used to compose the output image.

Definition at line 264 of file mlMultiFileVolume.h.

◆ getImageProperties()

const PagedImage& ml::MultiFileVolume::getImageProperties ( ) const
inline

MLPaged image properties of the volume.

Definition at line 279 of file mlMultiFileVolume.h.

◆ getImportTime()

MLdouble ml::MultiFileVolume::getImportTime ( ) const
inline

Rough time needed to import this volume in seconds (not very precise).

Definition at line 308 of file mlMultiFileVolume.h.

◆ getInfoDump()

std::string ml::MultiFileVolume::getInfoDump ( const std::string &  cacheFileRootDirPath,
bool  useRelativePaths,
const DicomMessageCollector dcmMsgCollector = nullptr 
) const

Returns information about *this as human readable string.

Parameters
cacheFileRootDirPathPaths of file names or descriptors are stored relative to cacheFileRootDirPath if it is passed as non empty string and if it part of the begin of the file name paths.
useRelativePathsIf false then all file names in the cache string are stored with absolute paths. If true and if all referenced and stored files are located in cacheDirPath then all files are stored relative to cacheDirPath. Files which are not in that path are stored with absolute paths.
dcmMsgCollectorIf passed non-null then the issue log inside is filtered with the collector.
Returns
The composed string describing the state of *this as a human readable string with information about this volume.

◆ getInputFilterConfig()

const std::string& ml::MultiFileVolume::getInputFilterConfig ( ) const
inline

Return the DPL configuration defined by input filters; default is "".

Definition at line 319 of file mlMultiFileVolume.h.

◆ getInputFilterLabel()

const std::string& ml::MultiFileVolume::getInputFilterLabel ( ) const
inline

Return the volume label defined input filters; default is "".

Definition at line 314 of file mlMultiFileVolume.h.

◆ getIssues()

std::string ml::MultiFileVolume::getIssues ( const DicomMessageCollector dcmMsgCollector = nullptr) const

Returns a string containing a description of issues related to the imported volume or "" if no problems are known (or filtered away during setUpIssues()).

◆ getIssuesVector()

const std::vector<std::string>& ml::MultiFileVolume::getIssuesVector ( ) const

String vector containing a description of issues related to the imported volume or empty if no problems are known (or filtered away during setUpIssues()).

◆ getMLImageFormatFileLoaderPointer()

MLImageFormat** ml::MultiFileVolume::getMLImageFormatFileLoaderPointer ( )
inline

Provide access to a pointer to an MLImageFormatLoader which is created on demand.

If left non nullptr it will automatically be deleted with destruction of this.

Definition at line 325 of file mlMultiFileVolume.h.

◆ getMLItkImageFileReaderPointer()

Module** ml::MultiFileVolume::getMLItkImageFileReaderPointer ( )
inline

Provide access to a pointer to an MLItkImageFileReader which is created on demand.

If left non nullptr it will automatically be deleted with destruction of this.

Definition at line 329 of file mlMultiFileVolume.h.

◆ getModifiableImageProperties()

PagedImage& ml::MultiFileVolume::getModifiableImageProperties ( )
inline

Definition at line 280 of file mlMultiFileVolume.h.

◆ getModifiablePageFileNames()

ZTUFileNameSet& ml::MultiFileVolume::getModifiablePageFileNames ( )
inline

2D vector of all DICOM file names to be composed to the result image.

Definition at line 292 of file mlMultiFileVolume.h.

◆ getOutVolumeName()

const std::string& ml::MultiFileVolume::getOutVolumeName ( ) const
inline

Name base (without extension) of generated output volumes or empty if no output is generated.

Definition at line 269 of file mlMultiFileVolume.h.

◆ getOvrDataSrcFile()

const DICOMCachedIOFileHandle& ml::MultiFileVolume::getOvrDataSrcFile ( ) const
inline

In case of DCM/Tiff pairs or other formats this stores the file the data comes from instead of the original DICOM file.

Definition at line 274 of file mlMultiFileVolume.h.

◆ getPlanarConfig()

int ml::MultiFileVolume::getPlanarConfig ( ) const
inline

Planar configuration of the volume.

Definition at line 252 of file mlMultiFileVolume.h.

◆ getSMFTree()

const DCMTree::Const_StructuredMFPtr ml::MultiFileVolume::getSMFTree ( bool  checkImgProps = false) const

Returns a constant pointer to the SMF DICOM tree available for this volume.

If both, directDCMTree and dicomSMFTagTree, then the directDCMTree is preferred. If none is available a default (empty) SMFTree Pointer is returned. If checkImgProps is true (default is false) then also the current image properties are checked for an available DICOM tree.

◆ getTExt()

size_t ml::MultiFileVolume::getTExt ( ) const
inline

Time extent of the volume.

Definition at line 237 of file mlMultiFileVolume.h.

◆ getUExt()

size_t ml::MultiFileVolume::getUExt ( ) const
inline

U extent of the volume.

Definition at line 242 of file mlMultiFileVolume.h.

◆ getVolumeInfoString()

std::string ml::MultiFileVolume::getVolumeInfoString ( const std::string &  lineEndStr,
const std::string &  cacheFileRootDirPath,
bool  useRelativePaths,
const std::string &  userInfo = std::string() 
) const

Return a human-readable subset of information about this volume which is also used for persistence when creating cache files.

Parameters
lineEndStrThe string appended to each line (usually used as line-end terminator).
cacheFileRootDirPathPaths of file names or descriptors are stored relative to cacheFileRootDirPath if it is passed as non empty string and if it part of the begin of the file name paths.
useRelativePathsIf false then all file names in the cache string are stored with absolute paths. If true and if all referenced and stored files are located in cacheDirPath then all files are stored relative to cacheDirPath. Files which are not in that path are stored with absolute paths.
userInfoA user information string added as it is between fileFormat and page file names.
Returns
The composed string describing the state of *this.

◆ getZExt()

size_t ml::MultiFileVolume::getZExt ( ) const
inline

Z-Extent of the volume.

Definition at line 232 of file mlMultiFileVolume.h.

◆ hasTagWithValueInTree()

bool ml::MultiFileVolume::hasTagWithValueInTree ( DCMTree::RawTagId  tagId,
const std::string &  tagValue,
bool  alsoSearchInSMFTrees 
) const

Returns true if the DICOM tree of this has a tag with id tagId and value tagValue; otherwise false is returned.

Parameters
tagIdInput parameter: The id of the tag to be searched.
tagValueInput parameter: The tagValue to be searched in the frames.
alsoSearchInSMFTreesInput parameter: If true then the tagId+Value is also searched in the DicomSMFTree of the volume which can comes for example from an ImagePropertyExtension, otherwise there the tag is not searched.
Returns
true if a frame with the given tagValue in a tag with id tagId is found, otherwise false.

◆ invalidateImage()

void ml::MultiFileVolume::invalidateImage ( const std::string &  stateInfo,
MLErrorCode  stateErrCode 
)

Invalidate image properties, sets outOfDate and UpdateOfImagePropertiesNeeded flags, state info and and state error code.

◆ operator=()

MultiFileVolume& ml::MultiFileVolume::operator= ( const MultiFileVolume ref)

Assignment operator.

◆ removeSpatialSlices()

MLErrorCode ml::MultiFileVolume::removeSpatialSlices ( std::vector< size_t >  zIndexesToRemove)

Removes all entries of pageFileNames in z-dimension which are given in zIndexesToRemove and updates the volume consistency after the change.

This includes the correction of the image extent (see getZExt(), setZExt(), and get[Modifiable]ImageProperties()) and perhaps the validity flag of the image properties. Possibly available DICOM information is not updated. If no entries in the z-dimension are left after the operation, the volume image properties are invalidated without error message. Indexes from zIndexesToRemove will be removed from pageFileNames starting with highest indexes, ending with lowest, one after another. Multiply appearing indexes will be removed only once. No correctness checks regarding the distance between incoming or remaining frames are performed.

Parameters
zIndexesToRemoveAll indexes in zIndexesToRemove must be < getZExt(), or a non empty
error string will be returned. Empty input arrays are allowed without error.
Returns
ML_RESULT_OK on success, otherwise an error code describing the problem.

◆ searchFrameWithSOPInstanceUID()

bool ml::MultiFileVolume::searchFrameWithSOPInstanceUID ( const std::string &  sopInstanceUID,
DICOMCachedIOFileHandle foundHandle,
DICOMTagTools::ZTUIndex ztuPosition,
bool  forceSearchInEnhancedHandles,
bool  alsoSearchInSMFTrees,
DicomMessageCollector dcmMsgCollector 
) const

Returns position and file handle of the first frame with the given SOPInstanceUID.

Parameters
sopInstanceUIDInput parameter: The SOPInstanceUID to be searched in the frames.
foundHandleOutput parameter: The file handle of the frame with the given SOPInstanceUID; will be empty if not found.
ztuPositionOutput parameter: Will be set with z, t, and u indexes of the frame in the FileNameSet which has the given SOPInstanceUID; z, t, and u will be set to 0 if no frame with the given SOPInstanceUID is not found.
forceSearchInEnhancedHandlesInput parameter: If true then in enhanced frame handles is always searched; if false then only if the frames are available or if it is a normal frame handles.
alsoSearchInSMFTreesInput parameter: If true then the tagId+Value is also searched in the DicomSMFTree of the volume if not found in frames; in this case foundHandle will be set to the will be set to the firstFileName of the volume and ztuPosition members will be set to 0 and empty value.
dcmMsgCollectorCollects error, info and issue messages (typically related to a handle).
Returns
true if a frame with the given SOPInstanceUID is found, otherwise false.

◆ searchFrameWithValueInTag()

bool ml::MultiFileVolume::searchFrameWithValueInTag ( DCMTree::RawTagId  tagId,
const std::string &  tagValue,
DICOMCachedIOFileHandle foundHandle,
DICOMTagTools::ZTUIndex ztuPosition,
bool  forceSearchInEnhancedHandles,
bool  alsoSearchInSMFTrees,
DicomMessageCollector dcmMsgCollector 
) const

Returns file handle and position of the first frame in the volume with the given tagValue in tag with id tagId.

Parameters
tagIdInput parameter: The id of the tag to be searched.
tagValueInput parameter: The tagValue to be searched in the frames.
foundHandleOutput parameter: The file handle of the frame with the given tagValue in a tag with id tagId will be empty if not found.
ztuPositionOutput parameter: Will be set with z, t, and u indexes of the frame in the FileNameSet which has the given tagValue; z, t, and u will be set to 0 if no frame with the given tagValue is not found.
forceSearchInEnhancedHandlesInput parameter: If true then in enhanced frame handles is always searched; if false then only if the frames are available or if it is a normal frame handles.
alsoSearchInSMFTreesInput parameter: If true then the tagId+Value is also searched in the DicomSMFTree of the volume if not found in frames; in this case foundHandle will be set to the will be set to the firstFileName of the volume and ztuPosition members will be set to 0 and empty value.
dcmMsgCollectorCollects error, info and issue messages (typically related to a handle).
Returns
true if a frame with the given tagValue in a tag with id tagId is found, otherwise false.

◆ setDicomSMFTagTreeCacheFileName()

void ml::MultiFileVolume::setDicomSMFTagTreeCacheFileName ( const std::string &  fName)
inline

Definition at line 298 of file mlMultiFileVolume.h.

◆ setDirectDCMTreeFileName()

void ml::MultiFileVolume::setDirectDCMTreeFileName ( const std::string &  fName)
inline

Definition at line 304 of file mlMultiFileVolume.h.

◆ setFileFormat()

void ml::MultiFileVolume::setFileFormat ( const std::string &  fFormat)
inline

Definition at line 288 of file mlMultiFileVolume.h.

◆ setFillPageMethod()

void ml::MultiFileVolume::setFillPageMethod ( DicomToMLTools::FillPageMethods  fpMode)
inline

Definition at line 258 of file mlMultiFileVolume.h.

◆ setFillValueUInt8()

void ml::MultiFileVolume::setFillValueUInt8 ( int  fVal)
inline

Definition at line 248 of file mlMultiFileVolume.h.

◆ setFirstFileName()

void ml::MultiFileVolume::setFirstFileName ( const std::string &  fName)
inline

Definition at line 265 of file mlMultiFileVolume.h.

◆ setFromString()

MLErrorCode ml::MultiFileVolume::setFromString ( const std::string &  state,
const std::string &  cacheDirPath,
size_t &  readPos,
bool  lightLoad = false,
DicomMessageCollector dcmMsgCollector = nullptr 
)

Reads the MultFileVolume state from the string state starting at readPos.

Parameters
stateA string containing description of VolumeReferences starting at readPos.
cacheDirPathThe directory path where the cache file is located which contains state.
readPosThe position in state where reading shall start from; will be moved to position after read data chunk (will be left undefined after on parse failures).
lightLoadIf true then only the textual information is parsed from state but no related DCMTree or MLImageFormat information is loaded, if false then the full parse+load process is performed.
dcmMsgCollectorIf passed non-nullptr then it collects error, info and issue messages (typically related to a handle).
Returns
ML_RESULT_OK on successful load and and another code on failure.

◆ setImportTime()

void ml::MultiFileVolume::setImportTime ( MLdouble  iTime)
inline

Definition at line 309 of file mlMultiFileVolume.h.

◆ setInputFilterConfig()

void ml::MultiFileVolume::setInputFilterConfig ( const std::string &  config)
inline

Definition at line 320 of file mlMultiFileVolume.h.

◆ setInputFilterLabel()

void ml::MultiFileVolume::setInputFilterLabel ( const std::string &  label)
inline

Definition at line 315 of file mlMultiFileVolume.h.

◆ setOutVolumeName()

void ml::MultiFileVolume::setOutVolumeName ( const std::string &  fName)
inline

Definition at line 270 of file mlMultiFileVolume.h.

◆ setOvrDataSrcFile()

void ml::MultiFileVolume::setOvrDataSrcFile ( const std::string &  oDFile)
inline

Definition at line 275 of file mlMultiFileVolume.h.

◆ setPlanarConfig()

void ml::MultiFileVolume::setPlanarConfig ( int  pConfig)
inline

Definition at line 253 of file mlMultiFileVolume.h.

◆ setSMFTree()

void ml::MultiFileVolume::setSMFTree ( DCMTree::Const_StructuredMFPtr  tree)

Set the SMF DCMTree of the volume.

◆ setTExt()

void ml::MultiFileVolume::setTExt ( size_t  nT)
inline

Definition at line 238 of file mlMultiFileVolume.h.

◆ setUExt()

void ml::MultiFileVolume::setUExt ( size_t  nU)
inline

Definition at line 243 of file mlMultiFileVolume.h.

◆ setUpIssues()

bool ml::MultiFileVolume::setUpIssues ( const DicomMessageCollector dcmMsgCollector = nullptr)

Sets up the member 'issues' to a description of known problems for this volume and return true or - if no issues are known - set issues to an empty string vector and return false; if dcmMessagCollector is passed non-nullptr then issues are filtered in the manner "getIssues(setIssues())".

◆ setUpMetaDataDumpsFromAdditionalOptions() [1/2]

void ml::MultiFileVolume::setUpMetaDataDumpsFromAdditionalOptions ( )

Calls setUpMetaDataDumpsFromAdditionalOptions(this->_additionalOptions and this->_imgProps).

◆ setUpMetaDataDumpsFromAdditionalOptions() [2/2]

static void ml::MultiFileVolume::setUpMetaDataDumpsFromAdditionalOptions ( const MultiFileVolumeAdditionalOptions additionalOptions,
PagedImage imgProps 
)
static

Setting up meta data from additionalOptions.

If additionalOptions contain tags with meta data information then set up their contents as StringImagePropertyExtension in imgProps.

Parameters
additionalOptionsThe additional option container in which the meta data dumps shall be searched.
imgPropsThe PagedImage in which ImagePropertyExtensionContainer the StringImagePropertyExtension with the meta data shall be inserted if found in additionalOptions.

◆ setZExt()

void ml::MultiFileVolume::setZExt ( size_t  nZ)
inline

Definition at line 233 of file mlMultiFileVolume.h.

Member Data Documentation

◆ DDISMFTreeCacheFileSuffix

const char* const ml::MultiFileVolume::DDISMFTreeCacheFileSuffix
static

A constant suffix for SMF tree file generated for cache files.

Definition at line 46 of file mlMultiFileVolume.h.

◆ DDIVersionStringBase

const char* const ml::MultiFileVolume::DDIVersionStringBase
static

A constant version string used as base for all currently used version strings written to cache files.

Definition at line 43 of file mlMultiFileVolume.h.


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