MeVisLab Toolbox Reference
SoCSOEditorTools Namespace Reference

Classes

struct  PathPointSlicePosition
 
struct  ImageStatisticsForCSO
 
struct  PathPointsSegment
 Structure for handling path points segments. More...
 
struct  vectorXSort
 For sorting Vector3s according to their x-component. More...
 
struct  LineRenderSettings
 

Enumerations

enum  RelativeSlicePosition { SLICE_BELOW = 0 , SLICE_IN = 1 , SLICE_ABOVE = 2 }
 

Functions

ImageStatisticsForCSO performImageStatistics (ml::CSO *cso, SoSFMLImage *image)
 Reads out the given image and performs image voxel value statistics for the given CSO. More...
 
void setStatisticsToUserData (ml::CSO *cso, const ImageStatisticsForCSO &statistics, const std::string &viewerIdentifier="")
 Sets the given statistics to the CSO as user data. More...
 
void setUserDataWithViewerId (ml::CSO *cso, const std::string &userDataName, const std::string &viewerIdentifier, const ml::Variant &value)
 
void fillCrossingsVector (std::vector< std::vector< ml::Vector2 > > &crossingsVector, const std::vector< ml::Vector3 > &pathPoints, const ml::Vector3 &minBB, const ml::Vector3 &maxBB)
 Fills the given crossingsVector with crossings of rays in x-direction with the path points segments. More...
 
void retrieveDicomTagData (SoSFMLImage *image, std::string &modality, float &rescaleIntercept, float &rescaleSlope)
 Fills the given variables with values obtained from DICOM tags. More...
 
ml::CSOBoundingBox computeSlabBoundingBox (float deviceX, float deviceY, View2DSliceList *slicelist)
 Computes and returns the bounding box in voxel space of a slice at the given device position. More...
 
ml::CSOBoundingBox computeSlabBoundingBox (int voxelZ, View2DSliceList *slicelist, int voxelAugmentInZ=0)
 Computes and returns the bounding box in voxel space of the given slice. More...
 
bool isOnCurrentSlice (SoView2DCSOExtensibleEditor *editor, const CSODrawCSOInfos &csoDrawInfos, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice. More...
 
bool isOnCurrentSlice (ml::CSO *cso, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice. More...
 
bool isOnCurrentSlice (ml::CSO *cso, View2DSliceList *slicelist, const ml::Vector3 &sliceNormalWorld, SoCSOTransform *csoTransform)
 Returns whether the given CSO is visible on the current slice. More...
 
float getParallelThicknessAbsoluteValue (View2DSliceList *slicelist, ml::CSOVisualizationSettings *vSettings)
 Returns the absolute value for the parallel thickness. More...
 
bool isApproximatelyParallel (ml::CSO *cso, View2DSliceList *slicelist, float epsilon=-1)
 Returns whether the given CSO is parallel to the current 2D image considering the allowed thickness. More...
 
void fillWorldSliceCrossings (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, std::vector< CSOSliceCrossing > &belowSlicePositions, std::vector< CSOSliceCrossing > &inSlicePositions, std::vector< CSOSliceCrossing > &aboveSlicePositions)
 Fills the given vectors with positions below, in, and above the current slice. More...
 
void getWorldSlicePlanes (const CSODrawView2DInfos &view2DInfos, ml::Plane &topPlane, ml::Plane &bottomPlane)
 Fills the given top/bottom planes with planes in world space that lies on top and on bottom of the current slice. More...
 
void fillCrossingsOnePlaneCrossed (const ml::Plane &plane, const ml::Vector3 &lastPosition, const ml::Vector3 &currentPosition, CSOSliceCrossing &sliceCrossings, std::vector< CSOSliceCrossing > *crossings[3], int lastSlicePosition)
 Fills the crossings vector. More...
 
void fillCrossingsBothPlanesCrossed (const ml::Plane &topPlane, const ml::Plane &bottomPlane, const ml::Vector3 &lastPosition, const ml::Vector3 &currentPosition, int relativePosition, CSOSliceCrossing &sliceCrossings, std::vector< CSOSliceCrossing > *crossings[3])
 Fills the crossings vector. More...
 
void fillWorldToVoxelMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the slice's worldToVoxel matrix. More...
 
void fillWorldToVoxelMatrix (const SoPointerPosition &pos, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the slice's worldToVoxel matrix. More...
 
void fillWorldToVoxelMatrix (View2DSliceList *sliceList, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the sliceList's worldToVoxel matrix. More...
 
void fillWorldToVoxelMatrix (const SbMatrix &inventorMatrix, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given ML matrix with the given worldToVoxel Inventor matrix. More...
 
void fillVoxelToWorldMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the slice's voxelToWorld matrix. More...
 
void fillVoxelToWorldMatrix (const SoPointerPosition &pos, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the slice's voxelToWorld matrix. More...
 
void fillVoxelToWorldMatrix (View2DSliceList *sliceList, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the sliceList's voxelToWorld matrix. More...
 
void fillVoxelToWorldMatrix (const SbMatrix &inventorMatrix, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given ML matrix with the given worldToVoxel Inventor matrix. More...
 
bool isAbovePlane (const ml::Vector3 &worldPosition, const ml::Plane &plane)
 Returns whether the given point is above the given plane. More...
 
bool evaluateHitPoint (const ml::Vector3 &worldPosition, View2DSliceList *slicelist, ml::CSOList *csoList, const ml::CSOBoundingBox &slabBB, const std::string &subType, SoView2DCSOExtensibleEditor *editor, bool testSeedPoints, ml::CSO *&localHitCSO, ml::CSOSeedPoint *&localHitSeedPoint, ml::CSOPathPoints *&localHitPathPoints, float &distanceToCSO)
 Returns whether a CSO was hit and fills the according structures. If subType is an empty string, it is not evaluated. More...
 
bool isEligibleForPicking (ml::CSO *cso, ml::CSOList *csoList, const std::string &subType, View2DSliceList *slicelist, SoView2DCSOExtensibleEditor *editor)
 Returns whether the given CSO is eligible for picking. More...
 
bool hasTransformation (ml::CSO *cso, SoView2D *viewer, SoView2DCSOExtensibleEditor *editor)
 Returns whether there exists a transformation between the CSO and the viewer. More...
 
bool isInteractionAllowedBecauseOfRegistration (ml::CSO *cso, SoView2D *viewer, SoView2DCSOExtensibleEditor *editor)
 Returns whether any interaction is allowed because of registration information. More...
 
bool shouldRenderCSODependingOnImageCreation (ml::CSO *cso, SoView2DCSOExtensibleEditor *editor, View2DSliceList *slicelist)
 Returns whether the given CSO should be rendered on the image depending whether it was created on it. More...
 
float getSquaredDeviceDistance (const ml::Vector3 &worldPosition, View2DSliceList *slicelist, float dMouseX, float dMouseY)
 Returns the squared distance in device coordinates from the given world position to the given device position. More...
 
void mapWorldToDevice (View2DSliceList *slicelist, const ml::Vector3 &worldPosition, float &devX, float &devY)
 Maps the given world position to device position. More...
 
float getSquaredDeviceLineDistance (const ml::Vector3 &lineWorldStart, const ml::Vector3 &lineWorldEnd, View2DSliceList *slicelist, float dMouseX, float dMouseY)
 Returns the squared distance in device coordinates from the given line in world positions to the given device position. More...
 
bool isOnSameSlab (const ml::CSOBoundingBox &slabBB, const ml::CSOBoundingBox &csoBB)
 Returns whether the two given voxel bounding boxes lie on the same slab. More...
 
bool intersectsSlice (const ml::CSOBoundingBox &slabBB, const CSOVoxelSlab &csoBB)
 Returns whether the two given voxel bounding boxes lie on the same slab. More...
 
bool areOnSamePlane (ml::CSO *cso1, ml::CSO *cso2, float epsilon=0.00001f)
 Returns whether the two given CSOs are lying on the same plane. More...
 
bool areOnSamePlane (ml::CSO *cso, const ml::Vector3 &position, const ml::Vector3 &normal, float epsilon=0.00001f)
 Returns whether the given CSO and the point/normal are on the same plane. More...
 
void drawLines (GLint lineMode, const std::vector< ml::Vector3 > &positions, const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const SbVec2f &deviceOffset)
 Draws the given points as a line strip or loop, depending on the lineMode. More...
 
void getRightmostSeedPointPosition (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, float &deviceX, float &deviceY)
 Fills the device coordinates with the right most seed point position of the CSO in the viewer. More...
 
void getRightMostPathPointPositionOnCurrentSlice (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, float &deviceX, float &deviceY)
 Fills the device coordinates with the right most path point position projected on the current slice of the CSO in the viewer. More...
 
void getRightmostSeedPointPositionAndVector (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, float &deviceX, float &deviceY, float &deviceVX, float &deviceVY)
 Fills the device coordinates with the right most seed point position of the CSO (assumed to be a DistanceLine CSO with two seed points) in the viewer and the normalized direction of the distance line pointing to the right most point. More...
 
SbVec2f convertDevicePositionToRelativeViewerPosition (View2DSlice *slice, const SbVec2f &deviceVector)
 Converts the given device position to a position relative to the viewer's size. More...
 
SbVec2f convertRelativeViewerPositionToDevicePosition (View2DSlice *slice, const SbVec2f &relativeVector)
 Converts the given position relative to the viewer's size to a device position. More...
 
bool mapWorldToDeviceViaVoxel (const CSODrawCSOInfos &csoInfos, const CSODrawView2DInfos &view2DInfos, const ml::Vector3 &position, float &deviceX, float &deviceY)
 Maps the given world position to device coordinates via voxel coordinate; z in voxel space is set to current slice. More...
 
void setupGLAntiAlias (bool shouldUseAntiAliasing)
 Sets OpenGL antialiasing parameters. More...
 
void restoreGLAntiAlias ()
 Undoes changes to OpenGL state applied by setupGLAntiAlias. More...
 
bool enableGLStipplingIfNeeded (unsigned short pattern)
 Enables/disables GL stippling if pattern requires stippling (if pattern == 0xffff, stippling is disabled). More...
 
bool isNearDeviceBoundingBox (View2DSliceList *slicelist, const ml::CSOBoundingBox &box, float selectionDistance, float dMouseX, float dMouseY)
 Returns if the mouse device position is near the given voxel bounding box in device coords. More...
 

Variables

static std::vector< float > _lineBuffer
 Used to avoid reallocation on line rendering. More...
 

Enumeration Type Documentation

◆ RelativeSlicePosition

Enumerator
SLICE_BELOW 
SLICE_IN 
SLICE_ABOVE 

Definition at line 35 of file SoCSOEditorTools.h.

Function Documentation

◆ areOnSamePlane() [1/2]

bool SoCSOEditorTools::areOnSamePlane ( ml::CSO cso,
const ml::Vector3 position,
const ml::Vector3 normal,
float  epsilon = 0.00001f 
)

Returns whether the given CSO and the point/normal are on the same plane.

◆ areOnSamePlane() [2/2]

bool SoCSOEditorTools::areOnSamePlane ( ml::CSO cso1,
ml::CSO cso2,
float  epsilon = 0.00001f 
)

Returns whether the two given CSOs are lying on the same plane.

◆ computeSlabBoundingBox() [1/2]

ml::CSOBoundingBox SoCSOEditorTools::computeSlabBoundingBox ( float  deviceX,
float  deviceY,
View2DSliceList slicelist 
)

Computes and returns the bounding box in voxel space of a slice at the given device position.

◆ computeSlabBoundingBox() [2/2]

ml::CSOBoundingBox SoCSOEditorTools::computeSlabBoundingBox ( int  voxelZ,
View2DSliceList slicelist,
int  voxelAugmentInZ = 0 
)

Computes and returns the bounding box in voxel space of the given slice.

◆ convertDevicePositionToRelativeViewerPosition()

SbVec2f SoCSOEditorTools::convertDevicePositionToRelativeViewerPosition ( View2DSlice slice,
const SbVec2f &  deviceVector 
)

Converts the given device position to a position relative to the viewer's size.

◆ convertRelativeViewerPositionToDevicePosition()

SbVec2f SoCSOEditorTools::convertRelativeViewerPositionToDevicePosition ( View2DSlice slice,
const SbVec2f &  relativeVector 
)

Converts the given position relative to the viewer's size to a device position.

◆ drawLines()

void SoCSOEditorTools::drawLines ( GLint  lineMode,
const std::vector< ml::Vector3 > &  positions,
const CSODrawCSOInfos csoInfos,
const CSODrawView2DInfos view2DInfos,
const SbVec2f &  deviceOffset 
)

Draws the given points as a line strip or loop, depending on the lineMode.

Calls glVertex2f in device space for a given position. Adds an (optional) x/y offset to device position.

◆ enableGLStipplingIfNeeded()

bool SoCSOEditorTools::enableGLStipplingIfNeeded ( unsigned short  pattern)

Enables/disables GL stippling if pattern requires stippling (if pattern == 0xffff, stippling is disabled).

◆ evaluateHitPoint()

bool SoCSOEditorTools::evaluateHitPoint ( const ml::Vector3 worldPosition,
View2DSliceList slicelist,
ml::CSOList csoList,
const ml::CSOBoundingBox slabBB,
const std::string &  subType,
SoView2DCSOExtensibleEditor editor,
bool  testSeedPoints,
ml::CSO *&  localHitCSO,
ml::CSOSeedPoint *&  localHitSeedPoint,
ml::CSOPathPoints *&  localHitPathPoints,
float &  distanceToCSO 
)

Returns whether a CSO was hit and fills the according structures. If subType is an empty string, it is not evaluated.

◆ fillCrossingsBothPlanesCrossed()

void SoCSOEditorTools::fillCrossingsBothPlanesCrossed ( const ml::Plane topPlane,
const ml::Plane bottomPlane,
const ml::Vector3 lastPosition,
const ml::Vector3 currentPosition,
int  relativePosition,
CSOSliceCrossing sliceCrossings,
std::vector< CSOSliceCrossing > *  crossings[3] 
)

Fills the crossings vector.

◆ fillCrossingsOnePlaneCrossed()

void SoCSOEditorTools::fillCrossingsOnePlaneCrossed ( const ml::Plane plane,
const ml::Vector3 lastPosition,
const ml::Vector3 currentPosition,
CSOSliceCrossing sliceCrossings,
std::vector< CSOSliceCrossing > *  crossings[3],
int  lastSlicePosition 
)

Fills the crossings vector.

◆ fillCrossingsVector()

void SoCSOEditorTools::fillCrossingsVector ( std::vector< std::vector< ml::Vector2 > > &  crossingsVector,
const std::vector< ml::Vector3 > &  pathPoints,
const ml::Vector3 minBB,
const ml::Vector3 maxBB 
)

Fills the given crossingsVector with crossings of rays in x-direction with the path points segments.

◆ fillVoxelToWorldMatrix() [1/4]

void SoCSOEditorTools::fillVoxelToWorldMatrix ( const CSODrawView2DInfos view2DInfos,
ml::Matrix4 voxelToWorldMatrix 
)

Fills the given matrix with the slice's voxelToWorld matrix.

◆ fillVoxelToWorldMatrix() [2/4]

void SoCSOEditorTools::fillVoxelToWorldMatrix ( const SbMatrix &  inventorMatrix,
ml::Matrix4 voxelToWorldMatrix 
)

Fills the given ML matrix with the given worldToVoxel Inventor matrix.

◆ fillVoxelToWorldMatrix() [3/4]

void SoCSOEditorTools::fillVoxelToWorldMatrix ( const SoPointerPosition pos,
ml::Matrix4 voxelToWorldMatrix 
)

Fills the given matrix with the slice's voxelToWorld matrix.

◆ fillVoxelToWorldMatrix() [4/4]

void SoCSOEditorTools::fillVoxelToWorldMatrix ( View2DSliceList sliceList,
ml::Matrix4 voxelToWorldMatrix 
)

Fills the given matrix with the sliceList's voxelToWorld matrix.

◆ fillWorldSliceCrossings()

void SoCSOEditorTools::fillWorldSliceCrossings ( const CSODrawCSOInfos csoInfos,
const CSODrawView2DInfos view2DInfos,
std::vector< CSOSliceCrossing > &  belowSlicePositions,
std::vector< CSOSliceCrossing > &  inSlicePositions,
std::vector< CSOSliceCrossing > &  aboveSlicePositions 
)

Fills the given vectors with positions below, in, and above the current slice.

Crossing points are also added to the vectors.

◆ fillWorldToVoxelMatrix() [1/4]

void SoCSOEditorTools::fillWorldToVoxelMatrix ( const CSODrawView2DInfos view2DInfos,
ml::Matrix4 worldToVoxelMatrix 
)

Fills the given matrix with the slice's worldToVoxel matrix.

◆ fillWorldToVoxelMatrix() [2/4]

void SoCSOEditorTools::fillWorldToVoxelMatrix ( const SbMatrix &  inventorMatrix,
ml::Matrix4 worldToVoxelMatrix 
)

Fills the given ML matrix with the given worldToVoxel Inventor matrix.

◆ fillWorldToVoxelMatrix() [3/4]

void SoCSOEditorTools::fillWorldToVoxelMatrix ( const SoPointerPosition pos,
ml::Matrix4 worldToVoxelMatrix 
)

Fills the given matrix with the slice's worldToVoxel matrix.

◆ fillWorldToVoxelMatrix() [4/4]

void SoCSOEditorTools::fillWorldToVoxelMatrix ( View2DSliceList sliceList,
ml::Matrix4 worldToVoxelMatrix 
)

Fills the given matrix with the sliceList's worldToVoxel matrix.

◆ getParallelThicknessAbsoluteValue()

float SoCSOEditorTools::getParallelThicknessAbsoluteValue ( View2DSliceList slicelist,
ml::CSOVisualizationSettings vSettings 
)

Returns the absolute value for the parallel thickness.

◆ getRightMostPathPointPositionOnCurrentSlice()

void SoCSOEditorTools::getRightMostPathPointPositionOnCurrentSlice ( const CSODrawCSOInfos csoInfos,
const CSODrawView2DInfos view2DInfos,
float &  deviceX,
float &  deviceY 
)

Fills the device coordinates with the right most path point position projected on the current slice of the CSO in the viewer.

◆ getRightmostSeedPointPosition()

void SoCSOEditorTools::getRightmostSeedPointPosition ( const CSODrawCSOInfos csoInfos,
const CSODrawView2DInfos view2DInfos,
float &  deviceX,
float &  deviceY 
)

Fills the device coordinates with the right most seed point position of the CSO in the viewer.

◆ getRightmostSeedPointPositionAndVector()

void SoCSOEditorTools::getRightmostSeedPointPositionAndVector ( const CSODrawCSOInfos csoInfos,
const CSODrawView2DInfos view2DInfos,
float &  deviceX,
float &  deviceY,
float &  deviceVX,
float &  deviceVY 
)

Fills the device coordinates with the right most seed point position of the CSO (assumed to be a DistanceLine CSO with two seed points) in the viewer and the normalized direction of the distance line pointing to the right most point.

◆ getSquaredDeviceDistance()

float SoCSOEditorTools::getSquaredDeviceDistance ( const ml::Vector3 worldPosition,
View2DSliceList slicelist,
float  dMouseX,
float  dMouseY 
)

Returns the squared distance in device coordinates from the given world position to the given device position.

◆ getSquaredDeviceLineDistance()

float SoCSOEditorTools::getSquaredDeviceLineDistance ( const ml::Vector3 lineWorldStart,
const ml::Vector3 lineWorldEnd,
View2DSliceList slicelist,
float  dMouseX,
float  dMouseY 
)

Returns the squared distance in device coordinates from the given line in world positions to the given device position.

◆ getWorldSlicePlanes()

void SoCSOEditorTools::getWorldSlicePlanes ( const CSODrawView2DInfos view2DInfos,
ml::Plane topPlane,
ml::Plane bottomPlane 
)

Fills the given top/bottom planes with planes in world space that lies on top and on bottom of the current slice.

◆ hasTransformation()

bool SoCSOEditorTools::hasTransformation ( ml::CSO cso,
SoView2D viewer,
SoView2DCSOExtensibleEditor editor 
)

Returns whether there exists a transformation between the CSO and the viewer.

◆ intersectsSlice()

bool SoCSOEditorTools::intersectsSlice ( const ml::CSOBoundingBox slabBB,
const CSOVoxelSlab csoBB 
)

Returns whether the two given voxel bounding boxes lie on the same slab.

◆ isAbovePlane()

bool SoCSOEditorTools::isAbovePlane ( const ml::Vector3 worldPosition,
const ml::Plane plane 
)

Returns whether the given point is above the given plane.

◆ isApproximatelyParallel()

bool SoCSOEditorTools::isApproximatelyParallel ( ml::CSO cso,
View2DSliceList slicelist,
float  epsilon = -1 
)

Returns whether the given CSO is parallel to the current 2D image considering the allowed thickness.

◆ isEligibleForPicking()

bool SoCSOEditorTools::isEligibleForPicking ( ml::CSO cso,
ml::CSOList csoList,
const std::string &  subType,
View2DSliceList slicelist,
SoView2DCSOExtensibleEditor editor 
)

Returns whether the given CSO is eligible for picking.

◆ isInteractionAllowedBecauseOfRegistration()

bool SoCSOEditorTools::isInteractionAllowedBecauseOfRegistration ( ml::CSO cso,
SoView2D viewer,
SoView2DCSOExtensibleEditor editor 
)

Returns whether any interaction is allowed because of registration information.

◆ isNearDeviceBoundingBox()

bool SoCSOEditorTools::isNearDeviceBoundingBox ( View2DSliceList slicelist,
const ml::CSOBoundingBox box,
float  selectionDistance,
float  dMouseX,
float  dMouseY 
)

Returns if the mouse device position is near the given voxel bounding box in device coords.

◆ isOnCurrentSlice() [1/3]

bool SoCSOEditorTools::isOnCurrentSlice ( ml::CSO cso,
const CSODrawView2DInfos view2DInfos 
)

Returns whether the given CSO is visible on the current slice.

◆ isOnCurrentSlice() [2/3]

bool SoCSOEditorTools::isOnCurrentSlice ( ml::CSO cso,
View2DSliceList slicelist,
const ml::Vector3 sliceNormalWorld,
SoCSOTransform csoTransform 
)

Returns whether the given CSO is visible on the current slice.

◆ isOnCurrentSlice() [3/3]

bool SoCSOEditorTools::isOnCurrentSlice ( SoView2DCSOExtensibleEditor editor,
const CSODrawCSOInfos csoDrawInfos,
const CSODrawView2DInfos view2DInfos 
)

Returns whether the given CSO is visible on the current slice.

◆ isOnSameSlab()

bool SoCSOEditorTools::isOnSameSlab ( const ml::CSOBoundingBox slabBB,
const ml::CSOBoundingBox csoBB 
)

Returns whether the two given voxel bounding boxes lie on the same slab.

◆ mapWorldToDevice()

void SoCSOEditorTools::mapWorldToDevice ( View2DSliceList slicelist,
const ml::Vector3 worldPosition,
float &  devX,
float &  devY 
)

Maps the given world position to device position.

◆ mapWorldToDeviceViaVoxel()

bool SoCSOEditorTools::mapWorldToDeviceViaVoxel ( const CSODrawCSOInfos csoInfos,
const CSODrawView2DInfos view2DInfos,
const ml::Vector3 position,
float &  deviceX,
float &  deviceY 
)

Maps the given world position to device coordinates via voxel coordinate; z in voxel space is set to current slice.

This method transforms the given position if view2DInfos contains a SoCSOTransform.

◆ performImageStatistics()

ImageStatisticsForCSO SoCSOEditorTools::performImageStatistics ( ml::CSO cso,
SoSFMLImage image 
)

Reads out the given image and performs image voxel value statistics for the given CSO.

Returns a struct with the computed information. Make sure that the CSO is either an area (closed, in-plane) or a point.

◆ restoreGLAntiAlias()

void SoCSOEditorTools::restoreGLAntiAlias ( )

Undoes changes to OpenGL state applied by setupGLAntiAlias.

◆ retrieveDicomTagData()

void SoCSOEditorTools::retrieveDicomTagData ( SoSFMLImage image,
std::string &  modality,
float &  rescaleIntercept,
float &  rescaleSlope 
)

Fills the given variables with values obtained from DICOM tags.

◆ setStatisticsToUserData()

void SoCSOEditorTools::setStatisticsToUserData ( ml::CSO cso,
const ImageStatisticsForCSO statistics,
const std::string &  viewerIdentifier = "" 
)

Sets the given statistics to the CSO as user data.

◆ setupGLAntiAlias()

void SoCSOEditorTools::setupGLAntiAlias ( bool  shouldUseAntiAliasing)

Sets OpenGL antialiasing parameters.

◆ setUserDataWithViewerId()

void SoCSOEditorTools::setUserDataWithViewerId ( ml::CSO cso,
const std::string &  userDataName,
const std::string &  viewerIdentifier,
const ml::Variant value 
)

◆ shouldRenderCSODependingOnImageCreation()

bool SoCSOEditorTools::shouldRenderCSODependingOnImageCreation ( ml::CSO cso,
SoView2DCSOExtensibleEditor editor,
View2DSliceList slicelist 
)

Returns whether the given CSO should be rendered on the image depending whether it was created on it.

Variable Documentation

◆ _lineBuffer

std::vector<float> SoCSOEditorTools::_lineBuffer
static

Used to avoid reallocation on line rendering.

Definition at line 237 of file SoCSOEditorTools.h.