15#include <FMEThirdPartyWarningsDisable.h>
21#include <FMEThirdPartyWarningsRestore.h>
29class DicomMessageCollector;
32namespace DICOMTagTools{
53 const std::string &info,
60 const std::string& validCacheDir,
61 const std::string& validCacheFileName);
91 bool useNumericTagStringValueSorting);
95 std::string sopInstanceUID)
const;
100 std::vector<MLuint32>& outVolumeIds,
102 bool searchAnyValue)
const;
116 std::string &currCacheState,
117 bool useRelativePaths,
118 const std::string &optionalFilePrefix=
"")
const;
146 const std::string &cacheDirPath,
148 void *userData =
nullptr,
149 const float startPercentage = 0.0f,
150 const float percentageRange = 1.0f,
151 std::list<std::string> *cacheFileList =
nullptr,
168 const std::string &cachePathInput,
169 std::string &fileName,
170 std::string &cacheDirPath,
171 const MLint fileIndex=-1);
184 const std::string &cachePathInput,
205 const std::string &cachePathInput,
207 bool &volumeListChanged,
222 const std::string &cachePathInput,
223 const bool useRelativePaths,
224 const bool writeSingleVolumeCaches,
262 const std::string &cacheDirPath,
263 bool *volumeListChanged =
nullptr,
265 void *userData =
nullptr,
266 const float startPercentage = 0.0f,
267 const float percentageRange = 1.0f,
268 std::list<std::string> *cacheFileList =
nullptr,
275 bool *volumeListChanged =
nullptr,
277 void *userData =
nullptr,
278 const float startPercentage = 0.0f,
279 const float percentageRange = 1.0f,
280 std::list<std::string> *cacheFileList =
nullptr);
311 MultiFileVolumeList::const_iterator &volumeIt,
312 bool forceSearchInEnhancedHandles,
313 bool alsoSearchInSMFTrees,
335 const std::string &tagValue,
338 MultiFileVolumeList::const_iterator &volumeIt,
339 bool forceSearchInEnhancedHandles,
340 bool alsoSearchInSMFTrees,
355 const std::string &tagValue,
356 bool forceSearchInEnhancedHandles,
357 bool alsoSearchInSMFTrees,
372 const std::string &tagValue,
373 bool forceSearchInEnhancedHandles,
374 bool alsoSearchInSMFTrees,
407 const std::string &cacheDirPath,
410 const float startPercentage ,
411 const float percentageRange ,
412 std::list<std::string> *cacheFileList ,
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.
SortModes
Possible modes how to reorder the volumes.
MLErrorCode appendToCache(const std::string &cacheDirPath, std::string &currCacheState, bool useRelativePaths, const std::string &optionalFilePrefix="") const
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)
void ProgressCB(void *usrData, const std::string &info, float state)
bool findVolumesByCriteria(TSearchTerm searchTerm, std::vector< MLuint32 > &outVolumeIds, MultiFileVolumeListFind::BooleanOperation booleanOperation, bool searchAnyValue) const
std::set< size_t > searchVolumeIndexesWithValueInTag(unsigned int tagId, const std::string &tagValue, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
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
MLErrorCode clearResultFiles(ProgressLogger *progressLogger=nullptr) const
bool searchFrameWithSOPInstanceUID(const std::string &sopInstanceUID, DICOMCachedIOFileHandle &foundHandle, DICOMTagTools::ZTUIndex &ztuPosition, MultiFileVolumeList::const_iterator &volumeIt, bool forceSearchInEnhancedHandles, bool alsoSearchInSMFTrees, DicomMessageCollector &dcmMsgCollector) const
virtual ~MultiFileVolumeList()
Destructor.
MLErrorCode writeResultCache(const std::string &fileNameInput, const std::string &cachePathInput, const bool useRelativePaths, const bool writeSingleVolumeCaches, ProgressLogger *progressLogger) const
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)
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)
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)
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
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)
static MLErrorCode clearResultCacheFiles(const std::string &fileNameInput, const std::string &cachePathInput, ProgressLogger *progressLogger=nullptr, RemoveUserFileCB userFileDeleter=nullptr)
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)
void RemoveUserFileCB(const size_t volumeIndex, const std::string &validCacheDir, const std::string &validCacheFileName)
MLint32 MLErrorCode
Type of an ML Error code.
Class implementing some search functionality on MultiFileVolumeLists.
Tool class to sort MultiFileVolumeLists according to specific properties.
DICOMCachedIOFileHandleBase< char > DICOMCachedIOFileHandle
"Forward" to DICOMCachedIOFileHandle.
MultiFileVolumeList DirectDicomImportOutVolumeList
For backward compatibility to DirectDicomImport applications:
std::multimap< unsigned int, std::string > TSearchTerm