MeVisLab Toolbox Reference
CSOConvertor.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 
15 
16 #pragma once
17 
18 #include "CSOBaseModule.h"
19 
20 
21 ML_START_NAMESPACE
22 
24 
27 {
28 
29 public:
30 
32  CSOConvertor(int numInImages=1, int numOutImages=1);
33 
34 protected:
35 
36  /* VIRTUAL METHODS */
37 
39  ~CSOConvertor() override;
41  void activateAttachments() override;
43  void handleNotification(Field* field) override;
45  void calculateOutputImageProperties(int outputIndex, PagedImage* outputImage) override;
49  virtual void _calcOutSubImageMinMaxValue(double& minValue, double& maxValue, MLDataType& dType);
50 
51 
52  /* FIELDS */
53 
56 
59 
68 
71 
74 
79 
82 
91 
95 
96 
97  /* MEMBER VARIABLES */
98 
109 
113 
114  /* METHODS */
115 
117  virtual void _clear();
119  virtual void _process();
121  void _setBoundingBoxFields(const CSOBoundingBox& voxelBB, const CSOBoundingBox& worldBB);
123  static void _csoListNotifcationCB(void* userData, int notificationFlag);
124 
125 private:
126 
128 };
129 
131 
132 ML_END_NAMESPACE
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Definition: MLCSOSystem.h:23
Field to encapsulate a pointer to an ML base object.
Definition: mlFields.h:1187
Field to encapsulate a boolean value.
Definition: mlFields.h:62
Base class for CSOModules.
Definition: CSOBaseModule.h:29
ML_MODULE_CLASS_HEADER(CSOBaseModule)
The CSOBoundingBox defines an axis parallel bounding box with double precision.
Base class for modules that convert CSOs to voxel images.
Definition: CSOConvertor.h:27
NotifyField * _clearFld
If pressed the output image is invalidated and internal data is cleared.
Definition: CSOConvertor.h:58
StringField * _voxelBoundingBoxStringFld
A string representing the starting and the ending points (in 6D) of the voxel bounding box.
Definition: CSOConvertor.h:94
BoolField * _listenInteractionNotificationsFld
Shall the module listen to interaction notifications?
Definition: CSOConvertor.h:76
Vector3Field * _endWorldBoundingBoxFld
End of the world bounding box.
Definition: CSOConvertor.h:90
Vector3Field * _endVoxelBoundingBoxFld
End of the voxel bounding box.
Definition: CSOConvertor.h:86
bool _outputImageCanStayValidIfCSOChanged
If set to true, the output image can stay valid even if the input CSO has changed.
Definition: CSOConvertor.h:112
virtual void _calcOutSubImageMinMaxValue(double &minValue, double &maxValue, MLDataType &dType)
Calculates the minimum and the maximum output image values, and the data type.
void activateAttachments() override
Initialize module after loading.
FloatField * _backgroundValueFld
The background image value.
Definition: CSOConvertor.h:63
virtual void _clear()
Clears internal data and invalidates the output image.
bool _isInNotificationCB
Locking variable for the observer mechanism.
Definition: CSOConvertor.h:104
void handleNotification(Field *field) override
Called when input changes.
BoolField * _listenInteractionFinishedFld
Shall the module listen to finished interaction notifications?
Definition: CSOConvertor.h:78
CSOList * _inCSOList
The input CSOList (the original one).
Definition: CSOConvertor.h:100
void _setBoundingBoxFields(const CSOBoundingBox &voxelBB, const CSOBoundingBox &worldBB)
Sets the given vectors as bounding box fields to the GUI.
BoolField * _copyInputImageFld
Shall the input image be copied?
Definition: CSOConvertor.h:65
bool _canProduceOutputImage
Can the module produce a valid output image?
Definition: CSOConvertor.h:106
CSOConvertor(int numInImages=1, int numOutImages=1)
Standard constructor.
static void _csoListNotifcationCB(void *userData, int notificationFlag)
Can be called from anywhere from within the network.
bool _hasValidVoxelData
Is the interpolation compound up to date?
Definition: CSOConvertor.h:102
Vector3Field * _startVoxelBoundingBoxFld
Start of the voxel bounding box.
Definition: CSOConvertor.h:84
~CSOConvertor() override
Standard destructor.
BoolField * _useAlwaysForegroundValueOfModuleFld
Shall the module always use the voxel write value of its GUI?
Definition: CSOConvertor.h:67
virtual void _process()
Triggers the computation of the preprocessing.
FloatField * _foregroundValueFld
The foreground (object) image value.
Definition: CSOConvertor.h:61
BaseField * _inCSOListFld
The input CSOList (which is to be interpolated).
Definition: CSOConvertor.h:55
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Sets the properties of the output image.
BoolField * _useImageValuesFld
Shall the image's values be used?
Definition: CSOConvertor.h:73
bool _shouldAugmentBoundingBoxZ
Should the bounding box be augmented in z-direction by 1?
Definition: CSOConvertor.h:108
BoolField * _fillSurfaceFld
Shall the interpolated surface be filled?
Definition: CSOConvertor.h:70
IntField * _boundingBoxMarginFld
The margin for the bounding box. Default is 0 (no margin).
Definition: CSOConvertor.h:81
Vector3Field * _startWorldBoundingBoxFld
Start of the world bounding box.
Definition: CSOConvertor.h:88
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition: CSOList.h:61
Base class for all fields used in the ML.
Definition: mlField.h:73
Field to encapsulate a float value.
Definition: mlFields.h:627
Field to encapsulate an integer value.
Definition: mlFields.h:161
Field without value for notifications.
Definition: mlFields.h:1049
Class which represents an image, which manages properties of an image and image data which is located...
Definition: mlPagedImage.h:70
Field to encapsulate a string value.
Definition: mlFields.h:1000
Field to encapsulate a vector of 3 double values.
Definition: mlFields.h:1538
MLint32 MLDataType
MLDataType.
Definition: mlTypeDefs.h:684