CustusX  15.4.0-beta
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::SliceComputer Class Reference

Calculates a slice plane given a definition. More...

#include <cxSliceComputer.h>

Public Member Functions

 SliceComputer ()
 
 ~SliceComputer ()
 
void setToolPosition (const Transform3D &rMt)
 
void setOrientationType (ORIENTATION_TYPE val)
 
void setPlaneType (PLANE_TYPE val)
 
void setFixedCenter (const Vector3D &center)
 
void setFollowType (FOLLOW_TYPE val)
 
void setGravity (bool use, const Vector3D &dir)
 
void setToolOffset (double val)
 
void setToolViewOffset (bool use, double viewportHeight, double viewOffset, bool useConstrainedViewOffset=false)
 
void setToolViewportHeight (double viewportHeight)
 
void setClinicalApplication (CLINICAL_VIEW application)
 
SlicePlane getPlane () const
 
void initializeFromPlane (PLANE_TYPE plane, bool useGravity, const Vector3D &gravityDir, bool useViewOffset, double viewportHeight, double toolViewOffset, CLINICAL_VIEW application, bool useConstrainedViewOffset=false)
 
void switchOrientationMode (ORIENTATION_TYPE type)
 
ORIENTATION_TYPE getOrientationType () const
 
PLANE_TYPE getPlaneType () const
 
Transform3D getToolPosition () const
 

Detailed Description

Calculates a slice plane given a definition.

SliceComputer is set up with what image to slice and the tool to use, along with what method that defines the slicing. The input produces a slice plane defined by the i,j basis vectors spanning the plane, and a center c defining the center.

Most methods set the computer state, while getPlane() does all the computing.

Definition at line 74 of file cxSliceComputer.h.

Constructor & Destructor Documentation

cx::SliceComputer::SliceComputer ( )

Initialize the computer with reasonable defaults.

Definition at line 60 of file cxSliceComputer.cpp.

cx::SliceComputer::~SliceComputer ( )

Definition at line 77 of file cxSliceComputer.cpp.

Member Function Documentation

ORIENTATION_TYPE cx::SliceComputer::getOrientationType ( ) const

Definition at line 145 of file cxSliceComputer.cpp.

SlicePlane cx::SliceComputer::getPlane ( ) const

Calculate a slice plane given the defined parameters.

Definition at line 237 of file cxSliceComputer.cpp.

PLANE_TYPE cx::SliceComputer::getPlaneType ( ) const

Definition at line 150 of file cxSliceComputer.cpp.

Transform3D cx::SliceComputer::getToolPosition ( ) const

Definition at line 155 of file cxSliceComputer.cpp.

void cx::SliceComputer::initializeFromPlane ( PLANE_TYPE  plane,
bool  useGravity,
const Vector3D gravityDir,
bool  useViewOffset,
double  viewportHeight,
double  toolViewOffset,
CLINICAL_VIEW  application,
bool  useConstrainedViewOffset = false 
)

Group the typical plane definition uses together.

Definition at line 83 of file cxSliceComputer.cpp.

void cx::SliceComputer::setClinicalApplication ( CLINICAL_VIEW  application)

Definition at line 140 of file cxSliceComputer.cpp.

void cx::SliceComputer::setFixedCenter ( const Vector3D center)

Set center to use as basis for center calculations if FOLLOW_CENTER is set.

Definition at line 186 of file cxSliceComputer.cpp.

void cx::SliceComputer::setFollowType ( FOLLOW_TYPE  val)

Set the follow type. FOLLOW_TOOL means place the center relative to the tool tip. FIXED_CENTER means place the center relative to the FixedCenter.

Definition at line 195 of file cxSliceComputer.cpp.

void cx::SliceComputer::setGravity ( bool  use,
const Vector3D dir 
)

Set the gravity direction. If used, the base planes will be oriented according to the gravity direction.

Definition at line 203 of file cxSliceComputer.cpp.

void cx::SliceComputer::setOrientationType ( ORIENTATION_TYPE  val)

Set planes to orient relative to the global space (ORTHOGONAL), or relative to the tool (OBLIQUE).

Definition at line 171 of file cxSliceComputer.cpp.

void cx::SliceComputer::setPlaneType ( PLANE_TYPE  val)

What plane to compute given the other settings.

Definition at line 178 of file cxSliceComputer.cpp.

void cx::SliceComputer::setToolOffset ( double  val)

Set a virtual extension of the tool.

Definition at line 211 of file cxSliceComputer.cpp.

void cx::SliceComputer::setToolPosition ( const Transform3D rMt)

Set the position of the navigation tool, using the standard definition of a tool transform (given in Tool).

Definition at line 163 of file cxSliceComputer.cpp.

void cx::SliceComputer::setToolViewOffset ( bool  use,
double  viewportHeight,
double  viewOffset,
bool  useConstrainedViewOffset = false 
)

Set the real tool center (without tooloffset) to a given distance from the top of a viewport. This is handled by setting the plane center accordingly. Overrides FollowType.

Definition at line 220 of file cxSliceComputer.cpp.

void cx::SliceComputer::setToolViewportHeight ( double  viewportHeight)

see setToolViewOffset()

Definition at line 230 of file cxSliceComputer.cpp.

void cx::SliceComputer::switchOrientationMode ( ORIENTATION_TYPE  type)

Switch an existing plane definition to its dual definition, i.e. Axial<->Radial Coronal<->Any Sagittal<->Dual Use initializeFromPlane() to set connected parameters.

Definition at line 109 of file cxSliceComputer.cpp.


The documentation for this class was generated from the following files: