MeVisLab Toolbox Reference
mlExtractObjectFromList.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2007, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 #ifndef ML_EXTRACT_OBJECT_FROM_LIST_H
14 #define ML_EXTRACT_OBJECT_FROM_LIST_H
15 
16 
19 
20 // ML includes
21 #include "mlModuleIncludes.h"
22 #include "mlEngine.h"
23 
24 
25 
26 #include "mlBaseInit.h"
27 
28 
29 ML_START_NAMESPACE
30 
31 
32 // ------------------------------------------------------------------
35 // ------------------------------------------------------------------
36 
40 
43 {
44 public:
45 
48 
51 
56 
59 
62 
64  //BoolField* extractObjectContainerFld; // i'll insert this one on demand...
65 
68 
71 
74 
76  void updateOutput();
77 
78 protected:
79 /*
80  template <class ITEMTYPE>
81  Base* getItemAt(BaseList* inputList, MLssize_t index, ITEMTYPE* dummyItem)
82  {
83  BaseListTemplate<ITEMTYPE>* list = (BaseListTemplate<ITEMTYPE>*) inputList;
84  return (Base*) &(*list)[index];
85  }
86 */
87 
90  void activateAttachments() override;
91 
93  void handleNotification(Field* field) override;
94 
97 
98 private:
99 
102 
104 
107 
108 };
109 
110 
111 ML_END_NAMESPACE
112 
113 
114 #endif // __mlExtractObjectFromList_H
115 
Field to encapsulate a pointer to an ML base object.
Definition: mlFields.h:1187
Class representing general ML objects that support import/export via strings (setPersistentState() an...
Definition: mlBase.h:62
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Base class for all ML Engines which are derived from Module, which have no inputs or outputs and whic...
Definition: mlEngine.h:30
Engine module ExtractObjectFromList extracting a single list item (identified by its index) from a gi...
BaseField * outputObjectFld
Base output 0: first item as base object.
void updateOutput()
Compose the input objects to an output BaseList object:
BaseField * inputListFld
Base input:
Base * _outputObject
Extracted object.
BoolField * inputValidFld
input is a valid list object?
IntField * posFld
Position in list filtered by id (when useId is checked) and name (when useName is checked).
~ExtractObjectFromList() override
Destructor.
void activateAttachments() override
calls handleNotification once after the module is loaded on the network and all field values are assi...
ExtractObjectFromList()
Constructor.
void handleNotification(Field *field) override
handle field changes
BoolField * objectValidFld
indicates that the object found is valid (contained base object != NULL)
IntField * inputSizeFld
extract container instead of object if input list type is derived from BaseList
Base class for all fields used in the ML.
Definition: mlField.h:73
Field to encapsulate an integer value.
Definition: mlFields.h:161
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
#define MLBASEEXPORT
defined Header file mlBaseInit.h
Definition: mlBaseInit.h:22