MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
SoCSOImageStatistics.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2012, 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
19#include <set>
20
22class BaseEvent;
24
26
29{
30 SO_NODE_HEADER(SoCSOImageStatistics);
31
32public:
35
73
75 void draw(const CSODrawCSOInfos& csoInfos, const CSODrawView2DInfos& view2DInfos,
77
79 static void initClass();
80
82 {}
83 void createDragMoveTo(const SoPointerPosition&) override
84 {}
85 bool createEndPress(int) override
86 {
87 return false;
88 }
90 {}
91
93 {}
95 {}
97 {
98 return nullptr;
99 }
100
101 int cursorShape() const override
102 {
104 }
105
106 bool shouldRenderGeneral(ml::CSO*) const override
107 {
108 return true;
109 }
110
111protected:
113
114private:
115 void _inputImageCB(SoField*);
116
117 void _markAllCSOsForUpdatePressedCB(SoField*);
118 bool _allCSOsNeedUpdate;
119
123 SoSFMLImage* getInputImage(View2DSlice* slice);
125 bool haveSameSize(const XVImageSize& size1, const XVImageSize& size2) const;
127 bool haveSameWorldToVoxelMatrix(SoSFMLImage* image1, SoSFMLImage* image2) const;
129 void setAllCSOsNeedUpdate(ml::CSOList* csoList);
130
132 static void baseEventCB(void* userData, ml::BaseEvent* event);
135 bool needsUpdate(ml::CSO* cso);
138 void attachAsListenerTo(ml::CSOList* csoList);
140 ml::CSOListPtr _listenToCSOList;
142 std::set<int> _needsUpdateCSOIds;
143};
144
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition SoCSOSystem.h:21
Base class for an editor extension for the SoView2DCSOExtensibleEditor.
Extension for gathering voxel information inside CSOs on the current slice.
SoSFFloat imageSumValue
The sum of the image values inside the current CSO.
void draw(const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const CSODrawSliceInformation &drawSliceInfo, SoView2DCSOExtensibleEditor *editor) override
Drawing routine.
SoSFString viewerId
Optional viewer id, this string is concatenated to the user data name for each statistics value,...
SoSFFloat imageRescaleIntercept
The image value rescale intercept as read out from DICOM tag (0028,1052).
~SoCSOImageStatistics() override
bool shouldRenderGeneral(ml::CSO *) const override
Returns whether a given CSO should be rendered by this general extension.
SoSFFloat imageVarianceValue
The image value variance inside the current CSO.
SoSFFloat imageAbsMeanValue
The image mean of absolute values inside the current CSO.
void selectAndMoveStartPressAt(const SoPointerPosition &) override
void createDragMoveTo(const SoPointerPosition &) override
SoSFBool imageValuesValid
Shows whether the image value fields are valid.
static void initClass()
init class in inventor runtime
SoSFMLImage inputImage
Input image field.
void createStartPressAt(const SoPointerPosition &) override
bool createEndPress(int) override
SoSFFloat imageAverageSquaredSumValue
The average of the sum of squared image values inside the current CSO.
SoSFInt32 numVoxels
The number of voxels inside the current CSO.
SoPointingAction * selectAndMoveEndPress(int) override
SoSFFloat imageStdDeviationValue
The image value standard deviation inside the current CSO.
SoSFFloat imageMeanValue
The image mean value inside the current CSO.
SoSFInt32 currentCSOId
Shows the id of the current CSO.
SoSFFloat imageMinValue
The image min value inside the current CSO.
void selectAndMoveDragMoveTo(const SoPointerPosition &) override
int cursorShape() const override
Returns the cursor shape that indicates the next creation.
SoCSOImageStatistics()
Standard constructor.
SoSFTrigger markAllCSOsForUpdate
If pressed, all CSO are being processed at the next draw() call.
SoSFString imageModality
The image's modality string as read out from DICOM tag (0008,0060).
SoSFFloat imageRescaleSlope
The image value rescale slope as read out from DICOM tag (0028,1053).
SoSFFloat imageMaxValue
The image max value inside the current CSO.
void pointerPositionIfAllowedAt(const SoPointerPosition &) override
Sets seed points while moving the mouse – but not while dragging.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
The SoSFMLImage field is the interface used by Inventor Nodes to access image data (in the current im...
Definition SoSFMLImage.h:84
a single slice that is stored in a View2DSliceList, typically created by a View2DSliceList
Definition View2DSlice.h:48
SoSFMLImage - field interface to ML images and related classes.
Definition SoSFMLImage.h:32
BaseEvent is the base class for all events emitted from EventSourceBase.
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition CSOList.h:61
The CSO represents a contour segmentation object.
Definition CSO.h:44
Target mlrange_cast(Source arg)
Generic version of checked ML casts.