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

SOCSO_EXPORT ImageStatisticsForCSO performImageStatistics (ml::CSO *cso, SoSFMLImage *image)
 Reads out the given image and performs image voxel value statistics for the given CSO. More...
 
SOCSO_EXPORT void setStatisticsToUserData (ml::CSO *cso, const ImageStatisticsForCSO &statistics, const std::string &viewerIdentifier="")
 Sets the given statistics to the CSO as user data. More...
 
SOCSO_EXPORT void setUserDataWithViewerId (ml::CSO *cso, const std::string &userDataName, const std::string &viewerIdentifier, const ml::Variant &value)
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT void retrieveDicomTagData (SoSFMLImage *image, std::string &modality, float &rescaleIntercept, float &rescaleSlope)
 Fills the given variables with values obtained from DICOM tags. More...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT ml::CSOBoundingBox computeSlabBoundingBox (int voxelZ, View2DSliceList *slicelist, int voxelAugmentInZ=0)
 Computes and returns the bounding box in voxel space of the given slice. More...
 
SOCSO_EXPORT bool isOnCurrentSlice (SoView2DCSOExtensibleEditor *editor, const CSODrawCSOInfos &csoDrawInfos, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice. More...
 
SOCSO_EXPORT bool isOnCurrentSlice (ml::CSO *cso, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice. More...
 
SOCSO_EXPORT bool isOnCurrentSlice (ml::CSO *cso, View2DSliceList *slicelist, const ml::Vector3 &sliceNormalWorld, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice. More...
 
SOCSO_EXPORT float getParallelThicknessAbsoluteValue (View2DSliceList *slicelist, ml::CSOVisualizationSettings *vSettings)
 Returns the absolute value for the parallel thickness. More...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the slice's worldToVoxel matrix. More...
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (const SoPointerPosition &pos, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the slice's worldToVoxel matrix. More...
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (View2DSliceList *sliceList, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the sliceList's worldToVoxel matrix. More...
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (const SbMatrix &inventorMatrix, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given ML matrix with the given worldToVoxel Inventor matrix. More...
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the slice's voxelToWorld matrix. More...
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (const SoPointerPosition &pos, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the slice's voxelToWorld matrix. More...
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (View2DSliceList *sliceList, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the sliceList's voxelToWorld matrix. More...
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (const SbMatrix &inventorMatrix, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given ML matrix with the given worldToVoxel Inventor matrix. More...
 
SOCSO_EXPORT bool isAbovePlane (const ml::Vector3 &worldPosition, const ml::Plane &plane)
 Returns whether the given point is above the given plane. More...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT bool hasTransformation (ml::CSO *cso, SoView2D *viewer, SoView2DCSOExtensibleEditor *editor)
 Returns whether there exists a transformation between the CSO and the viewer. More...
 
SOCSO_EXPORT bool isInteractionAllowedBecauseOfRegistration (ml::CSO *cso, SoView2D *viewer, SoView2DCSOExtensibleEditor *editor)
 Returns whether any interaction is allowed because of registration information. More...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT void mapWorldToDevice (View2DSliceList *slicelist, const ml::Vector3 &worldPosition, float &devX, float &devY)
 Maps the given world position to device position. More...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT bool isOnSameSlab (const ml::CSOBoundingBox &slabBB, const ml::CSOBoundingBox &csoBB)
 Returns whether the two given voxel bounding boxes lie on the same slab. More...
 
SOCSO_EXPORT bool intersectsSlice (const ml::CSOBoundingBox &slabBB, const CSOVoxelSlab &csoBB)
 Returns whether the two given voxel bounding boxes lie on the same slab. More...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT SbVec2f convertDevicePositionToRelativeViewerPosition (View2DSlice *slice, const SbVec2f &deviceVector)
 Converts the given device position to a position relative to the viewer's size. More...
 
SOCSO_EXPORT SbVec2f convertRelativeViewerPositionToDevicePosition (View2DSlice *slice, const SbVec2f &relativeVector)
 Converts the given position relative to the viewer's size to a device position. More...
 
SOCSO_EXPORT 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...
 
SOCSO_EXPORT void setupGLAntiAlias (bool shouldUseAntiAliasing)
 Sets OpenGL antialiasing parameters. More...
 
SOCSO_EXPORT void restoreGLAntiAlias ()
 Undoes changes to OpenGL state applied by setupGLAntiAlias. More...
 
SOCSO_EXPORT bool enableGLStipplingIfNeeded (unsigned short pattern)
 Enables/disables GL stippling if pattern requires stippling (if pattern == 0xffff, stippling is disabled). More...
 
SOCSO_EXPORT 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 36 of file SoCSOEditorTools.h.

Function Documentation

◆ areOnSamePlane() [1/2]

SOCSO_EXPORT 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]

SOCSO_EXPORT 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]

SOCSO_EXPORT 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]

SOCSO_EXPORT 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()

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

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

◆ convertRelativeViewerPositionToDevicePosition()

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

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

◆ drawLines()

SOCSO_EXPORT 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()

SOCSO_EXPORT bool SoCSOEditorTools::enableGLStipplingIfNeeded ( unsigned short  pattern)

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

◆ evaluateHitPoint()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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]

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

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

◆ fillVoxelToWorldMatrix() [2/4]

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

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

◆ fillVoxelToWorldMatrix() [3/4]

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

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

◆ fillVoxelToWorldMatrix() [4/4]

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

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

◆ fillWorldSliceCrossings()

SOCSO_EXPORT 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]

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

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

◆ fillWorldToVoxelMatrix() [2/4]

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

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

◆ fillWorldToVoxelMatrix() [3/4]

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

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

◆ fillWorldToVoxelMatrix() [4/4]

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

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

◆ getParallelThicknessAbsoluteValue()

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

Returns the absolute value for the parallel thickness.

◆ getRightMostPathPointPositionOnCurrentSlice()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

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

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

◆ intersectsSlice()

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

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

◆ isAbovePlane()

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

Returns whether the given point is above the given plane.

◆ isApproximatelyParallel()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

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

Returns whether any interaction is allowed because of registration information.

◆ isNearDeviceBoundingBox()

SOCSO_EXPORT 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]

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

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

◆ isOnCurrentSlice() [2/3]

SOCSO_EXPORT bool SoCSOEditorTools::isOnCurrentSlice ( ml::CSO cso,
View2DSliceList slicelist,
const ml::Vector3 sliceNormalWorld,
const CSODrawView2DInfos view2DInfos 
)

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

◆ isOnCurrentSlice() [3/3]

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

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

◆ isOnSameSlab()

SOCSO_EXPORT 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()

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

Maps the given world position to device position.

◆ mapWorldToDeviceViaVoxel()

SOCSO_EXPORT 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()

SOCSO_EXPORT 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()

SOCSO_EXPORT void SoCSOEditorTools::restoreGLAntiAlias ( )

Undoes changes to OpenGL state applied by setupGLAntiAlias.

◆ retrieveDicomTagData()

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

Fills the given variables with values obtained from DICOM tags.

◆ setStatisticsToUserData()

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

Sets the given statistics to the CSO as user data.

◆ setupGLAntiAlias()

SOCSO_EXPORT void SoCSOEditorTools::setupGLAntiAlias ( bool  shouldUseAntiAliasing)

Sets OpenGL antialiasing parameters.

◆ setUserDataWithViewerId()

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

◆ shouldRenderCSODependingOnImageCreation()

SOCSO_EXPORT 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 239 of file SoCSOEditorTools.h.