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
27 #include "MLDicomOutputsSystem.h"
28 
29 #include <mlModuleIncludes.h>
30 #include <mlDicomSaveBase.h>
33 
34 // DICOM tree etc.
35 #include <DCMTree_Tree.h>
36 
37 ML_START_NAMESPACE
38 
40 class DicomEnhancedSaveAddOnPointers;
41 
44 
45 //----------------------------------------------------------------------------------
46 // See above.
47 //----------------------------------------------------------------------------------
49 {
50 public:
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 
72  virtual ~DicomEnhancedSave();
73 
75  enum { NumSupportedIODs = 1 };
76 
79  LegacyConvertedEnhancedMR = 0
80  };
81 
83  static const char * const SupportedIODsStrings[NumSupportedIODs];
84 
85 protected:
86 
88  void handleNotification(Field *field) override;
89 
92  void activateAttachments() override;
93 
96  std::string _checkConsistency() const override;
97 
100 
102  void _removeTags(DCMTree::TreePtr dcmTree, bool alsoSMFStuff);
103 
106 
108  void _updateInputState() override;
109 
116  std::string _setEnhancedIODTags(DCMTree::TreePtr resultTree,
117  PagedImage &inputPagedImage,
118  DCMTree::Const_TreePtr inputDcmTree);
119 
122 
127  PagedImage &inputPagedImage);
128 
131  std::string _setUpTreeContent() override;
132 
133 #if defined(_USE_ENHANCED_SAVE_COMMON_INSTANCE_REFERENCE)
135  EnumField *_derivationModeFld;
136 #endif
137 
140 
143 
148 
153 
156 
159 };
160 
161 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOMOUTPUTS_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
_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...
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
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...
Definition: mlPagedImage.h:70
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.
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:70
@ Automatic
Adopts the data type such that range and precision is always maintained.
DicomModifyFieldAddOnList< DicomModifyFieldAddOnBase, DicomEnhancedSaveAddOnPointers * > _EnhancedFieldAddOnListType
Container type which handles all internally used DicomModifyFieldAddOns.