MeVisLab Toolbox Reference
mlDicomGeneralSeriesModuleTagInterface.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
5 
10 //----------------------------------------------------------------------------------
11 #pragma once
12 
17 
18 ML_START_NAMESPACE
19 
20 //----------------------------------------------------------------------------------
22 //----------------------------------------------------------------------------------
24 {
25 public:
37  bool useEnhancedSeriesNumber=false,
38  const std::string &modality="",
39  bool forceSeriesInstanceUIDAsType1=false);
40 
42  void addFields() override;
43 
45  void inheritValues(DCMTree::Const_TreePtr dcmTree) override;
46 
48  std::string applyModifications(DCMTree::TreePtr dcmTree,
49  const FieldContainer *treeInfos=nullptr) override;
50 
53 
55  std::string checkConsistency() const override;
56 
58  // NOTE: Although the modality tag is part of the general series module it is not provided
59  // as field here, because normally it should not be editable by users. DICOM export
60  // modules typically have to set it manually.
61 
64 
69 
72  DoNotWriteLateralityTag = 0,
74  Left,
75  Right
76  };
77 
79  enum { NumLateralityEnumerators = 4 };
80 
82  static const char * const LateralityStringValues[NumLateralityEnumerators];
83 
86 
91 
94  AsError = 0,
96  Ignore
97  };
98 
100  enum { NumLateralityChecksEnumerators = 3 };
101 
103  static const char * const LateralityChecksStringValues[NumLateralityChecksEnumerators];
104 
109 
112 
115  ABDOMEN=0, ABDOMENPELVIS, ADRENAL, ANKLE, AORTA, ARM, ATLANTOAXIAL, ATLANTOOCCIPITAL,
116  AXILLA, BACK, BLADDER, BRAIN, BREAST, BRONCHUS, BUTTOCK, CALCANEUS,
117  CALF, CAROTID, CARPUS, CEREBELLUM, CERVIX, CHEEK, CHEST, CHESTABDOMEN,
118  CHESTABDPELVIS, CIRCLEOFWILLIS, CLAVICLE, COCCYX, COLON, CORNEA, CORONARYARTERY, CSPINE,
119  CTSPINE, DIGIT, DISTALPHALANX, DUODENUM, EAR, ELBOW, ESOPHAGUS, EXTREMITY,
120  EYE, EYELID, FACE, FEMUR, FIBULA, FINGER, FOOT, FOREFETLOCK,
121  FOREFOOT, FORENAVICULAR, FOREPASTERN, FRONTALSINUS, GALLBLADDER, HAND, HEAD, HEADNECK,
122  HEART, HINDFETLOCK, HINDFOOT, HINDNAVICULAR, HINDPASTERN, HIP, HUMERUS, IAC,
123  ILEUM, ILIUM, JAW, JEJUNUM, KIDNEY, KNEE, LARYNX, LEG,
124  LEGS, LIVER, LSPINE, LSSPINE, LUNG, MAXILLA, MEDIASTINUM, METACARPUS,
125  METATARSUS, MOUTH, NECK, NECKCHEST, NECKCHESTABDOMEN, NECKCHESTABDPELV, NOSE, ORBIT,
126  OVARY, PANCREAS, PAROTID, PATELLA, PELVIS, PENIS, PHARYNX,
127  PROSTATE, RADIUS, RADIUSULNA, RECTUM, RIB, SCALP, SCAPULA, SCLERA,
128  SCROTUM, SHOULDER, SKULL, SPINE, SPLEEN, SSPINE, STERNUM, STIFLE,
129  STOMACH, SUBMANDIBULAR, TAIL, TARSUS, TESTIS, THIGH, THUMB, THYMUS,
130  THYROID, TIBIA, TIBIAFIBULA, TLSPINE, TMJ, TOE, TONGUE, TRACHEA,
131  TSPINE, UGITRACT, ULNA, URETER, URETHRA, URINARYTRACT, UTERUS, VAGINA,
132  VULVA, WHOLEBODY, WING, WRIST, ZYGOMA
133  };
134 
136  enum { NumBodyPartExaminedValues = 140 };
137 
139  static const char * const BodyPartExaminedStringValues[NumBodyPartExaminedValues];
140 
142  enum { NumUnpairedBodyPartExaminedValues = 74 };
143 
145  static const char * const UnpairedBodyPartExaminedStringValues[NumUnpairedBodyPartExaminedValues];
146 
147  protected:
150 
153 
156 
159 
161  const std::string _modality;
162 
163  public:
166 };
167 
168 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOMTAGINTERFACES_EXPORT
DLL export macro definition.
@ COLON
Definition: SoKeyGrabber.h:180
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Provides control to copy/inherit a set of tag (values) from an input DCMTree, buffer it,...
Manages the module field interface according to DICOM General Series, C.7.3.1.
StringField * _bodyPartExaminedFld
Value of possibly inherited BodyPartExamined tag.
StringField * _bodyPartExaminedValuesFld
Available values for _bodyPartExaminedFld.
const std::string _modality
If not empty then the content will be set as Modality tag, otherwise ignored.
StringField * _seriesNumberFld
Content of the corresponding DICOM tag definition.
BoolField * _inheritSeriesNumberFld
If true then the seriesNumber field is overwritten with inherited states, otherwise not.
const bool _useEnhancedSeriesNumber
If true then Series Number will be checked to be non-empty.
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications.
DicomGeneralSeriesModuleTagInterface(Module &modRef, bool useEnhancedSeriesNumber=false, const std::string &modality="", bool forceSeriesInstanceUIDAsType1=false)
Constructor, setting the reference of the module for which the fields shall be managed.
void inheritValues(DCMTree::Const_TreePtr dcmTree) override
Implements the copy of tag values from the given dcmTree to the fields.
DicomValueInheritAndCreateTagInterface _seriesInstanceUIDAddOn
Fields.
BodyPartExaminedValues
Available values for BodyPartExaminedValues.
LateralityChecksValues
Enumerator for modes of laterality checks tag.
@ AsWarning
Log a possible problem as console warning.
BoolField * _writeBodyPartExaminedFld
Enables/disabled whether bodyPartExamined shall be written or not.
BoolField * _useEmptyLateralityTagIfNotFoundOnInheritanceFld
If true then WriteEmptyLateralityTag is selected on inheritance even if no one laterality tag was fou...
EnumField * _lateralityFld
Laterality tag (0020,0060), type 2C.
EnumField * _lateralityChecksFld
Checking for valid combinations of Laterality and BodyPartExamined values is difficult and still inco...
void addFields() override
Add fields to field container of module.
std::string checkConsistency() const override
Checks for invalid parameters; return textual description on error, or empty string on success.
DicomCopyTagSetInterface _otherGeneralSeriesTags
All other General Series tags not available in the interface, allow public access.
StringField * _seriesDescriptionFld
Describes the series for which this DICOM file is created.
std::string applyModifications(DCMTree::TreePtr dcmTree, const FieldContainer *treeInfos=nullptr) override
See DicomModifyFieldAddOnBase::applyModifications() for documentation.
The class DicomModifyFieldAddOnBase is dedicated to manage fields for ML modules and instances derive...
FieldAddOn class supporting inheritance and auto creating tag values (for example DICOM UIDs or tag v...
Field to encapsulate an enumerated value.
Definition: mlFields.h:363
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
Base class for an image processing module of the ML.
Definition: mlModule.h:156
Field to encapsulate a string value.
Definition: mlFields.h:1000
Header file for the ML module base class DicomCopyTagSetInterface which provides control to copy/inhe...
Header file of the DicomModifyFieldAddOnBase class dedicated to manage fields for ML modules and inst...
Header file for the FieldAddOn supporting inheritance and auto creating tag values (for example DICOM...
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