MeVisLab Toolbox Reference
mlDICOMFileListFilter.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
7 
12 //----------------------------------------------------------------------------------
13 #pragma once
14 
15 #include <MLFileListToolsSystem.h>
16 #include <mlModuleIncludes.h>
17 #include <mlProgressLogger.h>
18 
19 ML_START_NAMESPACE
20 
21 // Forward to internally used class.
22 namespace FileListTools {
23  class FileList;
24 }
25 
26 //----------------------------------------------------------------------------------
30 //----------------------------------------------------------------------------------
32 {
33 public:
34 
37 
38 protected:
39 
41  void activateAttachments() override;
42 
45  void handleNotification(Field *field) override;
46 
49  void updateProgressIndicator(const std::string &info, float percState) override;
50 
51 private:
53  void _resetOutputs();
54 
61  void _setUpSuppressedAndExplicitFileTypes(std::vector<std::string>& suppressedFilesAndTypes,
62  std::vector<std::string>& explicitFileTypes);
63 
69  void _determineListOfFoundPaths(const FileListTools::FileList &fileList,
70  std::vector<std::string> &resultPaths);
71 
73  void _makePathsRelative(std::vector<std::string> &pathList);
74 
76  void _displayFileList(const std::vector<std::string> &fileNameVector);
77 
79  static bool _interruptCheckCB(void *userData);
80 
83  bool _scanForFiles(FileListTools::FileList &fileList);
84 
86  void _doSearch();
87 
88  // Input fields:
90  StringField *_directoryPathFld;
91 
93  BoolField *_createRelativePathsFld;
94 
96  BoolField *_searchInSubDirectoriesFld;
97 
99  BoolField *_searchPureDICOMsFld;
100 
102  BoolField *_searchDCMTiffsFld;
103 
105  BoolField *_searchMLImagesFld;
106 
109  BoolField *_logFileScanMessagesFld;
110 
113  // insensitively.
114  StringField *_suppressedFilesAndSuffixesFld;
115 
117  BaseField *_fileListFilterPluginsFld;
118 
120  NotifyField *_startSearchFld;
121 
123  NotifyField *_stopFld;
124 
125  // Output fields:
127  StringField *_foundFileNamesFld;
128 
130  StringField *_statusFld;
131 
133  BoolField *_isScanningFld;
134 
137 
138 };
139 
140 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLFILE_LIST_TOOLS_EXPORT
DLL export macro definition.
Field to encapsulate a pointer to an ML base object.
Definition: mlFields.h:1187
Field to encapsulate a boolean value.
Definition: mlFields.h:62
An ML module which searches files containing DICOM information, passes them through possibly connecte...
void updateProgressIndicator(const std::string &info, float percState) override
Overwrites ProgressLogger version to be called by time consuming processes to show current progress s...
DICOMFileListFilter()
Constructor. Input and out images are probably not used.
void handleNotification(Field *field) override
Handle field changes of the field field, typically of the input field where changes are passes as not...
void activateAttachments() override
Update internal state after field reload or clone..
Base class for all fields used in the ML.
Definition: mlField.h:73
A tool class to manage a list of file/frame names/urls associated with attributes.
Base class for an image processing module of the ML.
Definition: mlModule.h:156
Field without value for notifications.
Definition: mlFields.h:1049
Configurable logger and progress handler class which can be used as base class for logging,...
Field to encapsulate a string value.
Definition: mlFields.h:1000
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
Configurable logger and progress handler class which can be used as base class for logging,...
Namespace containing a number of tools and classes to scan directories for files, assign attributes t...