MeVisLab Toolbox Reference
mlDirectDicomImportDPLImporter.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
6 
11 //----------------------------------------------------------------------------------
12 #pragma once
13 
14 // Local includes
20 
22 #include "DPL_TypeDefs.h"
23 
24 namespace DPL {
25  class Processor;
26  class Configuration;
27  class ErrorInfo;
28  class ProcessingResult;
29  class Image;
30 }
31 
32 ML_START_NAMESPACE
33 
34 // Forward to internally used classes.
35 class DirectDicomImport;
36 class MultiFileVolume;
37 namespace FileListTools {
38  class FileList;
39 }
40 namespace DirectDicomImportDPLImageToMultiFileVolume{
41  struct ConversionParameters;
42 }
43 
44 //----------------------------------------------------------------------------------
47 //----------------------------------------------------------------------------------
49 
50  public:
51 
54 
57 
61  void appendFields(FieldContainer &fieldContainer) override;
62 
64  void handleNotification(Field &field) override;
65 
67  virtual bool scanRecursively() const;
68 
70  virtual bool decomposeMultiFrames() const;
71 
73  virtual bool copyFullFunctionalGroupSequences() const;
74 
77  void import(const FileListTools::FileList &fileList) override;
78 
81 
84 
85  protected:
87 
89  const std::string &_getImportFilterProcessingSettings() const;
90 
92  void _setImportFilterProcessingSettings(const std::string &procSettings);
93 
96  bool _doArgumentAndOverrideCheck(bool dplFlag,
97  const std::string &overrideName) const;
98 
101  std::vector<DirectDicomImportDPLTagValueProvider::HardOverwriteTag> _getHardOverwriteTags();
102 
106 
110 
111  private:
112 
114  EnumField *_calcMinMaxDPLFld;
115 
117  BoolField *_dplAnonFld;
118 
120  EnumField *_dplVerboseFld;
121 
123  EnumField *_dplSpecialProcessorsFld;
124 
131  IntField *_minimumNumFramesInVolumeFld;
132 
135 
137  EnumField *_dplUsedConfigFld;
138 
140  DoubleField *_dplRelativeDistanceToleranceFld;
141 
143  DoubleField *_dplAbsoluteDistanceToleranceFld;
144 
146  DoubleField *_dplPositionToleranceMMFld;
147 
153  BoolField *_dplSetSeriesBasedPreprocessingConditionFld;
154 
156  StringField *_dplSetForce2DPlusTConditionFld;
157 
159  BoolField *_dplLogPartingAndSortingInformationOnFld;
160 
163  BoolField *_dplScanRecursivelyFld;
164 
167  BoolField *_decomposeMultiFrameFilesFld;
168 
171  BoolField *_copyFullFunctionalGroupSequencesFld;
172 
176  BoolField *_removePrivateMFSQTagFld;
177 
182  BoolField *_forceOrthogonalWorldMatrixFld;
183 
187  BoolField *_dplDecomposeTo3DVolumesFld;
188 
199  BoolField *_allowMixedPixelTypesFld;
200 
206  BoolField *_copyPrivateTopLevelSourceTagsFld;
207 
209  enum { NUM_HARD_OVERWRITE_TAGS = 4 } HardOverWriteNumtags;
210 
212  BoolField *_dplHardOverwriteTagOnFld[NUM_HARD_OVERWRITE_TAGS];
213 
215  StringField *_dplHardOverwriteTagIdFld[NUM_HARD_OVERWRITE_TAGS];
216 
218  StringField *_dplHardOverwriteTagStrFld[NUM_HARD_OVERWRITE_TAGS];
219 
221  bool _dplHardOverwriteIds[NUM_HARD_OVERWRITE_TAGS];
222 
224  EnumField *_dplAllowSortingAccordingToDimensionIndexValuesFld;
225 
227  StringField *_dplWorkaroundValueForImageOrientationPatientTagFld;
228 
230  void _logProcessingTags(DPL::Processor& processor, DPL::ErrorInfo* error );
231 
235  void _prefetchTags(const FileListTools::FileList &fileList,
236  std::vector<std::string> &goodDICOMFileHandles);
237 
239 
244 
246  void _setUpTagValueProvider(DirectDicomImportDPLTagValueProvider &tagValueProvider);
247 
250 
252  DirectDicomImportDPLLogger _dplLogger;
253 
255  FileListTools::DPLConfiguration _configManager;
256 
259  std::string _importFilterProcessingSettings;
260 };
261 
262 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDIRECTDICOMIMPORT_EXPORT
Only for diagnostic purposes.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Class handling all DICOM Processor Library Import (DPL) stuff for the DirectDicomImport module.
void _setImportFilterProcessingSettings(const std::string &procSettings)
Returns the externally provided processing settings for the currently processed volume.
virtual bool copyFullFunctionalGroupSequences() const
Returns true if functional group sequences shall fully be copied during enhanced multi-frame decompos...
const std::string & _getImportFilterProcessingSettings() const
Returns the externally provided processing settings for the currently processed volume.
DirectDicomImportDPLLogger & getDPLLogger()
Returns the used DPL logger instance.
std::vector< DirectDicomImportDPLTagValueProvider::HardOverwriteTag > _getHardOverwriteTags()
Returns a vector of hardOverwrite tags either from input filter settings or from the DPL importer fie...
void appendFields(FieldContainer &fieldContainer) override
Appends all parameter fields related to DPL import to fieldContainer.
virtual bool decomposeMultiFrames() const
Returns true if (DICOM multi-frame) files shall be decomposed to single frames during imports,...
EnumField & getDplSpecialProcessorsFld() const
Provides access to some fields used outside.
std::string _getForce2DPlusTCondition()
Determines the force2DPlusTCondition either from input filters or from DPL fields; it is used by the ...
bool _doArgumentAndOverrideCheck(bool dplFlag, const std::string &overrideName) const
If overrideName is defined as 0 or non 0 in getImportFilterProcessingSettings(), then false or true i...
DicomToMLTools::CalculateMinMaxFromDicomModes _getUsedMinMaxScanMode()
Returns the used mode for the min/max calculations from input filters and field settings.
void handleNotification(Field &field) override
Handles all field changes related to fields created in appendDPLArgumentFields().
virtual bool scanRecursively() const
Returns true if settings require a recursive directory scan, otherwise it returns false for a flat sc...
DirectDicomImportDPLImporter(DirectDicomImport &ddiOp)
Constructor using a DirectDicomImport instance associated with.
~DirectDicomImportDPLImporter() override
Destructor.
Extended DPL logger class redirecting messages from the DPL to a DirectDicomImport instance.
An DPL::TagValueProvider class for the DirectDicomImport module.
Base importer class for the DirectDicomImport module.
Imports image files directly from DICOM or other file types without an intermediate representation.
Field to encapsulate a double value.
Definition: mlFields.h:806
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Base class for all fields used in the ML.
Definition: mlField.h:73
Manages some DPL (DICOM Processing Library) configurations which control sorting and partitioning of ...
A tool class to manage a list of file/frame names/urls associated with attributes.
Field to encapsulate an integer value.
Definition: mlFields.h:161
Field to encapsulate a string value.
Definition: mlFields.h:1000
Extended DPL logger class redirecting messages from the DPL to a DirectDicomImport instance.
Extended DPL TagValueProvider class for the ML module class DirectDicomImport.
Base importer class for the DirectDicomImport module.
Manages some DPL (DICOM Processing Library) configurations which control sorting and partitioning of ...
Forward and includes of internally used DPL classes.
Namespace containing a number of tools and classes to scan directories for files, assign attributes t...
CalculateMinMaxFromDicomModes
Available selectable DPL configurations.
Container for all parameters needed to convert a DPL::Image to MultiFileVolume(s).