MeVisLabToolboxReference
SoCSOEditorTools Namespace Reference

Classes

struct  PathPointSlicePosition

Enumerations

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

Functions

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.
ml::CSOBoundingBox computeSlabBoundingBox (int voxelZ, View2DSliceList *slicelist)
 Computes and returns the bounding box in voxel space of the given slice.
bool isOnCurrentSlice (ml::CSO *cso, const CSODrawView2DInfos &view2DInfos)
 Returns whether the given CSO is visible on the current slice.
bool isOnCurrentSlice (ml::CSO *cso, View2DSliceList *slicelist, const ml::Vector3 &sliceNormalWorld, SoCSOTransform *csoTransform)
 Returns whether the given CSO is visible on the current slice.
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.
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.
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.
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.
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.
void fillWorldToVoxelMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given matrix with the slice's worldToVoxel matrix.
void fillWorldToVoxelMatrix (const SbMatrix &inventorMatrix, ml::Matrix4 &worldToVoxelMatrix)
 Fills the given ML matrix with the given worldToVoxel Inventor matrix.
void fillVoxelToWorldMatrix (const CSODrawView2DInfos &view2DInfos, ml::Matrix4 &voxelToWorldMatrix)
 Fills the given matrix with the slice's voxelToWorld matrix.
bool isAbovePlane (const ml::Vector3 &worldPosition, const ml::Plane &plane)
 Returns whether the given point is above the given plane.
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 &distance)
 Returns whether a CSO was hit and fills the according structures. If subType is an empty string, it is not evaluated.
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.
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.
bool isOnSameSlab (const ml::CSOBoundingBox &slabBB, const ml::CSOBoundingBox &csoBB)
 Returns whether the two given voxel bounding boxes lie on the same slab.
bool areOnSamePlane (ml::CSO *cso1, ml::CSO *cso2, float epsilon=0.00001f)
 Returns whether the two given CSOs are lying on the same plane.
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.

Enumeration Type Documentation

Enumerator:
SLICE_BELOW 
SLICE_IN 
SLICE_ABOVE 

Definition at line 28 of file SoCSOEditorTools.h.


Function Documentation

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.

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.

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.

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

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

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 &  distance 
)

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

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.

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.

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

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

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.

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

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

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

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

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.

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.

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

Returns whether the given point is above the given plane.

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.

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.

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.

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

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

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

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