MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
SoCSOEditorTools Namespace Reference

Classes

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

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.
 
SOCSO_EXPORT void setStatisticsToUserData (ml::CSO *cso, const ImageStatisticsForCSO &statistics, const std::string &viewerIdentifier="")
 Sets the given statistics to the CSO as user data.
 
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.
 
SOCSO_EXPORT void retrieveDicomTagData (SoSFMLImage *image, std::string &modality, float &rescaleIntercept, float &rescaleSlope)
 Fills the given variables with values obtained from DICOM tags.
 
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.
 
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.
 
SOCSO_EXPORT bool isOnCurrentSlice (SoView2DCSOExtensibleEditor *editor, const CSODrawCSOInfos &csoDrawInfos, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice.
 
SOCSO_EXPORT bool isOnCurrentSlice (ml::CSO *cso, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice.
 
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.
 
SOCSO_EXPORT float getParallelThicknessAbsoluteValue (View2DSliceList *slicelist, ml::CSOVisualizationSettings *vSettings)
 Returns the absolute value for the parallel thickness.
 
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.
 
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.
 
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.
 
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.
 
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.
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the slice's worldToVoxel matrix.
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (const SoPointerPosition &pos, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the slice's worldToVoxel matrix.
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (View2DSliceList *sliceList, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the sliceList's worldToVoxel matrix.
 
SOCSO_EXPORT void fillWorldToVoxelMatrix (const SbMatrix &inventorMatrix, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given ML matrix with the given worldToVoxel Inventor matrix.
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the slice's voxelToWorld matrix.
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (const SoPointerPosition &pos, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the slice's voxelToWorld matrix.
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (View2DSliceList *sliceList, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the sliceList's voxelToWorld matrix.
 
SOCSO_EXPORT void fillVoxelToWorldMatrix (const SbMatrix &inventorMatrix, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given ML matrix with the given worldToVoxel Inventor matrix.
 
SOCSO_EXPORT bool isAbovePlane (const ml::Vector3 &worldPosition, const ml::Plane &plane)
 Returns whether the given point is above the given plane.
 
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, int sliceZ=-1)
 Returns whether a CSO was hit and fills the according structures.
 
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.
 
SOCSO_EXPORT bool hasTransformation (ml::CSO *cso, SoView2D *viewer, SoView2DCSOExtensibleEditor *editor)
 Returns whether there exists a transformation between the CSO and the viewer.
 
SOCSO_EXPORT bool isInteractionAllowedBecauseOfRegistration (ml::CSO *cso, SoView2D *viewer, SoView2DCSOExtensibleEditor *editor)
 Returns whether any interaction is allowed because of registration information.
 
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.
 
SOCSO_EXPORT bool shouldRenderCSOOnViewerWithId (ml::CSO *cso, const std::string &viewerId, SoView2DCSOExtensibleEditor *editor)
 Returns whether the given CSO should be rendered on a viewer with the given viewer ID.
 
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.
 
SOCSO_EXPORT void mapWorldToDevice (View2DSliceList *slicelist, const ml::Vector3 &worldPosition, float &devX, float &devY)
 Maps the given world position to device position.
 
SOCSO_EXPORT float getSquaredDeviceLineDistance (const ml::Vector3 &lineWorldStart, const ml::Vector3 &lineWorldEnd, View2DSliceList *slicelist, float dMouseX, float dMouseY, int sliceZ=-1)
 Returns the squared distance in device coordinates from the given line in world positions to the given device position.
 
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.
 
SOCSO_EXPORT bool intersectsSlice (const ml::CSOBoundingBox &slabBB, const CSOVoxelSlab &csoBB)
 Returns whether the two given voxel bounding boxes lie on the same slab.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
SOCSO_EXPORT SbVec2f convertDevicePositionToRelativeViewerPosition (View2DSlice *slice, const SbVec2f &deviceVector)
 Converts the given device position to a position relative to the viewer's size.
 
SOCSO_EXPORT SbVec2f convertRelativeViewerPositionToDevicePosition (View2DSlice *slice, const SbVec2f &relativeVector)
 Converts the given position relative to the viewer's size to a device position.
 
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 coordinates; z in voxel space is set to current slice.
 
SOCSO_EXPORT bool mapWorldToDeviceViaVoxel (View2DSliceList *sliceList, int sliceZ, const ml::Vector3 &position, float &deviceX, float &deviceY)
 Maps the given world position to device coordinates via voxel coordinates; z in voxel space is set to sliceZ.
 
SOCSO_EXPORT void setupGLAntiAlias (bool shouldUseAntiAliasing)
 Sets OpenGL antialiasing parameters.
 
SOCSO_EXPORT void restoreGLAntiAlias ()
 Undoes changes to OpenGL state applied by setupGLAntiAlias.
 
SOCSO_EXPORT bool enableGLStipplingIfNeeded (unsigned short pattern)
 Enables/disables GL stippling if pattern requires stippling (if pattern == 0xffff, stippling is disabled).
 
SOCSO_EXPORT bool isNearDeviceBoundingBox (View2DSliceList *slicelist, const ml::CSOBoundingBox &box, float selectionDistance, float dMouseX, float dMouseY, int sliceZ=-1)
 Returns if the mouse device position is near the given voxel bounding box in device coords.
 
bool _isCurrentSliceForGhostedCSO (int sliceZ)
 Returns whether the given sliceZ is not -1; this is used for a hit test for ghosted CSOs where we pretend that a ghosted CSO lie on the currently visible slice.
 

Variables

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

Enumeration Type Documentation

◆ RelativeSlicePosition

Enumerator
SLICE_BELOW 
SLICE_IN 
SLICE_ABOVE 

Definition at line 36 of file SoCSOEditorTools.h.

Function Documentation

◆ _isCurrentSliceForGhostedCSO()

bool SoCSOEditorTools::_isCurrentSliceForGhostedCSO ( int sliceZ)

Returns whether the given sliceZ is not -1; this is used for a hit test for ghosted CSOs where we pretend that a ghosted CSO lie on the currently visible slice.

If sliceZ == -1, the CSO is not ghosted and the actual slice index is determined by other means.

◆ 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,
int sliceZ = -1 )

Returns whether a CSO was hit and fills the according structures.

If subType is an empty string, it is not evaluated. A sliceZ value != -1 means that a ghosted CSO is tested where we bypass the actual current slice z.

◆ 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,
int sliceZ = -1 )

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

A sliceZ value != -1 means that a ghosted CSO is tested where we bypass the actual current slice z.

◆ 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,
int sliceZ = -1 )

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

A sliceZ value != -1 means that a ghosted CSO is tested where we bypass the actual current slice z.

◆ 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() [1/2]

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 coordinates; z in voxel space is set to current slice.

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

◆ mapWorldToDeviceViaVoxel() [2/2]

SOCSO_EXPORT bool SoCSOEditorTools::mapWorldToDeviceViaVoxel ( View2DSliceList * sliceList,
int sliceZ,
const ml::Vector3 & position,
float & deviceX,
float & deviceY )

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

◆ 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.

◆ shouldRenderCSOOnViewerWithId()

SOCSO_EXPORT bool SoCSOEditorTools::shouldRenderCSOOnViewerWithId ( ml::CSO * cso,
const std::string & viewerId,
SoView2DCSOExtensibleEditor * editor )

Returns whether the given CSO should be rendered on a viewer with the given viewer ID.

Variable Documentation

◆ _lineBuffer

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

Used to avoid reallocation on line rendering.

Definition at line 288 of file SoCSOEditorTools.h.