MeVisLab Toolbox Reference
mlMultiFileVolumeListREGOutput.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
6
12*/
13//----------------------------------------------------------------------------------
14#pragma once
15
16// Base class of output module, already being a MultiFileVolumeListImageOutput.
18
19ML_START_NAMESPACE
20
21// Forward to internally used classes.
22class MultiFileVolume;
23
24//----------------------------------------------------------------------------------
27//----------------------------------------------------------------------------------
29{
30public:
32 MultiFileVolumeListREGOutput(int numInputs=0, int numOutputs=0);
33
36
40 std::string contentLabel;
42 std::string contentDescription;
47 };
48
50 struct REGMatrix {
52 std::string matrixType;
54 std::string matrixValue;
56 std::pair<bool, Matrix4> conversionResult=std::pair<bool, Matrix4>(false, Matrix4(0.));
57 };
58
62 std::vector<REGMatrix> regMatrixVector;
63
66 };
67
69 typedef std::vector< REGMatrixVector > REGMatrixGrid;
70
71protected:
72
74 void activateAttachments() override;
75
77 void handleNotification(Field *field) override;
78
82
83private:
84
86 void _initializeFieldsAndMembers();
87
89 void _resetLoadedMembers();
90
92 std::pair<bool, std::string> _getOverviewIntro(DCMTree::Const_TreePtr dcmTree) const;
93
95 std::pair<std::string, OverallTabTags> _getOverallTabTagFields(DCMTree::Const_TreePtr dcmTree) const;
96
98 std::pair<std::string, REGMatrixGrid> _getDCMTreeInfos(DCMTree::Const_TreePtr dcmTree) const;
99
103 std::pair<bool, Matrix4> _getConvertedMatrix(std::string matrixStr) const;
104
108 REGMatrixGrid _convertREGMatrixGrid(REGMatrixGrid regMatrixGrid) const;
109
111 Matrix4 _transposeIfSelected(const Matrix4 &matrix) const;
112
114 REGMatrixVector _calculateConcatenatedMatrices(const REGMatrixGrid &regMatrixGrid) const;
115
117 void _setOverallTabTagFields(const OverallTabTags &overallTabTagValues);
118
120 void _setREGMatrixGridFields(const REGMatrixGrid &regMatrixGrid);
121
123 void _setConcatenatedMatrixFields(const REGMatrixVector &matrixGrid);
124
125 // Input fields:
127 BoolField *_transposeMatricesFld;
128
129 // Output fields:
131 StringField *_infoFld;
132
133 // Top level segmentation tags:
135 StringField *_contentLabelFld;
136
138 StringField *_contentDescriptionFld;
139
141 StringField *_contentCreatorsNameFld;
142
144 StringField *_derivationDescriptionFld;
145
147 static const size_t NumRegSequenceEntriesFields = 3;
148
150 StringField *_frameOfReferenceUIDFld[NumRegSequenceEntriesFields];
151
153 static const size_t NumMatrixFields = 3;
154
156 Matrix4Field *_matrixValuesFld[NumRegSequenceEntriesFields][NumMatrixFields];
157
159 StringField *_matrixTypeFld[NumRegSequenceEntriesFields][NumMatrixFields];
160
162 BoolField *_matrixValidFld[NumRegSequenceEntriesFields][NumMatrixFields];
163
165 Matrix4Field *_concatenatedMatrixValuesFld[NumRegSequenceEntriesFields];
166
168 BoolField *_concatenatedMatrixValidFld[NumRegSequenceEntriesFields];
169
171 BaseField *_outputCurrentRegistrationSequenceTreeFld;
172
175 NotifyField *_updateREGOutputInformationDoneFld;
176
179};
180
181ML_END_NAMESPACE
182
#define MLDIRECTDICOMIMPORTOUTPUTS_EXPORT
DLL export macro definition.
MultiFileVolumeListImageOutput(int numInputs=0, int numOutputs=2, bool autoInstallTagDumpFieldAddOn=true, bool installInputAccessConnector=true, bool installInputMessageFilterPlugin=true, bool installOutputAccessConnector=true)
void _updateVolumeInformation(MultiFileVolume *currVol) override
MultiFileVolumeListREGOutput(int numInputs=0, int numOutputs=0)
Constructor.
~MultiFileVolumeListREGOutput() override
Destructor.
void handleNotification(Field *field) override
Handles changes of fields.
std::vector< REGMatrixVector > REGMatrixGrid
The type of a list of all matrix values from all Registration sequence entries.
void activateAttachments() override
Called after changes of fields without handleNotification calls.
#define ML_MODULE_CLASS_HEADER(className)
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:67
Tmat4< MLdouble > Matrix4
The standard 4x4 matrix of type double.
Definition mlMatrix4.h:713
std::string contentLabel
Value extracted from same named DICOM tag.
std::string derivationDescription
Value extracted from same named DICOM tag.
std::string contentCreatorsName
Value extracted from same named DICOM tag.
std::string contentDescription
Value extracted from same named DICOM tag.
The Vector type representing matrices of one Registration sequence entries.
std::vector< REGMatrix > regMatrixVector
The matrices from the Matrix Sequence.
std::string frameOfReferenceUID
The FrameOfReferenceUID if available, otherwise empty.
std::string matrixType
The type of the matrix (RIGID, RIGID_SCALE, AFFINE).
std::pair< bool, Matrix4 > conversionResult
The result from string to Matrix4 conversion.