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
22
24
27{
28
29public:
30
33
34protected:
35
36 /* VIRTUAL METHODS */
37
39 ~CSOConvertor() override;
41 void activateAttachments() override;
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();
123 static void _csoListNotifcationCB(void* userData, int notificationFlag);
124
125private:
126
128};
129
131
#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:797
Field to encapsulate a boolean value.
Definition mlFields.h:58
Base class for CSOModules.
The CSOBoundingBox defines an axis parallel bounding box with double precision.
Base class for modules that convert CSOs to voxel images.
NotifyField * _clearFld
If pressed the output image is invalidated and internal data is cleared.
StringField * _voxelBoundingBoxStringFld
A string representing the starting and the ending points (in 6D) of the voxel bounding box.
BoolField * _listenInteractionNotificationsFld
Shall the module listen to interaction notifications?
Vector3Field * _endWorldBoundingBoxFld
End of the world bounding box.
Vector3Field * _endVoxelBoundingBoxFld
End of the voxel bounding box.
bool _outputImageCanStayValidIfCSOChanged
If set to true, the output image can stay valid even if the input CSO has changed.
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.
virtual void _clear()
Clears internal data and invalidates the output image.
bool _isInNotificationCB
Locking variable for the observer mechanism.
void handleNotification(Field *field) override
Called when input changes.
BoolField * _listenInteractionFinishedFld
Shall the module listen to finished interaction notifications?
CSOList * _inCSOList
The input CSOList (the original one).
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?
bool _canProduceOutputImage
Can the module produce a valid output image?
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?
Vector3Field * _startVoxelBoundingBoxFld
Start of the voxel bounding box.
~CSOConvertor() override
Standard destructor.
BoolField * _useAlwaysForegroundValueOfModuleFld
Shall the module always use the voxel write value of its GUI?
virtual void _process()
Triggers the computation of the preprocessing.
FloatField * _foregroundValueFld
The foreground (object) image value.
BaseField * _inCSOListFld
The input CSOList (which is to be interpolated).
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Sets the properties of the output image.
BoolField * _useImageValuesFld
Shall the image's values be used?
bool _shouldAugmentBoundingBoxZ
Should the bounding box be augmented in z-direction by 1?
BoolField * _fillSurfaceFld
Shall the interpolated surface be filled?
IntField * _boundingBoxMarginFld
The margin for the bounding box. Default is 0 (no margin).
Vector3Field * _startWorldBoundingBoxFld
Start of the world bounding box.
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:415
Field to encapsulate an integer value.
Definition mlFields.h:126
Field without value for notifications.
Definition mlFields.h:659
Class which represents an image, which manages properties of an image and image data which is located...
Field to encapsulate a string value.
Definition mlFields.h:610
Field to encapsulate a vector of 3 double values.
Definition mlFields.h:1103
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
MLint32 MLDataType
MLDataType.
Definition mlTypeDefs.h:596
Target mlrange_cast(Source arg)
Generic version of checked ML casts.