13 #ifndef CSOISO_PROCESSOR_H
14 #define CSOISO_PROCESSOR_H
73 const Matrix4& voxelToWorldMatrix,
const Matrix4& worldToVoxelMatrix,
147 float _currentHitXPos;
149 float _currentHitYPos;
151 float _currentHitZPos;
153 float _storedHitXPos;
155 float _storedHitYPos;
157 float _storedHitZPos;
162 bool _bUseInputImage;
168 bool _bUpdateStartPos;
175 bool _bFindAllContours;
178 CSO* _currentlyActiveCSO;
181 bool _isGeneratingCSO;
186 float _currentIsoValue;
206 bool _optionalImgIsValid;
215 std::vector<CSOMarchingSquaresCell::vecPoint2D> _vecPositions;
221 void _setInternalStateVariables();
225 float _getImageValueAt(
int posx,
int posy);
228 bool _shouldCreateContour(
float isovalue);
230 bool _findIsoContour(
float isoValue);
232 void _mapVoxelToWorld(SbVec3f voxel, SbVec3f& world);
239 CSO* _addAndInitCSO();
242 void _setInputImageSlice();
#define SOCSO_EXPORT
Header file for system independent resolution.
SoView2D is a 2D viewer for image data.
a list that holds all View2DSlice objects (lazily created) of a SoView2D
Field to encapsulate a boolean value.
The CSOIsoProcessor interactively finds an iso contour on the slice being displayed by the SoView2D m...
void resetInteractionState() override
Sets back internal interaction state.
void handleNotification(Field *field) override
Called when input changes.
bool isCurrentlyGenerating() override
Returns whether the processor is currently generating a new contour.
~CSOIsoProcessor() override
Destructor.
bool isCurrentlyEditing() override
Returns whether the processor is currently editing an existing contour.
bool needsMemoryImage() override
Returns whether the processor need the current memory image for interpolation.
void setMemoryImage(float *imageData, int sizex, int sizey, int voxelPosZ, const Matrix4 &voxelToWorldMatrix, const Matrix4 &worldToVoxelMatrix, View2DSliceList *slicelist) override
Sets an image which can be used with an image based interpolation algorithm.
bool process(CSOEvalEventView2DInfos view2DInfos, CSOEvalEventCSOInfos csoInfos) override
Evaluates the interaction events and interpolates the contours accordingly.
void activateAttachments() override
Sets internal state variables according to field settings.
CSOIsoProcessor()
Constructor.
void triggerSetMouseCursor(SoView2D *view2d, bool shouldSetMouseCursor) override
Triggers the setting of the processor's default mouse cursor.
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
std::vector< Vector2 > vecPoint2D
Defines a 2D point vector.
This class implements the Marching Squares algorithm to find isolines on 2D image slices.
Base class for processor modules; those provide mechanisms for an interactive generation of seed poin...
The CSO represents a contour segmentation object.
Base class for all fields used in the ML.
Field to encapsulate a float value.
Field to encapsulate an integer value.
Class which represents an image, which manages properties of an image and image data which is located...
Field to encapsulate a vector of 4 double values representing a plane with all properties of Vector4F...
Field to encapsulate a string value.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
constexpr const char * SUB_TYPE_ISO_FIXED_SINGLE
Subtype: a single CSO at a fixed iso value.
constexpr const char * SUB_TYPE_ISO_INTERACTIVE_SINGLE
Subtype: a single CSO at some interactively chosen value.
constexpr const char * SUB_TYPE_ISO_INTERACTIVE_ALL
Subtype: all CSOs at some interactively chosen value.
constexpr const char * SUB_TYPE_ISO_FIXED_ALL
Subtype: all CSOs at a fixed value.
CSOIsoStartCondition
Enumeration of line styles (order as StylePalette::LineStyle).
@ START_HIT_GREATER_ISO_VALUE
Only start tracking an iso line when the value of the hit voxel is greater than the chosen iso value.
@ START_HIT_LOWER_ISO_VALUE
Only start tracking an iso line when the value of the hit voxel is lower than the chosen iso value.
@ START_ALWAYS
An iso line will always be tracked.