OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WCoordConverter Class Reference

Class to provide conversion for a given coordinate in 3D space. More...

#include <WCoordConverter.h>

+ Collaboration diagram for WCoordConverter:

Public Member Functions

 WCoordConverter (WMatrix< double > rotMat, WVector3d origin=WVector3d(0, 0, 0), WVector3d scale=WVector3d(1.0, 1.0, 1.0))
 standard constructor More...
 
virtual ~WCoordConverter ()
 destructor More...
 
WVector3d operator() (WVector3d in)
 Operator () More...
 
WVector3d worldCoordTransformed (WPosition point)
 Transforms world coordinates. More...
 
WBoundingBox getBoundingBox ()
 Gets the bounding box. More...
 
void setBoundingBox (WBoundingBox boundingBox)
 Sets the bounding box of the volume. More...
 
void setCoordinateSystemMode (coordinateSystemMode mode)
 setter for coordinate system mode More...
 
coordinateSystemMode getCoordinateSystemMode ()
 getter for coordinate system mode More...
 
int numberToCsX (int number)
 converts a number on the x axis according to the currently selected coordinate system More...
 
int numberToCsY (int number)
 converts a number on the y axis according to the currently selected coordinate system More...
 
int numberToCsZ (int number)
 converts a number on the z axis according to the currently selected coordinate system More...
 
WVector3d w2c (WVector3d in)
 transforms a vector from the world coordinate system to the canonical system More...
 
WVector3d c2w (WVector3d in)
 transforms a vector from the canonical to the world coordinate system system More...
 
WVector3d w2t (WVector3d in)
 transforms a vector from the world coordinate system to the talairach system More...
 
WVector3d t2w (WVector3d in)
 transforms a vector from the canonical system to the world coordinate system More...
 
void setTalairachConverter (std::shared_ptr< WTalairachConverter > tc)
 setter for the talairach converter pointer More...
 
std::shared_ptr< WTalairachConvertergetTalairachConverter ()
 getter for the talairach converter pointer More...
 

Private Attributes

WMatrix< double > m_rotMat
 the rotation matrix to use More...
 
WVector3d m_origin
 the offset to the point of origin More...
 
WVector3d m_scale
 scaling of voxels More...
 
WBoundingBox m_boundingBox
 bounding box of the wholy volume as provided by the dataset More...
 
coordinateSystemMode m_coordinateSystemMode
 the currently selected coordinate system mode More...
 
std::shared_ptr< WTalairachConverterm_talairachConverter
 pointer to talairach convert for easy access More...
 

Detailed Description

Class to provide conversion for a given coordinate in 3D space.

Definition at line 48 of file WCoordConverter.h.

Constructor & Destructor Documentation

◆ WCoordConverter()

WCoordConverter::WCoordConverter ( WMatrix< double >  rotMat,
WVector3d  origin = WVector3d( 0, 0 , 0 ),
WVector3d  scale = WVector3d( 1.0, 1.0 , 1.0 ) 
)

standard constructor

Parameters
rotMatrotation matrix
originoffset to point of origin
scalevoxel size

Definition at line 33 of file WCoordConverter.cpp.

◆ ~WCoordConverter()

WCoordConverter::~WCoordConverter ( )
virtual

destructor

Definition at line 41 of file WCoordConverter.cpp.

Member Function Documentation

◆ c2w()

WVector3d WCoordConverter::c2w ( WVector3d  in)

transforms a vector from the canonical to the world coordinate system system

Parameters
invector to transform
Returns
WVector3d the transformed vector

Definition at line 158 of file WCoordConverter.cpp.

References m_boundingBox.

Referenced by t2w().

+ Here is the caller graph for this function:

◆ getBoundingBox()

WBoundingBox WCoordConverter::getBoundingBox ( )

Gets the bounding box.

Returns
The axis aligned bounding box

Definition at line 51 of file WCoordConverter.cpp.

References m_boundingBox.

◆ getCoordinateSystemMode()

coordinateSystemMode WCoordConverter::getCoordinateSystemMode ( )

getter for coordinate system mode

Returns
the mode

Definition at line 72 of file WCoordConverter.cpp.

References m_coordinateSystemMode.

◆ getTalairachConverter()

std::shared_ptr< WTalairachConverter > WCoordConverter::getTalairachConverter ( )

getter for the talairach converter pointer

Returns
pointer

Definition at line 148 of file WCoordConverter.cpp.

References m_talairachConverter.

◆ numberToCsX()

int WCoordConverter::numberToCsX ( int  number)

converts a number on the x axis according to the currently selected coordinate system

Parameters
number
Returns
the number transformed

Definition at line 77 of file WCoordConverter.cpp.

References m_boundingBox, m_coordinateSystemMode, and w2t().

+ Here is the call graph for this function:

◆ numberToCsY()

int WCoordConverter::numberToCsY ( int  number)

converts a number on the y axis according to the currently selected coordinate system

Parameters
number
Returns
the number transformed

Definition at line 99 of file WCoordConverter.cpp.

References m_boundingBox, m_coordinateSystemMode, and w2t().

+ Here is the call graph for this function:

◆ numberToCsZ()

int WCoordConverter::numberToCsZ ( int  number)

converts a number on the z axis according to the currently selected coordinate system

Parameters
number
Returns
the number transformed

Definition at line 121 of file WCoordConverter.cpp.

References m_boundingBox, m_coordinateSystemMode, and w2t().

+ Here is the call graph for this function:

◆ operator()()

WVector3d WCoordConverter::operator() ( WVector3d  in)

Operator ()

Parameters
invector to convert
Returns
converted vector

Definition at line 45 of file WCoordConverter.cpp.

◆ setBoundingBox()

void WCoordConverter::setBoundingBox ( WBoundingBox  boundingBox)

Sets the bounding box of the volume.

Parameters
boundingBoxThe axis aligned bounding box.

Definition at line 56 of file WCoordConverter.cpp.

References m_boundingBox.

◆ setCoordinateSystemMode()

void WCoordConverter::setCoordinateSystemMode ( coordinateSystemMode  mode)

setter for coordinate system mode

Parameters
mode

Definition at line 67 of file WCoordConverter.cpp.

References m_coordinateSystemMode.

◆ setTalairachConverter()

void WCoordConverter::setTalairachConverter ( std::shared_ptr< WTalairachConverter tc)

setter for the talairach converter pointer

Parameters
tc

Definition at line 143 of file WCoordConverter.cpp.

References m_talairachConverter.

◆ t2w()

WVector3d WCoordConverter::t2w ( WVector3d  in)

transforms a vector from the canonical system to the world coordinate system

Parameters
invector to transform
Returns
WVector3d the transformed vector

Definition at line 169 of file WCoordConverter.cpp.

References c2w(), and m_talairachConverter.

+ Here is the call graph for this function:

◆ w2c()

WVector3d WCoordConverter::w2c ( WVector3d  in)

transforms a vector from the world coordinate system to the canonical system

Parameters
invector to transform
Returns
WVector3d the transformed vector

Definition at line 153 of file WCoordConverter.cpp.

References m_boundingBox.

Referenced by w2t().

+ Here is the caller graph for this function:

◆ w2t()

WVector3d WCoordConverter::w2t ( WVector3d  in)

transforms a vector from the world coordinate system to the talairach system

Parameters
invector to transform
Returns
WVector3d the transformed vector

Definition at line 164 of file WCoordConverter.cpp.

References m_talairachConverter, and w2c().

Referenced by numberToCsX(), numberToCsY(), and numberToCsZ().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ worldCoordTransformed()

WVector3d WCoordConverter::worldCoordTransformed ( WPosition  point)

Transforms world coordinates.

Parameters
pointThe point which will be transformed.
Returns
the transformed world coordinate

Definition at line 61 of file WCoordConverter.cpp.

References m_rotMat.

Member Data Documentation

◆ m_boundingBox

WBoundingBox WCoordConverter::m_boundingBox
private

bounding box of the wholy volume as provided by the dataset

Definition at line 179 of file WCoordConverter.h.

Referenced by c2w(), getBoundingBox(), numberToCsX(), numberToCsY(), numberToCsZ(), setBoundingBox(), and w2c().

◆ m_coordinateSystemMode

coordinateSystemMode WCoordConverter::m_coordinateSystemMode
private

the currently selected coordinate system mode

Definition at line 181 of file WCoordConverter.h.

Referenced by getCoordinateSystemMode(), numberToCsX(), numberToCsY(), numberToCsZ(), and setCoordinateSystemMode().

◆ m_origin

WVector3d WCoordConverter::m_origin
private

the offset to the point of origin

Definition at line 175 of file WCoordConverter.h.

◆ m_rotMat

WMatrix<double> WCoordConverter::m_rotMat
private

the rotation matrix to use

Definition at line 173 of file WCoordConverter.h.

Referenced by worldCoordTransformed().

◆ m_scale

WVector3d WCoordConverter::m_scale
private

scaling of voxels

Definition at line 177 of file WCoordConverter.h.

◆ m_talairachConverter

std::shared_ptr<WTalairachConverter> WCoordConverter::m_talairachConverter
private

pointer to talairach convert for easy access

Definition at line 183 of file WCoordConverter.h.

Referenced by getTalairachConverter(), setTalairachConverter(), t2w(), and w2t().


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