|
MeVisLab Toolbox Reference
|
Class implementing a FieldAddOn managing fields and functionality for a multi- purpose input connector for MultiFileVolumeList(s) and DICOM-Tree(s). More...
#include <mlTreeAndVolumeInputFieldAddOn.h>
Public Types | |
| enum | InputConfigurations { BaseOnly = 0 , ImageBase , ImageImageBase , ImageImageImageBase } |
| Variants of input connectors which can be provided by this FieldAddOn. More... | |
Public Types inherited from ml::FieldAddOnBase | |
| enum | FieldChangeState { NoChange = 0 , StatusOnlyChange , RecalculationRequired } |
| Describes the type of a field changes detected in handleFieldChanges(Field *field). More... | |
Public Member Functions | |
| const std::vector< std::string > & | getInputSelectorStrings () const |
| Returns the enumerator strings used for the _inputSelectorFld. | |
| TreeAndVolumeInputFieldAddOn (Module &moduleRef, InputConfigurations inputConfig, bool createFileInput, bool createMultiFileVolumeCacheInput=false, bool allowEmptyFileNames=false) | |
| Constructor, setting the reference of the FieldContainer managing the fields. | |
| void | addFields () override |
| Add fields to the module according to the InputConfiguration defined in the constructor. | |
| void | handleFieldActivationChanges () override |
| Do the activateAttachment-like stuff in this method. | |
| FieldAddOnBase::FieldChangeState | handleFieldChanges (Field *field) override |
| Handle field notifications. | |
| DCMTree::Const_TreePtr | getDCMTree (DicomMessageCollector &dcmMsgCollector) const |
| Return the DCMTree::Const_TreePtr which can be retrieved via the current settings; returns nullptr if not accessible. | |
| MultiFileVolumeListRefCounted * | getMultiFileVolumeListRefCounted () const |
| Return the currently selected or loaded MultiFileVolumeList if there is a valid one selected and connected or loaded; otherwise nullptr is returned. | |
| const MultiFileVolumeList * | getMultiFileVolumeList () const |
| Return the currently selected MultiFileVolumeList if there is a valid one selected and connected; otherwise nullptr is returned. | |
| const MultiFileVolume * | getMultiFileVolume () const |
| Return the currently selected MultiFileVolume if there is a valid one selected and connected; otherwise nullptr is returned. | |
| void | setAllowEmptyFileNames (bool allow) |
| If set to true then empty file names will be tolerated without errors and lead to nullptr trees. | |
| bool | getAllowEmptyFileNames () const |
| Returns true if empty file names are tolerated without errors and lead to nullptr trees. | |
| InputConnectorField * | getInput0Fld () const |
| Access interface to fields and members, see corresponding members for details. | |
| InputConnectorField * | getInput1Fld () const |
| InputConnectorField * | getInput2Fld () const |
| BaseField & | getInputBaseFld () const |
| StringField * | getUnresolvedFileNameFld () const |
| StringField * | getAbsoluteFileNameFld () const |
| EnumField & | getInputSelectorFld () const |
| IntField & | getInputVolumeIndexFld () const |
| IntField & | getNumVolumesFld () const |
| BoolField & | getWarnNonExistingFileOnBrowsingFld () const |
| BoolField & | getWarnDirectoriesOnBrowsingFld () const |
| size_t | getImageConnector0EnumIndex () const |
| size_t | getImageConnector1EnumIndex () const |
| size_t | getImageConnector2EnumIndex () const |
| size_t | getBaseConnectorEnumIndex () const |
| size_t | getFileEnumIndex () const |
| size_t | getMultiFileVolumeCacheEnumIndex () const |
Public Member Functions inherited from ml::FieldAddOnBase | |
| FieldAddOnBase (FieldContainer &fieldContainerRef) | |
| Constructor, setting the reference of the FieldContainer managing the fields. | |
| virtual | ~FieldAddOnBase () |
| Destructor. | |
| FieldContainer & | getFieldContainer () |
| Returns the referenced container. | |
| const FieldContainer & | getFieldContainer () const |
| Returns the referenced container. | |
| std::vector< Field * > & | getFields () |
| Return modification access to the list of managed fields, use at own risk! | |
| const std::vector< Field * > & | getFields () const |
| Return constant access to the list of managed fields! | |
| virtual FieldChangeState | getMergedFieldChangeState (FieldChangeState state1, FieldChangeState state2) const |
| Returns a FieldChangeState which best represents a merge of the two given states. | |
| virtual bool | hasField (Field *field) const |
| Returns true if the passed fieldPtr is in _fieldPointers, otherwise false. | |
Protected Member Functions | |
| void | _loadMultiFileVolumeListRefCountedIfNeeded () |
| Loaded MultiFileVolumeList from Input file name and stores it in a RefCounted member if _inputSelectorFld->getEnumValue() requires that. | |
Protected Member Functions inherited from ml::FieldAddOnBase | |
| void | _addFieldPointer (Field *field) |
| Helper routine to add a Field pointer to _fieldPointers, empty pointers and pointers added more than once will be handled fatally. | |
Protected Attributes | |
Saved constructor arguments. | |
| Module & | _module |
| Stores the reference to the modules the FieldContainer belongs to (needed for input connector creation). | |
| const InputConfigurations | _inputConfig |
| Stores the input configuration which shall be handled by this FieldAddOn. | |
| const bool | _createFileInput |
| If true then also a file input interface will be created, otherwise not. | |
| const bool | _createMultiFileVolumeCacheInput |
| If true then also an enumerator entry for MultFileVolumeCache loading will be created, otherwise not. | |
The managed fields. | |
| InputConnectorField * | _input0Fld |
| InputConnector 0 if created, otherwise nullptr. | |
| InputConnectorField * | _input1Fld |
| InputConnector 1 if created, otherwise nullptr. | |
| InputConnectorField * | _input2Fld |
| InputConnector 2 if created, otherwise nullptr. | |
| BaseField * | _inputBaseFld |
| Base connector input for DCMTree sources. | |
| StringField * | _unresolvedFileNameFld |
| GUI-only file path for the unresolved DICOM file or MultiFileVolume, may be nullptr if not created; only to be used by GUI-scripting, because the actual file name is given by absoluteFileNameFld. | |
| StringField * | _absoluteFileNameFld |
| Path to a possible DICOM file or MultiFileVolume, may be nullptr if not created. This should usually be the expanded file name from unresolvedFileNameFld (expanding could be done by a module script or so). | |
| EnumField * | _inputSelectorFld |
| Selects the input from which DICOM trees shall be retrieved. | |
| IntField * | _inputVolumeIndexFld |
| Selector for a volume from inside a connected MultiFileVolumeList. | |
| IntField * | _numVolumesFld |
| Read-only: Output field showing the current number of available DICOM volumes at the selected input. | |
| BoolField * | _warnNonExistingFileOnBrowsingFld |
| Flag passed to the GUI script: if true then selected non-existing files are warned, otherwise not. | |
| BoolField * | _warnDirectoriesOnBrowsingFld |
| Flag passed to the GUI script: if true then selected directories directories are warned, otherwise not. | |
Working and state members. | |
| std::vector< std::string > | _inputSelectorEnumerators |
| Stores the enumerator strings used for the _inputSelectorFld. | |
| size_t | _imageConnector0EnumIndex |
| Enumerator index for image connector 0, will be std::string::npos if not defined. | |
| size_t | _imageConnector1EnumIndex |
| Enumerator index for image connector 1, will be std::string::npos if not defined. | |
| size_t | _imageConnector2EnumIndex |
| Enumerator index for image connector 2, will be std::string::npos if not defined. | |
| size_t | _baseConnectorEnumIndex |
| Enumerator index for the base connector, will be std::string::npos if not defined. | |
| size_t | _fileEnumIndex |
| Enumerator index for the file, will be std::string::npos if not defined. | |
| size_t | _multiFileVolumeCacheEnumIndex |
| Enumerator index for the MultiFileVolumeCache, will be std::string::npos if not defined. | |
| MultiFileVolumeListRefCountedPtr | _lastLoadedMultiFileVolumeList |
| Stores the most recently loaded MultiFileVolumeList. | |
| bool | _allowEmptyFileNames |
| If true then empty file names will be tolerated without errors and lead to nullptr trees. | |
| DCMTree::Const_TreePtr | _recentlyLoadedTree |
| The recently loaded DICOM tree. | |
| DicomMessageCollector | _recentDcmMsgCollector |
| The recent messages from recently loaded DICOM tree. | |
Class implementing a FieldAddOn managing fields and functionality for a multi- purpose input connector for MultiFileVolumeList(s) and DICOM-Tree(s).
Definition at line 37 of file mlTreeAndVolumeInputFieldAddOn.h.
Variants of input connectors which can be provided by this FieldAddOn.
| Enumerator | |
|---|---|
| BaseOnly | Only one Base connector. |
| ImageBase | One Image and one Base connector. |
| ImageImageBase | Two Image and one Base connector. |
| ImageImageImageBase | Three Image and one Base connector. |
Definition at line 41 of file mlTreeAndVolumeInputFieldAddOn.h.
| ml::TreeAndVolumeInputFieldAddOn::TreeAndVolumeInputFieldAddOn | ( | Module & | moduleRef, |
| InputConfigurations | inputConfig, | ||
| bool | createFileInput, | ||
| bool | createMultiFileVolumeCacheInput = false, |
||
| bool | allowEmptyFileNames = false |
||
| ) |
Constructor, setting the reference of the FieldContainer managing the fields.
| moduleRef | The Module for which the fields and inputs shall be managed. |
| inputConfig | Describes which combination of Image and Base input field shall be created and managed. |
| createFileInput | If enabled then a file input interface will be created, otherwise not. |
| createMultiFileVolumeCacheInput | If enabled then a MultiFileVolumeCache load operation will be supported, otherwise not. |
| allowEmptyFileNames | If true then empty file names will be tolerated without errors and lead to nullptr trees. |
|
protected |
Loaded MultiFileVolumeList from Input file name and stores it in a RefCounted member if _inputSelectorFld->getEnumValue() requires that.
|
overridevirtual |
Add fields to the module according to the InputConfiguration defined in the constructor.
Implements ml::FieldAddOnBase.
|
inline |
Definition at line 105 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Returns true if empty file names are tolerated without errors and lead to nullptr trees.
Definition at line 96 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 114 of file mlTreeAndVolumeInputFieldAddOn.h.
| DCMTree::Const_TreePtr ml::TreeAndVolumeInputFieldAddOn::getDCMTree | ( | DicomMessageCollector & | dcmMsgCollector | ) | const |
Return the DCMTree::Const_TreePtr which can be retrieved via the current settings; returns nullptr if not accessible.
| dcmMsgCollector | Collects error, info and issue messages (typically related to a handle). |
|
inline |
Definition at line 115 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 111 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 112 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 113 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Access interface to fields and members, see corresponding members for details.
Definition at line 100 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 101 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 102 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 103 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 106 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Returns the enumerator strings used for the _inputSelectorFld.
Definition at line 49 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 107 of file mlTreeAndVolumeInputFieldAddOn.h.
| const MultiFileVolume * ml::TreeAndVolumeInputFieldAddOn::getMultiFileVolume | ( | ) | const |
Return the currently selected MultiFileVolume if there is a valid one selected and connected; otherwise nullptr is returned.
|
inline |
Definition at line 116 of file mlTreeAndVolumeInputFieldAddOn.h.
| const MultiFileVolumeList * ml::TreeAndVolumeInputFieldAddOn::getMultiFileVolumeList | ( | ) | const |
Return the currently selected MultiFileVolumeList if there is a valid one selected and connected; otherwise nullptr is returned.
| MultiFileVolumeListRefCounted * ml::TreeAndVolumeInputFieldAddOn::getMultiFileVolumeListRefCounted | ( | ) | const |
Return the currently selected or loaded MultiFileVolumeList if there is a valid one selected and connected or loaded; otherwise nullptr is returned.
|
inline |
Definition at line 108 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 104 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 110 of file mlTreeAndVolumeInputFieldAddOn.h.
|
inline |
Definition at line 109 of file mlTreeAndVolumeInputFieldAddOn.h.
|
overridevirtual |
Do the activateAttachment-like stuff in this method.
Reimplemented from ml::FieldAddOnBase.
|
overridevirtual |
Handle field notifications.
If a call of filterString() because filter results need an update then FieldAddOnBase::RecalculationRequired is returned.
Reimplemented from ml::FieldAddOnBase.
|
inline |
If set to true then empty file names will be tolerated without errors and lead to nullptr trees.
Definition at line 93 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Path to a possible DICOM file or MultiFileVolume, may be nullptr if not created. This should usually be the expanded file name from unresolvedFileNameFld (expanding could be done by a module script or so).
Definition at line 159 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
If true then empty file names will be tolerated without errors and lead to nullptr trees.
Definition at line 204 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Enumerator index for the base connector, will be std::string::npos if not defined.
Definition at line 192 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
If true then also a file input interface will be created, otherwise not.
Definition at line 134 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
If true then also an enumerator entry for MultFileVolumeCache loading will be created, otherwise not.
Definition at line 137 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Enumerator index for the file, will be std::string::npos if not defined.
Definition at line 195 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Enumerator index for image connector 0, will be std::string::npos if not defined.
Definition at line 183 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Enumerator index for image connector 1, will be std::string::npos if not defined.
Definition at line 186 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Enumerator index for image connector 2, will be std::string::npos if not defined.
Definition at line 189 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
InputConnector 0 if created, otherwise nullptr.
Definition at line 143 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
InputConnector 1 if created, otherwise nullptr.
Definition at line 146 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
InputConnector 2 if created, otherwise nullptr.
Definition at line 149 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Base connector input for DCMTree sources.
Currently MultiFileVolumeListRefCounted and DicomTree objects are supported.
Definition at line 153 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Stores the input configuration which shall be handled by this FieldAddOn.
Definition at line 131 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Stores the enumerator strings used for the _inputSelectorFld.
Definition at line 180 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Selects the input from which DICOM trees shall be retrieved.
Definition at line 162 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Selector for a volume from inside a connected MultiFileVolumeList.
Definition at line 165 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Stores the most recently loaded MultiFileVolumeList.
Definition at line 201 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Stores the reference to the modules the FieldContainer belongs to (needed for input connector creation).
Definition at line 128 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Enumerator index for the MultiFileVolumeCache, will be std::string::npos if not defined.
Definition at line 198 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Read-only: Output field showing the current number of available DICOM volumes at the selected input.
Definition at line 168 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
The recent messages from recently loaded DICOM tree.
Definition at line 210 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
The recently loaded DICOM tree.
Definition at line 207 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
GUI-only file path for the unresolved DICOM file or MultiFileVolume, may be nullptr if not created; only to be used by GUI-scripting, because the actual file name is given by absoluteFileNameFld.
Definition at line 156 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Flag passed to the GUI script: if true then selected directories directories are warned, otherwise not.
Definition at line 174 of file mlTreeAndVolumeInputFieldAddOn.h.
|
protected |
Flag passed to the GUI script: if true then selected non-existing files are warned, otherwise not.
Definition at line 171 of file mlTreeAndVolumeInputFieldAddOn.h.