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
21
23#include "DPL_TypeDefs.h"
24
25namespace DPL {
26 class Processor;
27 class Configuration;
28 class ErrorInfo;
29 class ProcessingResult;
30 class Image;
31}
32
33ML_START_NAMESPACE
34
35// Forward to internally used classes.
36class DirectDicomImport;
37class MultiFileVolume;
38namespace FileListTools {
39 class FileList;
40}
41
42//----------------------------------------------------------------------------------
45//----------------------------------------------------------------------------------
47
48 public:
49
52
55
59 void appendFields(FieldContainer &fieldContainer) override;
60
62 void handleNotification(Field &field) override;
63
65 virtual bool scanRecursively() const;
66
68 virtual bool decomposeMultiFrames() const;
69
72
75 void import(const FileListTools::FileList &fileList) override;
76
79
82
83 protected:
85
87 const std::string &_getImportFilterProcessingSettings() const;
88
90 void _setImportFilterProcessingSettings(const std::string &procSettings);
91
94 bool _doArgumentAndOverrideCheck(bool dplFlag,
95 const std::string &overrideName) const;
96
99 std::vector<DirectDicomImportDPLTagValueProvider::HardOverwriteTag> _getHardOverwriteTags();
100
104
108
109 private:
110
112 EnumField *_calcMinMaxDPLFld=nullptr;
113
115 BoolField *_dplAnonFld=nullptr;
116
118 EnumField *_dplVerboseFld=nullptr;
119
121 EnumField *_dplSpecialProcessorsFld=nullptr;
122
129 IntField *_minimumNumFramesInVolumeFld=nullptr;
130
133
135 EnumField *_dplUsedConfigFld=nullptr;
136
138 DoubleField *_dplRelativeDistanceToleranceFld=nullptr;
139
141 DoubleField *_dplAbsoluteDistanceToleranceFld=nullptr;
142
144 DoubleField *_dplPositionToleranceMMFld=nullptr;
145
151 BoolField *_dplSetSeriesBasedPreprocessingConditionFld=nullptr;
152
154 StringField *_dplSetForce2DPlusTConditionFld=nullptr;
155
157 BoolField *_dplLogPartingAndSortingInformationOnFld=nullptr;
158
161 BoolField *_dplScanRecursivelyFld=nullptr;
162
165 BoolField *_decomposeMultiFrameFilesFld=nullptr;
166
169 BoolField *_copyFullFunctionalGroupSequencesFld=nullptr;
170
174 BoolField *_removePrivateMFSQTagFld=nullptr;
175
180 BoolField *_forceOrthogonalWorldMatrixFld=nullptr;
181
185 BoolField *_dplDecomposeTo3DVolumesFld=nullptr;
186
197 BoolField *_allowMixedPixelTypesFld=nullptr;
198
204 BoolField *_copyPrivateTopLevelSourceTagsFld=nullptr;
205
210 BoolField *_disableDCMTreeNormalizationFld=nullptr;
211
216 BoolField *_keepTopLevelOfDCMTreeNormalizationFld=nullptr;
217
227 BoolField *_autoCreateMissingPrivateCreatorsFld=nullptr;
228
233 BoolField *_doNotModifySMFTreeFld=nullptr;
234
236 enum { NUM_HARD_OVERWRITE_TAGS = 4 } HardOverWriteNumtags;
237
239 BoolField *_dplHardOverwriteTagOnFld[NUM_HARD_OVERWRITE_TAGS]={nullptr};
240
242 StringField *_dplHardOverwriteTagIdFld[NUM_HARD_OVERWRITE_TAGS]={nullptr};
243
245 StringField *_dplHardOverwriteTagStrFld[NUM_HARD_OVERWRITE_TAGS]={nullptr};
246
248 bool _dplHardOverwriteIds[NUM_HARD_OVERWRITE_TAGS]={false};
249
251 EnumField *_dplAllowSortingAccordingToDimensionIndexValuesFld={nullptr};
252
254 StringField *_dplWorkaroundValueForImageOrientationPatientTagFld=nullptr;
255
257 void _logProcessingTags(DPL::Processor& processor, DPL::ErrorInfo* error );
258
262 void _prefetchTags(const FileListTools::FileList &fileList,
263 std::vector<std::string> &goodDICOMFileHandles);
264
266
267 DirectDicomImportDPLImporter();
268 DirectDicomImportDPLImporter(const DirectDicomImportDPLImporter&);
269 DirectDicomImportDPLImporter &operator=(const DirectDicomImportDPLImporter&);
271
273 void _setUpTagValueProvider(DirectDicomImportDPLTagValueProvider &tagValueProvider);
274
276 ImageToMultiFileVolumeConversionParameters _getConversionParameters();
277
279 DirectDicomImportDPLLogger _dplLogger;
280
282 FileListTools::DPLConfiguration _configManager;
283
286 std::string _importFilterProcessingSettings;
287};
288
289ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDIRECTDICOMIMPORT_EXPORT
Only for diagnostic purposes.
Field to encapsulate a boolean value.
Definition mlFields.h:56
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...
void appendFields(FieldContainer &fieldContainer) override
Appends all parameter fields related to DPL import to fieldContainer.
std::vector< DirectDicomImportDPLTagValueProvider::HardOverwriteTag > _getHardOverwriteTags()
Returns a vector of hardOverwrite tags either from input filter settings or from the DPL importer fie...
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.
DirectDicomImportDPLLogger & getDPLLogger()
Returns the used DPL logger instance.
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.
const std::string & _getImportFilterProcessingSettings() const
Returns the externally provided processing settings for the currently processed volume.
Extended DPL logger class redirecting messages from the DPL to a DirectDicomImport instance.
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:494
Field to encapsulate an enumerated value.
Definition mlFields.h:173
Defines the class FieldContainer to encapsulate a vector of fields (see class Field).
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.
Field to encapsulate an integer value.
Definition mlFields.h:117
Field to encapsulate a string value.
Definition mlFields.h:553
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 ...
Parameters used to convert a DPLImage to MultiFileVolumes.
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.