MeVisLab Toolbox Reference
SoCSOEditorTools.h File Reference

Go to the source code of this file.

Classes

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

Namespaces

 ml
 Main documentation file for ML users and developers.
 
 SoCSOEditorTools
 

Enumerations

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

Functions

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

Variables

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