MeVisLab Toolbox Reference
mlDicomCIDSingleEntryEditTagInterface.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
6
11//----------------------------------------------------------------------------------
12#pragma once
13
16#include <DICOMPart16Tables.h>
17
18ML_START_NAMESPACE
19
20//----------------------------------------------------------------------------------
22//----------------------------------------------------------------------------------
24{
25public:
42 const char * const CIDGroupTable[][CIDGroups::NUM_CID_COLUMNS],
43 size_t CIDGroupTableSize,
44 const std::string &sequenceName,
45 const std::string &cidEntryDefault="",
46 const std::string &fieldSuffix="");
47
49 void addFields() override;
50
54 virtual void setCIDEntry(const std::string &value);
55
58
61
63 void inheritValues(DCMTree::Const_TreePtr dcmTree) override;
64
67 const FieldContainer *treeInfos=nullptr) override;
68
70 std::string checkConsistency() const override;
71
74
77 void setActive(bool active);
78
80 bool isActive() const;
81
85
86 // Definition only for tests:
87#ifndef DicomCIDSingleEntryEditTagInterface_DEACTIVATE_PROTECTION
88 protected:
89#endif
92
93#ifndef DicomCIDSingleEntryEditTagInterface_DEACTIVATE_PROTECTION
94 private:
95#endif
98
100 const char * const (*_CIDGroupTable)[CIDGroups::NUM_CID_COLUMNS];
101
103 const size_t _CIDGroupTableSize;
104
106 const std::string _sequenceName;
107
109 const std::string _cidEntryDefault;
110
112 const std::string _fieldSuffix;
114
117 BoolField *_makeCIDEditGUIInsensitiveFld;
118
121 bool _isActive;
122};
123
124ML_END_NAMESPACE
Tables containing DICOM tables from Part 16.
Project global and OS specific declarations.
#define MLDICOMTAGINTERFACES_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Definition mlFields.h:56
Manages a module field interface to edit a single CID value from a given table.
std::string checkConsistency() const override
Checks for invalid parameters; return textual description on error, or empty string on success.
bool isActive() const
Returns true if FieldAddOn is active,,otherwise false.
void setActive(bool active)
Sets flag which (de)activates this FieldAddOn; if deactivated: checkConsistency always returns an emp...
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications according to Module::activateAttachments with a return of field change sta...
ReleaseToolsString::StringVector getCodeSequence() const
Returns the sequence of codes which is managed by the editor as string vector; always returns a singl...
BoolField & getMakeGUIInsensitiveFld()
Return reference to _makeGUIInsensitiveFld to allow modules hosting this add to change sensitivity.
void handleFieldActivationChanges() override
Handle class changes according to Module::activateAttachments.
void inheritValues(DCMTree::Const_TreePtr dcmTree) override
Implements the copy of tag values from the given dcmTree to the fields.
void addFields() override
Add fields to field container of module.
virtual void setCIDEntry(const std::string &value)
Initializes _cidEntryFld to the given value such that the sequence value is updated to the correct CI...
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
See DicomModifyFieldAddOnBase::applyModifications() for documentation.
DicomCIDSingleEntryEditTagInterface(Module &modRef, const char *const CIDGroupTable[][CIDGroups::NUM_CID_COLUMNS], size_t CIDGroupTableSize, const std::string &sequenceName, const std::string &cidEntryDefault="", const std::string &fieldSuffix="")
Constructor, setting the reference of the module for which the fields shall be managed.
EnumField * _cidEntryFld
Enumerator field selecting one of the entries of the CIDGroupTable.
The class DicomModifyFieldAddOnBase is dedicated to manage fields for ML modules and instances derive...
Field to encapsulate an enumerated value.
Definition mlFields.h:173
FieldChangeState
Describes the type of a field changes detected in handleFieldChanges(Field *field).
Defines the class FieldContainer to encapsulate a vector of fields (see class Field).
Base class for all fields used in the ML.
Definition mlField.h:73
Base class for an image processing module of the ML.
Definition mlModule.h:151
Header file of the DicomModifyFieldAddOnBase class dedicated to manage fields for ML modules and inst...
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
std::vector< std::string > StringVector
Define often used string vector type.