MeVisLab Toolbox Reference
mlFileListToolsFileList.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
10//----------------------------------------------------------------------------------
11#pragma once
12
14
15// For input filtering and file attributes.
18
19// Used for caching pointers to already loaded DICOM trees.
21
22// Logging and updating class.
23#include <mlProgressLogger.h>
24
25// ML includes
26#include <mlTypeDefs.h>
27#include <FMEThirdPartyWarningsDisable.h>
28#include <map>
29#include <string>
30#include <vector>
31#include <FMEThirdPartyWarningsRestore.h>
32
33// DCMTree tree prototypes.
34#include "DCMTree_Lib.h"
35
36
37ML_START_NAMESPACE
38
39namespace FileListTools {
40
41//----------------------------------------------------------------------------------
43//----------------------------------------------------------------------------------
45{
46public:
47
50
52 typedef std::map< std::string, const FileAttribute* > FileAttributeMapReferenced;
53
55 typedef std::vector< FileAttributeMapReferenced > FileAttributeMaps;
56
57
60 FileList(const FileListFilterPluginBase *filterPlugin);
61
64 FileList(const FileList &fileList, size_t fileListIdx);
65
67 virtual ~FileList(){};
68
71
74
77
80
83
86 FileAttribute &getAttributesForFile(const std::string &fileName);
87
90 const FileAttribute *getAttributesForFile(const std::string &fileName) const;
91
100 std::vector<std::string> getFileNameList(bool onlyPassed, MLuint32 fileTypeMaskMask, MLuint32 noFileTypeMaskMask) const;
101
103 enum {
105 };
106
109
112
140 virtual bool setUpFilesToImport(ProgressLogger *progressLogger,
141 const std::string &frameSourcesDir,
142 const std::vector<std::string> &suppressedFilesAndSuffixes,
143 const std::vector<std::string> &explicitFileTypes,
144 const std::vector<std::string> &additionalFiles,
145 bool recursively,
146 bool decomposeMultiFrames,
147 float progressMinimum,
148 float progressMaximum,
149 DicomMessageCollector &dcmMsgCollector,
150 bool filterDecomposedFrames=false);
151
152protected:
153
154 // Methods:
155
166 DicomMessageCollector &dcmMsgCollector,
167 bool filterDecomposedFrames);
168
193 virtual void _addFile(const std::string &fullFileNamePathToAdd,
194 const std::vector<std::string> &suppressedFilesAndSuffixes,
195 const std::vector<std::string> &explicitFileTypes,
196 bool decomposeMultiFrames,
197 bool checkForTiffDcm,
198 DicomMessageCollector &dcmMsgCollector,
199 bool filterDecomposedFrames);
200
205
209
210 // Members:
213
217
220
223};
224
225}; // end namespace FileListTools.
226
229
230ML_END_NAMESPACE
#define MLFILE_LIST_TOOLS_EXPORT
DLL export macro definition.
Class to collect messages and errors related to a given frame handle.
A base class for plugins which can be used by file list importers to filter and classify files.
std::map< std::string, FileListTools::FileAttribute > FileAttributeMap
A map type assigning an attribute container to file paths.
A tool class to manage a list of file/frame names/urls associated with attributes.
virtual bool setUpFilesToImport(ProgressLogger *progressLogger, const std::string &frameSourcesDir, const std::vector< std::string > &suppressedFilesAndSuffixes, const std::vector< std::string > &explicitFileTypes, const std::vector< std::string > &additionalFiles, bool recursively, bool decomposeMultiFrames, float progressMinimum, float progressMaximum, DicomMessageCollector &dcmMsgCollector, bool filterDecomposedFrames=false)
std::vector< std::string > getFileNameList(bool onlyPassed, MLuint32 fileTypeMaskMask, MLuint32 noFileTypeMaskMask) const
const FileAttributeMaps & getGroupedFileAttributeMaps() const
Get the _groupedFileAttributeMaps as constant object.
void setDicomImportFlags(MLint64 flags)
Set dedicated flags influencing the import of DICOM files. For supported bits see CopyFullFunctionalG...
FileAttributeMap _fileAttributeMap
The map storing the imported file names associated with filter attributes.
FileList(const FileListFilterPluginBase *filterPlugin)
FileAttribute & getAttributesForFile(const std::string &fileName)
void reset()
Restore construction state.
virtual void _addFile(const std::string &fullFileNamePathToAdd, const std::vector< std::string > &suppressedFilesAndSuffixes, const std::vector< std::string > &explicitFileTypes, bool decomposeMultiFrames, bool checkForTiffDcm, DicomMessageCollector &dcmMsgCollector, bool filterDecomposedFrames)
FileAttributeMap & getFileAttributeMap()
Get the _fileAttributeMap as modifiable object.
const FileAttributeMap & getFileAttributeMap() const
Get the _fileAttributeMap as constant object.
FileListFilterPluginBase::FileAttributeMap FileAttributeMap
A map type assigning an attribute container to file paths.
const FileListFilterPluginBase * _filterPlugin
If available this points to the filter plugin connected to the DirectDicomImport module,...
const FileAttribute * getAttributesForFile(const std::string &fileName) const
bool _doMultiFrameDecomposition(FileAttribute &fileAttributes, DicomMessageCollector &dcmMsgCollector, bool filterDecomposedFrames)
virtual ~FileList()
Currently no destructor is needed, however, it should be virtual.
const FileListFilterPluginBase * getConstFilterPlugin() const
If available this points to the filter plugin connected to the DirectDicomImport module,...
std::vector< FileAttributeMapReferenced > FileAttributeMaps
A vector of FileAttributeMapReferenced.
FileList(const FileList &fileList, size_t fileListIdx)
std::map< std::string, const FileAttribute * > FileAttributeMapReferenced
A map type assigning references to attribute container to file paths.
MLint64 getDicomImportFlags() const
Set dedicated flags influencing the import of DICOM files.
MLint64 _dicomImportFlags
Flags interpreted by the DICOM loader.
A base class for plugins which can be used by file list importers to filter and classify files.
unsigned int MLuint32
Definition mlTypeDefs.h:184
INT64 MLint64
Include 64-bit integer support for Windows or Unix.
Definition mlTypeDefs.h:411
FileListTools::FileList DirectDicomImportFileList
For backward compatibility: