MeVisLab Toolbox Reference
mlDicomTagDumpFieldAddOn.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 
14 #include "MLDicomToMLToolsSystem.h"
15 #include <mlFieldAddOnBase.h>
16 #include <DCMTree_Lib.h>
17 
18 ML_START_NAMESPACE
19 
20 //----------------------------------------------------------------------------------
22 //----------------------------------------------------------------------------------
24 {
25 public:
27  inline DicomTagDumpFieldAddOn(FieldContainer &fieldContainerRef): FieldAddOnBase(fieldContainerRef){};
28 
30  void addFields() override;
31 
34 
37 
39  virtual std::string checkConsistency() const;
40 
43 
46 
52 
56 
61  void updateTagDump(bool allowAlternativeSource=false);
62 
64 
65  inline IntField &getTagDumpSizeFld() const { return *_tagDumpSizeFld; }
66  inline BoolField &getDumpPrivateTagValuesFld() const { return *_dumpPrivateTagValuesFld; }
67  inline IntField &getNumShownBinaryEntriesFld() const { return *_numShownBinaryEntriesFld; }
68  inline BoolField &getAnnotateFld() const { return *_annotateFld; }
69  inline StringField &getRegExLineFilterFld() const { return *_regExLineFilterFld; }
70  inline StringField &getTagDumpFld() const { return *_tagDumpFld; }
72 
73 protected:
76  std::string _getAlternativeDump() const;
77 
80 
83 
86 
89 
93 
96 
99 
102 
106 };
107 
108 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOM_TO_ML_TOOLS_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Class managing fields to show and handle a DICOM tree tag dump.
void addFields() override
Add fields to field container of module.
std::string _getAlternativeDump() const
Calculated the string dump of an alternative source, currently the new-line-separated list of string ...
DicomTagDumpFieldAddOn(FieldContainer &fieldContainerRef)
Constructor, setting the reference of the FieldContainer managing the fields.
virtual std::string checkConsistency() const
Checks for invalid parameters; return textual description on error, or empty string on success.
BoolField * _dumpPrivateTagValuesFld
If enabled then dump contents of private tag values, otherwise only the default information is shown;...
IntField & getNumShownBinaryEntriesFld() const
void updateTagDump(bool allowAlternativeSource=false)
Updates the _tagDumpField according to the content of _dcmTree and the current settings of _tagDumpSi...
IntField & getTagDumpSizeFld() const
Provide direct access to the fields; see corresponding fields for comments.
StringField & getRegExLineFilterFld() const
void setDicomTree(DCMTree::Const_TreePtr dcmTree)
Updates the field content according to the passed DCMTree.
void setAlternativeDumpSource(const ImagePropertyExtensionContainer *extCont=nullptr)
Optionally sets a copy of an ImagePropertyExtensionContainer as an alternative source for tags dumps.
StringField & getTagDumpFld() const
StringField * _tagDumpFld
Field with a dump of the DICOM tags of the currently selected volume, default is "".
DCMTree::Const_TreePtr getDicomTree() const
Updates the field content according to the passed DCMTree.
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications.
IntField * _numShownBinaryEntriesFld
Maximum number of shown binary tags, default is 8.
BoolField & getDumpPrivateTagValuesFld() const
StringField * _regExLineFilterFld
Regular expression to filter tag dump lines, default is empty or "*." for all lines.
IntField * _tagDumpSizeFld
Maximum size of strings in _tagDumpFld, default is 10000.
const ImagePropertyExtensionContainer & getAlternativeDumpSource() const
Returns the reference to the currently set copy of an ImagePropertyExtensionContainer which might be ...
BoolField * _annotateFld
If enabled then the tags in the dump are annotated with additional information, default is off.
void handleFieldActivationChanges() override
Do the activateAttachment-like stuff in this method.
ImagePropertyExtensionContainer _imagePropertyExtensions
A copy of an ImagePropertyExtensionContainer as alternative source for meta data.
DCMTree::Const_TreePtr _dcmTree
The DICOM tree.
Abstract base class for field interfaces to be added to other ML module classes.
FieldChangeState
Describes the type of a field changes detected in handleFieldChanges(Field *field).
Defines the class FieldContainer to encapsulate a vector of fields for (see class Field).
Base class for all fields used in the ML.
Definition: mlField.h:73
This class is a container for extended image properties derived from ImagePropertyExtension.
Field to encapsulate an integer value.
Definition: mlFields.h:161
Field to encapsulate a string value.
Definition: mlFields.h:1000
Header file of the abstract base class FieldAddOnBase managing fields independently of an ML Module.
boost::shared_ptr< const Tree > Const_TreePtr
Definition: DCMTree_Lib.h:73