15#include <FMEThirdPartyWarningsDisable.h>
21#include <FMEThirdPartyWarningsRestore.h>
29class DicomMessageCollector;
32namespace DICOMTagTools{
53 const std::string &info,
95 std::string sopInstanceUID)
const;
147 ProgressCB progressCB =
nullptr,
148 void *userData =
nullptr,
149 const float startPercentage = 0.0f,
150 const float percentageRange = 1.0f,
264 ProgressCB progressCB =
nullptr,
265 void *userData =
nullptr,
266 const float startPercentage = 0.0f,
267 const float percentageRange = 1.0f,
276 ProgressCB progressCB =
nullptr,
277 void *userData =
nullptr,
278 const float startPercentage = 0.0f,
279 const float percentageRange = 1.0f,
311 MultiFileVolumeList::const_iterator &
volumeIt,
338 MultiFileVolumeList::const_iterator &
volumeIt,
408 ProgressCB progressCB ,
410 const float startPercentage ,
411 const float percentageRange ,
Project global and OS specific declarations.
#define MLMULTI_FILE_VOLUME_EXPORT
Only for diagnostic purposes.
Class to collect messages and errors related to a given frame handle.
BooleanOperation
An enumeration to define the boolean op to be performed on the results of all search items.
SortModes
Possible modes how to reorder the volumes.
Class managing a list of MultiFileVolume instances for the DirectDicomImport module; taking ownership...
MLErrorCode appendToCache(const std::string &cacheDirPath, std::string &currCacheState, bool useRelativePaths, const std::string &optionalFilePrefix="") const
Converts the current state of this to a string.
void setUpIssues(const DicomMessageCollector *dcmMsgCollector=nullptr)
Sets up the 'issues' members of all volumes; see MultiFileVolume::setUpIssues() for details.
bool equals(const MultiFileVolumeList &obj) const
Returns true if basic properties of *this and obj are identical, otherwise false.
MLErrorCode _setFromMultiCacheFile(const std::string &state, const std::string &cacheDirPath, ProgressCB progressCB, void *userData, const float startPercentage, const float percentageRange, std::list< std::string > *cacheFileList, size_t &readPos, DicomMessageCollector *dcmMsgCollector)
Helper function for setFromString: Reads the state of this from the string state; returns ML_RESULT_O...
void ProgressCB(void *usrData, const std::string &info, float state)
Progress callback which can be passed to some functions for progress bar updates in DirectDicomImport...
bool findVolumesByCriteria(TSearchTerm searchTerm, std::vector< MLuint32 > &outVolumeIds, MultiFileVolumeListFind::BooleanOperation booleanOperation, bool searchAnyValue) const
Find volumes in *this using given searchTerm (containing e.g.
std::set< size_t > searchVolumeIndexesWithValueInTag(unsigned int tagId, const std::string &tagValue, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
Returns a set of indexes to volumes which contain a frame with a tag with id tagId with value tagValu...
MultiFileVolume * findVolumeByInstanceUID(std::string sopClassUID, std::string sopInstanceUID) const
Find a volume in *this using given SOPClassUID and SOPInstanceUID; see MultiFileVolumeListFind for de...
void freeAllVolumes()
Deletes all volumes and reduce vector size to 0.
std::vector< MultiFileVolumeList::const_iterator > searchVolumesWithFramesWithValueInTag(unsigned int tagId, const std::string &tagValue, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
Returns a vector of iterators to volumes which contain a frame with a tag with id tagId with value ta...
MLErrorCode clearResultFiles(ProgressLogger *progressLogger=nullptr) const
Clear all stored SMF-Tree files for the MultiFileVolumeList instance; cache files are not removed.
bool searchFrameWithSOPInstanceUID(const std::string &sopInstanceUID, DICOMCachedIOFileHandle &foundHandle, DICOMTagTools::ZTUIndex &ztuPosition, MultiFileVolumeList::const_iterator &volumeIt, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
Returns position and file handle of the first frame in the first volume with the given SOPInstanceUID...
virtual ~MultiFileVolumeList()
Destructor.
MLErrorCode writeResultCache(const std::string &fileNameInput, const std::string &cachePathInput, const bool useRelativePaths, const bool writeSingleVolumeCaches, ProgressLogger *progressLogger) const
Writes all information into the cache file in the cache file directory.
MultiFileVolumeList(const MultiFileVolumeList &ref)
Copy constructor.
MLErrorCode setFromString(const std::string &state, const std::string &cacheDirPath, ProgressCB progressCB=nullptr, void *userData=nullptr, const float startPercentage=0.0f, const float percentageRange=1.0f, std::list< std::string > *cacheFileList=nullptr, DicomMessageCollector *dcmMsgCollector=nullptr)
Reads the state of this from the string state; returns ML_RESULT_OK on successful load and false on f...
MultiFileVolumeList & operator=(const MultiFileVolumeList &ref)
Assignment operator *creating copied duplicates from ref).
MLErrorCode loadResultCacheIntoVolumeList(const std::string &sourceFileName, const std::string &cacheDirPath, bool *volumeListChanged=nullptr, ProgressCB progressCB=nullptr, void *userData=nullptr, const float startPercentage=0.0f, const float percentageRange=1.0f, std::list< std::string > *cacheFileList=nullptr, DicomMessageCollector *dcmMsgCollector=nullptr)
Reload all information from the cache file in the cache file directory into *this.
void sortVolumes(MultiFileVolumeListSort::SortModes sortMode, bool sortUpwards, MLint rawTagId, bool useNumericTagStringValueSorting)
Sorts the volume list according the given sort criteria sortMode; see MultiFileVolumeListSort for det...
static std::string getResultCacheFileName(const std::string &fileNameInput, const std::string &cachePathInput, std::string &fileName, std::string &cacheDirPath, const MLint fileIndex=-1)
Returns the full name path of the result cache file.
bool searchFrameWithValueInTag(unsigned int tagId, const std::string &tagValue, DICOMCachedIOFileHandle &foundHandle, DICOMTagTools::ZTUIndex &ztuPosition, MultiFileVolumeList::const_iterator &volumeIt, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
Returns file handle and position of the first frame in the first volume with tagValue in a tag with i...
std::string getIssues(const DicomMessageCollector *dcmMsgCollector=nullptr) const
Returns a collected string with all issues; requires that issues have been set up before.
MLErrorCode loadResultCache(const std::string &fileNameInput, const std::string &cachePathInput, ProgressLogger *progressLogger, bool &volumeListChanged, ProgressCB progressCallback, void *userData)
Reload all information from the cache file in the cache file directory into the internal volume list ...
static MLErrorCode clearResultCacheFiles(const std::string &fileNameInput, const std::string &cachePathInput, ProgressLogger *progressLogger=nullptr, RemoveUserFileCB userFileDeleter=nullptr)
Clear all files from the cache containing result volume files in the cache file directory.
MLErrorCode loadMultiFileVolumeListCache(const std::string &fileName, bool *volumeListChanged=nullptr, ProgressCB progressCB=nullptr, void *userData=nullptr, const float startPercentage=0.0f, const float percentageRange=1.0f, std::list< std::string > *cacheFileList=nullptr)
Alternative load routine for a MultiFileVolume(List) from a cache file which first splits fileName to...
void RemoveUserFileCB(const size_t volumeIndex, const std::string &validCacheDir, const std::string &validCacheFileName)
A function callback which removes a user added cache file related to a volume which is stored in the ...
Management class used by DirectDicomImport to create, represent and describe volumes composed of mult...
Configurable logger and progress handler class which can be used as base class for logging,...
MLint32 MLErrorCode
Type of an ML Error code.
Header of FileHandle class which should be used in DICOM importing modules to resolve the filename fo...
Class implementing some search functionality on MultiFileVolumeLists.
Tool class to sort MultiFileVolumeLists according to specific properties.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
std::multimap< unsigned int, std::string > TSearchTerm
Typedef to define filter criteria to filter the list of volume references e.g.