MeVisLab Toolbox Reference
mlRelatedDicomVolumeFieldAddOn.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
7 
12 //----------------------------------------------------------------------------------
13 #pragma once
14 
16 #include <mlFieldAddOnBase.h>
17 #include <DCMTree_Lib.h>
18 
19 ML_START_NAMESPACE
20 
21 class MultiFileVolumeList;
22 
23 //----------------------------------------------------------------------------------
25 //----------------------------------------------------------------------------------
27 {
28 public:
30  inline RelatedDicomVolumeFieldAddOn(FieldContainer &fieldContainerRef): FieldAddOnBase(fieldContainerRef){};
31 
33  void addFields() override;
34 
37 
40 
42  virtual std::string checkConsistency() const;
43 
45  virtual void resetFields();
46 
48  virtual std::string updateResultFields(DCMTree::Const_TreePtr dcmTree,
49  MultiFileVolumeList *volList);
50 
52  inline BoolField &getEnableRelatedVolumesFld() const { return *_enableRelatedVolumesFld; }
53  inline IntField &getFirstVolumeIndexDerivedFromFld() const { return *_firstVolumeIndexDerivedFromFld; }
54  inline StringField &getVolumeIndexesDerivedFromFld() const { return *_volumeIndexesDerivedFromFld; }
55  inline IntField &getFirstSharedFrameOfReferenceVolumeIndexFld() const { return *_firstSharedFrameOfReferenceVolumeIndexFld; }
56  inline StringField &getSharedFrameOfReferenceVolumeIndexesFld() const { return *_sharedFrameOfReferenceVolumeIndexesFld; }
57  inline IntField &getFirstRelatedVolumeIndexFld() const { return *_firstRelatedVolumeIndexFld; }
58  inline StringField &getRelatedVolumeIndexesFld() const { return *_relatedVolumeIndexesFld; }
60 
61 protected:
62 
63  // The managed fields.
64 
67 
70 
73 
74 
78 
82 
83 
86 
89 };
90 
91 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDIRECTDICOMIMPORTOUTPUTS_EXPORT
DLL export macro definition.
Field to encapsulate a boolean value.
Definition: mlFields.h:62
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
Field to encapsulate an integer value.
Definition: mlFields.h:161
Class managing a list of MultiFileVolume instances for the DirectDicomImport module; taking ownership...
Class managing fields fields to show and reference other volumes in a MultiFileVolumeList.
StringField * _volumeIndexesDerivedFromFld
The indexes into the current MultiFileVolumeList to all images referenced in DerivedImageSequence or ...
StringField & getSharedFrameOfReferenceVolumeIndexesFld() const
BoolField * _enableRelatedVolumesFld
Enables/disables the functionality of this FieldAddOn since it can be time consuming.
RelatedDicomVolumeFieldAddOn(FieldContainer &fieldContainerRef)
Constructor, setting the reference of the FieldContainer managing the fields.
StringField * _sharedFrameOfReferenceVolumeIndexesFld
The indexes of all found MultiFileVolumes in the current MultiFileVolumeList which have the same Fram...
FieldAddOnBase::FieldChangeState handleFieldChanges(Field *field) override
Handle field notifications.
virtual void resetFields()
Sets field to default state.
virtual std::string updateResultFields(DCMTree::Const_TreePtr dcmTree, MultiFileVolumeList *volList)
Update the field state to new values of dcmTree and volList; if any of them is nullptr then resetFiel...
IntField * _firstVolumeIndexDerivedFromFld
The index into the current MultiFileVolumeList to the first image referenced in DerivedImageSequence ...
void addFields() override
Add fields to field container of module.
IntField * _firstRelatedVolumeIndexFld
The first valid index from _firstVolumeIndexDerivedFromFld and _firstSharedFrameOfReferenceVolumeInde...
StringField * _relatedVolumeIndexesFld
All valid indexes from _volumeIndexesDerivedFromFld and _sharedFrameOfReferenceVolumeIndexesFld.
virtual std::string checkConsistency() const
Checks for invalid parameters; return textual description on error, or empty string on success.
void handleFieldActivationChanges() override
Do the activateAttachment-like stuff in this method.
IntField * _firstSharedFrameOfReferenceVolumeIndexFld
The index into the current MultiFileVolumeList to the first found volume which has the same FrameOfRe...
BoolField & getEnableRelatedVolumesFld() const
Provide direct access to the fields; see corresponding fields for comments.
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