MeVisLab Toolbox Reference
mlDicomEnhancedSave.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>
33
34// DICOM tree etc.
35#include <DCMTree_Tree.h>
36
38
40class DicomEnhancedSaveAddOnPointers;
41
44
45//----------------------------------------------------------------------------------
46// See above.
47//----------------------------------------------------------------------------------
49{
50public:
51
52#if defined(_USE_ENHANCED_SAVE_COMMON_INSTANCE_REFERENCE)
54 enum { NumDerivationModes = 4 };
55
57 enum DerivationModes {
58 Automatic = 0,
59 DerivationImageAndFrameOfReference,
61 OnlyFrameOfReference,
62 OnlyDerivationImage
63 };
64
66 static const char * const DerivationModeStrings[NumDerivationModes];
67#endif
70
73
75 enum { NumSupportedIODs = 1 };
76
79 LegacyConvertedEnhancedMR = 0
80 };
81
83 static const char * const SupportedIODsStrings[NumSupportedIODs];
84
85protected:
86
89
92 void activateAttachments() override;
93
96 std::string _checkConsistency() const override;
97
100
103
106
108 void _updateInputState() override;
109
119
122
128
131 std::string _setUpTreeContent() override;
132
133#if defined(_USE_ENHANCED_SAVE_COMMON_INSTANCE_REFERENCE)
136#endif
137
140
143
148
153
156
159};
160
Project global and OS specific declarations.
#define MLDICOMOUTPUTS_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Definition mlFields.h:56
_EnhancedFieldAddOnListType _fieldAddOnList
Container which handles all internally used DicomModifyFieldAddOns.
void activateAttachments() override
Updates the internal module state after loading or cloning the module, and enables notification handl...
std::string _setEnhancedIODTags(DCMTree::TreePtr resultTree, PagedImage &inputPagedImage, DCMTree::Const_TreePtr inputDcmTree)
Creates and sets all tags for a valid Enhanced Image IOD dicom tree from inputPagedImage into dcmTree...
EnumField * _supportedIODsFld
Selector for the IOD to export.
void handleNotification(Field *field) override
Handles field changes of the field field.
EnumField * _compressionFld
Selector for supported lossless compressions.
void _inheritFieldValuesFromDCMTree(DCMTree::Const_TreePtr dcmTree) override
Overloads base class field inheritance and adds the additional tags needed by this class.
BoolField * _strictChecksFld
If false then no advanced checks (for example for a matching Modality tag) is performed when exportin...
SupportedIODs
Enumerators for supported IODs.
std::string _checkConsistency() const override
Checks for invalid parameters and return a textual description of the error if there is any,...
virtual ~DicomEnhancedSave()
Destructor.
void _updateInputState() override
Overwrites base class and sets up additional stuff in commonInstanceReferenceModuleTags.
void _addAndSetEnhancedPixelDataTag(DCMTree::TreePtr resultTree, PagedImage &inputPagedImage)
This routine saves the image data.
std::string _setUpTreeContent() override
Sets the Enhanced DICOM tags in the tree; required that checkConsistency returns success.
DicomEnhancedSave()
Constructor.
ML_MODULE_CLASS_HEADER(DicomEnhancedSave)
Implements interface for the runtime type system of the ML.
void _setUpCompression(DCMTree::TreePtr resultTree)
Add tags configuring the compression scheme.
virtual void _handleCommonInstanceReferenceFieldChanges(Field *field)
Handles possible changes for CommonInstanceReference fields if compiled.
void _removeTags(DCMTree::TreePtr dcmTree, bool alsoSMFStuff)
Removes tags not needed or not permitted in the IOD; remove SMF tree sequence only if alsoSMFStuff is...
BoolField * _suppressUnassignedContentWriteFld
If true then no contents are written into Unassigned[PerFrame|Shared]ConvertedAttributesSequence in L...
Class managing a list of BASE_FIELD_ADD_ON_TYPE to simplify usage of multiple AddOns; AddOns are neve...
Field to encapsulate an enumerated value.
Definition mlFields.h:173
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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
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