MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
mlDicomSEGSave.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
5
23//----------------------------------------------------------------------------------
24#pragma once
25
26// Local includes
28
29#include <mlModuleIncludes.h>
30#include <mlDicomSaveBase.h>
34
35// DICOM tree etc.
36#include <DCMTree_Tree.h>
37
39
41class BitImage;
42class DicomSEGSaveAddOnPointers;
43
46
47//----------------------------------------------------------------------------------
48// See above.
49//----------------------------------------------------------------------------------
51{
52public:
53
56
58 virtual ~DicomSEGSave();
59
61 enum { NumSEGSaveDerivationModes = 4 };
62
65 Automatic = 0,
66 DerivationImageAndFrameOfReference,
69 OnlyDerivationImage
70 };
71
73 static const char * const SEGSaveDerivationModeStrings[NumSEGSaveDerivationModes];
74
76 const _FieldAddOnListType &getFieldAddOnList() const { return _fieldAddOnList; }
77
78protected:
79
82
85 void activateAttachments() override;
86
89
95
98 std::string _checkConsistency() const override;
99
102
104 void _updateInputState() override;
105
108
117 const BitImage &inputBitImage);
118
129
132
135 std::string _setUpTreeContent() override;
136
138 EnumField *_segSaveDerivationModeFld = nullptr;
139
141 BoolField *_savePaddedPixelDataFld = nullptr;
142
144 BaseField *_inputBitImageFld = nullptr;
145
147 EnumField *_compressionFld = nullptr;
148
150 BoolField *_populateSourceImageSequenceFld = nullptr;
151
154
157
160};
161
Project global and OS specific declarations.
#define MLDICOMOUTPUTS_EXPORT
DLL export macro definition.
Field to encapsulate a pointer to an ML base object.
Definition mlFields.h:813
Class to manage a binary image.
Definition mlBitImage.h:68
Field to encapsulate a boolean value.
Definition mlFields.h:56
Class managing a list of BASE_FIELD_ADD_ON_TYPE to simplify usage of multiple AddOns; AddOns are neve...
static void _addAndSetFractionalSEGPixelDataTag(DCMTree::TreePtr resultTree, PagedImage &inputPagedImage, bool determineImagePixelMax)
In case of fractional segmentation this routine saves the image data which is expected with min/max r...
ImageVector _getExtentOfSegmentationBase() const
Returns extent of the image which is used to determine the mask from, which means the extent of the B...
void _ensureCorrectSOPClassUID()
Updates the SOPClassUID in SOPCommon modules according to the selected segmentationType.
ML_MODULE_CLASS_HEADER(DicomSEGSave)
Implements interface for the runtime type system of the ML.
void activateAttachments() override
Updates the internal module state after loading or cloning the module, and enables notification handl...
EnhancedMFSEGObjectInfos _inheritedSEGInfos
Inherited information needed to fill SEG specific tags in result tree.
std::string _setSEGIODTags(DCMTree::TreePtr resultTree, PagedImage &inputPagedImage, const BitImage &inputBitImage)
Creates and sets all tags for a valid Segmentation IOD dicom tree from inputPagedImage and inputBitim...
std::string _setUpTreeContent() override
Sets the SEG DICOM tags in the tree; required that checkConsistency returns success.
virtual ~DicomSEGSave()
Destructor.
void _inheritFieldValuesFromDCMTree(DCMTree::Const_TreePtr dcmTree) override
Overloads base class field inheritance and adds the additional tags needed by this class.
SEGFSaveDerivationModes
Modes in which way the exported file will be related to the other DICOM objects.
@ OnlyFrameOfReference
The exported files are created with the Frame of Reference information.
void _addDerivationImageFunctionalGroupTagsIfEnabled(DCMTree::TreePtr dcmTree)
Add Derivation Image Functional Group if enabled in _segSaveDerivationModeFld. May throw DCMTree::Exc...
void _setUpCompression(DCMTree::TreePtr resultTree)
Set up transfer syntax/compression to use for saving.
std::string _checkConsistency() const override
Checks for invalid parameters and return a textual description of the error if there is any,...
_FieldAddOnListType _fieldAddOnList
Container which handles all internally used DicomModifyFieldAddOns.
void _updateInputState() override
Overwrites base class and sets up additional stuff in commonInstanceReferenceModuleTags.
DicomSEGSave()
Constructor.
const _FieldAddOnListType & getFieldAddOnList() const
Allow constant access to fieldAddOnList, especially for testing purposes.
void handleNotification(Field *field) override
Handles field changes of the field field.
Field to encapsulate an enumerated value.
Definition mlFields.h:185
Base class for all fields used in the ML.
Definition mlField.h:73
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
Header file of the DicomModifyFieldAddOnBase class dedicated to manage fields for ML modules and inst...
Header file of a class managing many DicomModifFieldAddOns to simplify usage of multiple AddOns.
Header file for the ML module base class DicomSaveBase.
A set of tool functions for enhanced multi-frame export.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
boost::shared_ptr< const Tree > Const_TreePtr
Definition DCMTree_Lib.h:68
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
Definition DCMTree_Lib.h:67
Structure providing SEG IOD specific information for and about composed BitImage Frame heap to be sav...