MeVisLab Toolbox Reference
mlApplyDicomPixelModifiers.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
7
12//----------------------------------------------------------------------------------
13#pragma once
14
15// Local includes
16#include "MLDicomModifySystem.h"
17
18// ML basics.
19#include <mlModuleIncludes.h>
20
21// General DICOM tag access and conversion tools.
22#include <mlDicomToMLTools.h>
24
25// Include transfer function and look up table class headers.
26#include "mlLUTFLinear.h"
27
28ML_START_NAMESPACE
29
30//----------------------------------------------------------------------------------
34//----------------------------------------------------------------------------------
36{
37public:
38
41
42protected:
43
45 void activateAttachments() override;
46
48 void handleNotification(Field *field) override;
49
51 void calculateOutputImageProperties (int outIndex, PagedImage* outImg) override;
52
54 SubImageBox calculateInputSubImageBox(int inIdx, const SubImageBox &outBox, int outIdx) override;
55
57 void calculateOutputSubImage(SubImage *outSubImg, int outIdx, SubImage *inSubImgs) override;
58
59private:
60
61 //-----------------------------------------------------------------------
62 // Color model conversions according to PhotometricInterpretation tags:
63 //-----------------------------------------------------------------------
68 BoolField *_applyPaletteInformationFld;
69
75 BoolField *_useBestColorTypeFld;
76
78 DICOMTagTools::DicomPaletteInfo _intensityToRGBALUT;
79
83 BoolField *_applyPhotometricInterpretationFld;
84
87
89 bool _hasAtMostOneGridEntry;
90
92 DCMTree::TreePtr _outputDCMTree;
93
95 void _updateLUTOutput();
96
98 BaseField *_outputLUTFld;
99
102 LUTFLinear _outLUT;
103
104
105 //-----------------------------------------------------------------------
106 // RTDose: Frame specific DoseGridScaling tags.
107 //-----------------------------------------------------------------------
108
111 bool _setUpRTDoseProperties(PagedImage &outImg);
112
115 BoolField *_applyDoseGridScalingFld;
116
119
121 EnumField *_rtDoseOutputDataTypeSelectorFld;
122
123 //-----------------------------------------------------------------------
124 // DICOM Rescale / Intercept
125 //-----------------------------------------------------------------------
126
129 bool _setUpRescaleProperties(PagedImage &outImg);
130
133 BoolField *_applyRescaleFld;
134
137
140
142 EnumField *_rescaleOutputDataTypeSelectorFld;
143
144
145 //-----------------------------------------------------------------------
146 // Overlay frames
147 //-----------------------------------------------------------------------
148
151
152 //-----------------------------------------------------------------------
153 // Tag tree adaption
154 //-----------------------------------------------------------------------
161 virtual void adaptDCMTreeTags(DCMTree::TagId tagId,
162 const std::string &newVal);
163
165 BoolField *_adaptTagsFld;
166
169
170};
171
172ML_END_NAMESPACE
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
Class to wrap a tag ID.
void calculateOutputImageProperties(int outIndex, PagedImage *outImg) override
Sets properties of the output image at output outIndex.
void handleNotification(Field *field) override
Handles field changes.
SubImageBox calculateInputSubImageBox(int inIdx, const SubImageBox &outBox, int outIdx) override
Determines box required from the input image for a specific output image.
ApplyDicomPixelModifiers()
Constructor:
void activateAttachments() override
Update field dependent content after restoring fields without notifications.
void calculateOutputSubImage(SubImage *outSubImg, int outIdx, SubImage *inSubImgs) override
Page calculation for the output image.
Module(int numInputImages, int numOutputImages)
friend class PagedImage
Definition mlModule.h:157
#define ML_MODULE_CLASS_HEADER(className)
A collection of tools related to DICOM palette tags.
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:67
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
Definition DCMTree_Lib.h:66
std::vector< FrameSpecificTags > FrameSpecificTagsVector
Often used std::vector type of FrameSpecificTag elements.
std::vector< PositionSpecificDouble > PositionSpecificDoubleVector
Often used std::vector type of PositionSpecificDouble elements.
TSubImageBox< MLint > SubImageBox
Defines the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type...
DICOM palette container which is to be used for ML index image to RGB image voxel translation.