MeVisLab Toolbox Reference
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
92
95 std::string _checkConsistency() const override;
96
99
101 void _updateInputState() override;
102
105
114 const BitImage &inputBitImage);
115
126
129
132 std::string _setUpTreeContent() override;
133
136
139
142
145
148
151
154
157};
158
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:797
Class to manage a binary image.
Definition mlBitImage.h:67
Field to encapsulate a boolean value.
Definition mlFields.h:58
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...
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...
EnumField * _compressionFld
Selector for supported lossless compressions.
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.
BoolField * _populateSourceImageSequenceFld
True fills Source image Sequence in Derivation Image Sequence with values, otherwise it's left empty.
BoolField * _savePaddedPixelDataFld
true writes padded frame data, false unpadded recommended).
BaseField * _inputBitImageFld
Input connector for a BitImage to be saved directly.
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)
Add tags configuring the compression scheme.
std::string _checkConsistency() const override
Checks for invalid parameters and return a textual description of the error if there is any,...
EnumField * _segSaveDerivationModeFld
Determines how the exported file is related to other DICOM objects.
_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:195
Base class for all fields used in the ML.
Definition mlField.h:73
Class which represents an image, which manages properties of an image and image data which is located...
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:73
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition DCMTree_Lib.h:72
Structure providing SEG IOD specific information for and about composed BitImage Frame heap to be sav...