MeVisLab Toolbox Reference
mlDicomTreeCompare.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 #include "MLDicomAnalysisSystem.h"
15 #include <mlModuleIncludes.h>
16 #include <DCMTree_Tree.h>
17 
18 ML_START_NAMESPACE
19 
20 //----------------------------------------------------------------------------------
23 //----------------------------------------------------------------------------------
25 public:
26 
29 
31  void activateAttachments() override;
32 
34  void handleNotification(Field *field) override;
35 
36 protected:
37 
40 
43  std::string _getDifferenceDescription(const std::string &givenString,
44  const std::string &expectedString);
45 
55  DCMTree::Const_TreePtr input2Tags,
56  DCMTree::TreePtr unchangedTags,
57  DCMTree::TreePtr addedTags,
58  DCMTree::TreePtr removedTags,
59  DCMTree::TreePtr changedTags);
60 
63 
64 private:
65 
68 
69  // INPUT CONNECTIONS:
71  EnumField *_inputSelectorFld[2];
72 
75  BaseField *_inputBaseFld[2];
76 
78  IntField *_inputVolumeIndexFld[2];
79 
81  IntField *_numVolumesFld[2];
82 
84  StringField *_inputFilePathFld[2];
85 
86 
87  // COMPARSION SETTINGS:
90  StringField *_expectedChangesFld;
91 
95  StringField *_excludeFromChangesFld;
96 
102  BoolField *_postErrorIfDifferenceIsFoundFld;
103 
107  StringField *_errorPostPrefixFld;
108 
111  BoolField *_alsoCompareNumTagValuesFld;
112 
115  BoolField *_compareRecursivelyFld;
116 
119  BoolField *_compareMultiplicityFld;
120 
123  BoolField *_compareMultiFrameDataFld;
124 
126  NotifyField *_setAsExpectedResultFld;
127 
129  EnumField *_updateModeFld;
130 
132  NotifyField *_compareFld;
133 
134 
135  // OUTPUT FIELD SETTINGS:
139  IntField *_tagDumpSizeFld;
140 
142  BoolField *_removeIgnoreIdsInAddedTagsFld;
143 
147  BoolField *_cleanupEmptyTreesInAddedTagsFld;
148 
150  BoolField *_removeIgnoreIdsInRemovedTagsFld;
151 
155  BoolField *_cleanupEmptyTreesInRemovedTagsFld;
156 
157  // OUTPUT FIELDS:
159  StringField *_input1DumpFld;
160 
162  StringField *_input2DumpFld;
163 
165  StringField *_unchangedFld;
166 
168  StringField *_addedFld;
169 
171  StringField *_removedFld;
172 
174  StringField *_changedFld;
175 
177  StringField *_allChangesFld;
178 
181  BoolField *_testPassedFld;
182 
184  BoolField *_clearDICOMCachesBeforeCompareFld;
185 
187  NotifyField *_clearDICOMCachesFld;
188 
190 
193 };
194 
195 ML_END_NAMESPACE
Project global and OS specific declarations.
#define ML_DICOM_ANALYSIS_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
ML module class to compare two DCMTrees, to display the differences and to post errors if the differe...
void _resetResultFields()
Reset result fields to default state.
std::string _updateResultFields(DCMTree::Const_TreePtr input1Tags, DCMTree::Const_TreePtr input2Tags, DCMTree::TreePtr unchangedTags, DCMTree::TreePtr addedTags, DCMTree::TreePtr removedTags, DCMTree::TreePtr changedTags)
Update the result fields according to the current comparison results and display settings.
void activateAttachments() override
Handles changes which were applied without notifications.
void _compare(DCMTree::Const_TreePtr inTree1, DCMTree::Const_TreePtr inTree2)
Compare inTree1 and inTree2 and update the result fields.
void handleNotification(Field *field) override
Handles field changes.
DicomTreeCompare()
Constructor.
std::string _getDifferenceDescription(const std::string &givenString, const std::string &expectedString)
Compares givenString with expectedString and returns "" on equality, otherwise it returns a descripti...
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
Base class for all fields used in the ML.
Definition: mlField.h:73
Field to encapsulate an integer value.
Definition: mlFields.h:161
Base class for an image processing module of the ML.
Definition: mlModule.h:156
Field without value for notifications.
Definition: mlFields.h:1049
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.
boost::shared_ptr< const Tree > Const_TreePtr
Definition: DCMTree_Lib.h:73
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition: DCMTree_Lib.h:70