MeVisLab Toolbox Reference
mlDicomModifyTreeAndImage.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
15#include "MLDicomModifySystem.h"
16
17// ML basics.
18#include <mlModuleIncludes.h>
19
20// Base input for a DicomModifyList or derived object.
21#include <mlDicomModifyList.h>
22
23// Reference-counted DCMTree.
24#include <mlMutableDicomTree.h>
25
28
29// AddOn for DicomTagDumps.
31
33
34//----------------------------------------------------------------------------------
37//----------------------------------------------------------------------------------
39{
40public:
41
48
49protected:
50
52 void activateAttachments() override;
53
56
59
61 Module::INPUT_HANDLE handleInput(int /*inputIndex*/, INPUT_STATE /*state*/) const override;
62
65
81 DicomMessageCollector &dcmMsgCollector);
82
85
86private:
87
90 enum InputSourceSelector {
91 // Image and DICOM tree sources:
92 ImageInput0 = 0,
93 ImageInput1,
94
95 // Additional sources only for DICOM Tree:
96 DicomTreeInput
98 };
99
101 enum { NumInputSourceSelectors = DicomTreeInput+1 };
102
104 static const char * const InputSourceSelectorStrings[NumInputSourceSelectors];
105
107 enum { NumImageDataSourceSelectors = ImageInput1+1 };
108
109
112 enum PixelDataChangeModes {
113 DoNotChangePixelData = 0,
114 RemovePixelData,
115 SetPixelData
116 };
117
119 enum { NumPixelDataChangeModes = SetPixelData+1 };
120
122 static const char * const PixelDataChangeModeStrings[NumPixelDataChangeModes];
123
124
126 TreeAndVolumeInputFieldAddOn _dcmTreeInputFieldAddOn;
127
129 DicomTagDumpFieldAddOn _dicomTagDumpFieldAddOn;
130
131
134 EnumField *_imageDataSourceSelectorFld;
135
137 BaseField *_inputDicomModifierFld;
138
140 EnumField *_removePixelDataFld;
141
143 BaseField *_outputDicomTreeFld;
144
146 DCMTree::Const_TreePtr _inputDCMTree;
147
149 MutableDicomTreePtr _inputDCMTreeCopy;
150
152 bool _treeIsModified;
153
155 ML_MODULE_CLASS_HEADER(DicomModifyTreeAndImage);
156
157};
158
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
Class to collect messages and errors related to a given frame handle.
ML module class DicomModifyTreeAndImage for composing and decomposing MLImages with DICOM trees as we...
DicomModifyTreeAndImage()
Constructor: Input 1: Original input image bypassed to first output.
void calculateOutputImageProperties(int outIndex, PagedImage *outImg) override
Sets properties of the output image at output outIndex.
void handleNotification(Field *field) override
Handles field changes.
Module::INPUT_HANDLE handleInput(int, INPUT_STATE) const override
Sets the second input as optional.
void _appendPixelDataToDCMTree(DCMTree::TreePtr dcmTree, bool skipIfNoImageData, DicomMessageCollector &dcmMsgCollector)
Append the pixel data of a selected input image connector to the pixel data and return an empty strin...
void _updateOutputInformationFields()
Updates information output fields.
void _updateInputDCMTree()
Gets a DCMTree from the selected input or a nullptr tree if that is not available or empty.
void activateAttachments() override
Handles changes which were applied without notifications.
Base class for all fields used in the ML.
Definition mlField.h:73
Base class for an image processing module of the ML.
Definition mlModule.h:151
INPUT_HANDLE
See documentation of handleInput.
Definition mlModule.h:323
INPUT_STATE
See documentation of handleInput.
Definition mlModule.h:315
Class which represents an image, which manages properties of an image and image data which is located...
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
Header file of a class which manages a list of DicomModifyBase objects and an input which allows the ...
Header file for the DicomTagDumpFieldAddOn which manages fields to show and handle a DICOM tree tag d...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Header file of a FieldAddOn managing fields and functionality for a multi- purpose input connector fo...
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:72