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
38ML_START_NAMESPACE
39
41class BitImage;
42class DicomSEGSaveAddOnPointers;
43
46
47//----------------------------------------------------------------------------------
48// See above.
49//----------------------------------------------------------------------------------
51{
52public:
53
56
58 virtual ~DicomSEGSave();
59
62
71
74
77
78protected:
79
81 void handleNotification(Field *field) override;
82
85 void activateAttachments() override;
86
92
95 std::string _checkConsistency() const override;
96
99
101 void _updateInputState() override;
102
105
112 std::string _setSEGIODTags(DCMTree::TreePtr resultTree,
113 PagedImage &inputPagedImage,
114 const BitImage &inputBitImage);
115
124 PagedImage &inputPagedImage,
125 bool determineImagePixelMax);
126
129
132 std::string _setUpTreeContent() override;
133
136
139
142
145
148
151
154
157};
158
159ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOMOUTPUTS_EXPORT
DLL export macro definition.
Class to manage a binary image.
Definition mlBitImage.h:67
static void _addAndSetFractionalSEGPixelDataTag(DCMTree::TreePtr resultTree, PagedImage &inputPagedImage, bool determineImagePixelMax)
ImageVector _getExtentOfSegmentationBase() const
ML_MODULE_CLASS_HEADER(DicomSEGSave)
Implements interface for the runtime type system of the ML.
void activateAttachments() override
EnhancedMFSEGObjectInfos _inheritedSEGInfos
Inherited information needed to fill SEG specific tags in result tree.
std::string _setSEGIODTags(DCMTree::TreePtr resultTree, PagedImage &inputPagedImage, const BitImage &inputBitImage)
EnumField * _compressionFld
Selector for supported lossless compressions.
std::string _setUpTreeContent() override
virtual ~DicomSEGSave()
Destructor.
void _inheritFieldValuesFromDCMTree(DCMTree::Const_TreePtr dcmTree) override
Overloads base class field inheritance and adds the additional tags needed by this class.
static const char *const SEGSaveDerivationModeStrings[NumSEGSaveDerivationModes]
String representations for the SEGSaveDerivationModes.
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.
@ Automatic
Automatically selects one the the other SegSaveDerivationModes.
@ OnlyFrameOfReference
The exported files are created with the Frame of Reference information.
@ OnlyDerivationImage
The exported files are created with the Derivation Image Functional Group.
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
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.
DicomSaveBase(int numInputs=1, int numOutputs=0)
Constructor, currently 0-3 input images are allowed to be set by derived modules.
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.
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
DicomModifyFieldAddOnList< DicomModifyFieldAddOnBase, DicomSEGSaveAddOnPointers * > _FieldAddOnListType
Container type which handles all internally used DicomModifyFieldAddOns.
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.