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
29
30//----------------------------------------------------------------------------------
34//----------------------------------------------------------------------------------
36{
37public:
38
41
42protected:
43
45 void activateAttachments() override;
46
49
52
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
Project global and OS specific declarations.
#define ML_DICOM_MODIFY_EXPORT
DLL export macro definition.
Class to wrap a tag-id.
ML module class ApplyDicomPixelModifiers which provides the modification of an ML image according to ...
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.
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:797
Field to encapsulate a boolean value.
Definition mlFields.h:58
Field to encapsulate an enumerated value.
Definition mlFields.h:195
Base class for all fields used in the ML.
Definition mlField.h:73
A color/gray LUT with sampling points and linear, nearest neighbor or truncated interpolation inbetwe...
Base class for an image processing module of the ML.
Definition mlModule.h:151
Class which represents an image, which manages properties of an image and image data which is located...
This class manages/represents a rectangular 6d image region which is organized linearly in memory.
Definition mlSubImage.h:75
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
A collection of tools related to DICOM palette tags.
Tool class with many tool functions for the conversion of DICOM information and tag values to compara...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
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
std::vector< FrameSpecificTags > FrameSpecificTagsVector
Often used std::vector type of FrameSpecificTag elements.
std::vector< PositionSpecificDouble > PositionSpecificDoubleVector
Often used std::vector type of PositionSpecificDouble elements.
DICOM palette container which is to be used for ML index image to RGB image voxel translation.