OpenWalnut
1.5.0dev
|
Class to provide conversion for a given coordinate in 3D space. More...
#include <WCoordConverter.h>
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< WTalairachConverter > | getTalairachConverter () |
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< WTalairachConverter > | m_talairachConverter |
pointer to talairach convert for easy access More... | |
Class to provide conversion for a given coordinate in 3D space.
Definition at line 48 of file WCoordConverter.h.
WCoordConverter::WCoordConverter | ( | WMatrix< double > | rotMat, |
WVector3d | origin = WVector3d( 0, 0 , 0 ) , |
||
WVector3d | scale = WVector3d( 1.0, 1.0 , 1.0 ) |
||
) |
standard constructor
rotMat | rotation matrix |
origin | offset to point of origin |
scale | voxel size |
Definition at line 33 of file WCoordConverter.cpp.
|
virtual |
destructor
Definition at line 41 of file WCoordConverter.cpp.
transforms a vector from the canonical to the world coordinate system system
in | vector to transform |
Definition at line 158 of file WCoordConverter.cpp.
References m_boundingBox.
Referenced by t2w().
WBoundingBox WCoordConverter::getBoundingBox | ( | ) |
Gets the bounding box.
Definition at line 51 of file WCoordConverter.cpp.
References m_boundingBox.
coordinateSystemMode WCoordConverter::getCoordinateSystemMode | ( | ) |
getter for coordinate system mode
Definition at line 72 of file WCoordConverter.cpp.
References m_coordinateSystemMode.
std::shared_ptr< WTalairachConverter > WCoordConverter::getTalairachConverter | ( | ) |
getter for the talairach converter pointer
Definition at line 148 of file WCoordConverter.cpp.
References m_talairachConverter.
int WCoordConverter::numberToCsX | ( | int | number | ) |
converts a number on the x axis according to the currently selected coordinate system
number |
Definition at line 77 of file WCoordConverter.cpp.
References m_boundingBox, m_coordinateSystemMode, and w2t().
int WCoordConverter::numberToCsY | ( | int | number | ) |
converts a number on the y axis according to the currently selected coordinate system
number |
Definition at line 99 of file WCoordConverter.cpp.
References m_boundingBox, m_coordinateSystemMode, and w2t().
int WCoordConverter::numberToCsZ | ( | int | number | ) |
converts a number on the z axis according to the currently selected coordinate system
number |
Definition at line 121 of file WCoordConverter.cpp.
References m_boundingBox, m_coordinateSystemMode, and w2t().
Operator ()
in | vector to convert |
Definition at line 45 of file WCoordConverter.cpp.
void WCoordConverter::setBoundingBox | ( | WBoundingBox | boundingBox | ) |
Sets the bounding box of the volume.
boundingBox | The axis aligned bounding box. |
Definition at line 56 of file WCoordConverter.cpp.
References m_boundingBox.
void WCoordConverter::setCoordinateSystemMode | ( | coordinateSystemMode | mode | ) |
setter for coordinate system mode
mode |
Definition at line 67 of file WCoordConverter.cpp.
References m_coordinateSystemMode.
void WCoordConverter::setTalairachConverter | ( | std::shared_ptr< WTalairachConverter > | tc | ) |
setter for the talairach converter pointer
tc |
Definition at line 143 of file WCoordConverter.cpp.
References m_talairachConverter.
transforms a vector from the canonical system to the world coordinate system
in | vector to transform |
Definition at line 169 of file WCoordConverter.cpp.
References c2w(), and m_talairachConverter.
transforms a vector from the world coordinate system to the canonical system
in | vector to transform |
Definition at line 153 of file WCoordConverter.cpp.
References m_boundingBox.
Referenced by w2t().
transforms a vector from the world coordinate system to the talairach system
in | vector to transform |
Definition at line 164 of file WCoordConverter.cpp.
References m_talairachConverter, and w2c().
Referenced by numberToCsX(), numberToCsY(), and numberToCsZ().
Transforms world coordinates.
point | The point which will be transformed. |
Definition at line 61 of file WCoordConverter.cpp.
References m_rotMat.
|
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().
|
private |
the currently selected coordinate system mode
Definition at line 181 of file WCoordConverter.h.
Referenced by getCoordinateSystemMode(), numberToCsX(), numberToCsY(), numberToCsZ(), and setCoordinateSystemMode().
|
private |
the offset to the point of origin
Definition at line 175 of file WCoordConverter.h.
|
private |
the rotation matrix to use
Definition at line 173 of file WCoordConverter.h.
Referenced by worldCoordTransformed().
|
private |
scaling of voxels
Definition at line 177 of file WCoordConverter.h.
|
private |
pointer to talairach convert for easy access
Definition at line 183 of file WCoordConverter.h.
Referenced by getTalairachConverter(), setTalairachConverter(), t2w(), and w2t().