Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
class representing a transfrom in 3D More...
#include <mitkTransform.h>
Public Member Functions | |
mitkClassMacroItkParent (Transform, itk::Object) | |
mitkNewMacro1Param (Transform, const mitk::NavigationData *) | |
mitkNewMacro1Param (Transform, const std::string &) | |
virtual std::string | GetType () const |
virtual void | SetType (std::string &_arg) |
void | Copy (const mitk::Transform *transform) |
void | Copy (const mitk::NavigationData *transform) |
void | TransposeRotation () |
mitk::Transform::Pointer | Clone () const |
void | Concatenate (mitk::Transform *transform) |
void | Concatenate (const vnl_matrix_fixed< mitk::ScalarType, 4, 4 > &transform) |
void | Concatenate (const vtkMatrix4x4 *transform) |
void | Invert () |
void | Reset () |
void | FromXML (TiXmlElement *elem) override |
void | FromCSVFile (const std::string &file) |
void | SetNavigationData (const mitk::NavigationData *naviData) |
void | SetOrientation (const vnl_quaternion< mitk::ScalarType > &orientation) |
void | SetOrientation (const vnl_quaternion< float > &orientation) |
void | SetTranslation (const vnl_vector_fixed< mitk::ScalarType, 3 > &transl) |
void | SetTranslation (const vnl_vector< double > &transl) |
void | SetPosition (const mitk::Point3D &transl) |
void | SetRotation (vnl_matrix_fixed< mitk::ScalarType, 3, 3 > &mat) |
void | SetRotation (vnl_matrix< mitk::ScalarType > &mat) |
void | SetMatrix (const vnl_matrix_fixed< mitk::ScalarType, 4, 4 > &mat) |
void | SetMatrix (const vtkMatrix4x4 *mat) |
void | SetTranslation (float *array) |
void | SetRotation (float *array) |
void | SetTranslation (double array[3]) |
void | SetRotation (double array[3][3]) |
void | SetTranslation (const cv::Mat &transl) |
void | SetRotation (const cv::Mat &mat) |
void | SetRotationVector (const cv::Mat &rotVec) |
mitk::NavigationData::Pointer | GetNavigationData () const |
mitk::Point3D | GetPosition () const |
mitk::Point3D | GetTranslation () const |
bool | IsValid () const |
void | SetValid (bool valid) |
mitk::Quaternion | GetOrientation () const |
vnl_matrix_fixed< mitk::ScalarType, 4, 4 > | GetMatrix () const |
void | GetMatrix (vtkMatrix4x4 *matrix) const |
void | GetVtkOpenGlMatrix (vtkMatrix4x4 *matrix) const |
mitk::Point3D | TransformPoint (mitk::Point3D point) const |
void | ToXML (TiXmlElement *elem) const override |
std::string | ToString () const |
std::string | ToCSVString () const |
std::string | ToMatlabString (const std::string &varname="transform", bool printLastRow=true) const |
void | ToCSVFile (const std::string &file) const |
void | ToMatlabFile (const std::string &file, const std::string &varname="transform") const |
cv::Mat | GetCvTranslation () const |
cv::Mat | GetCvRotationVector () const |
cv::Mat | GetCvRotationMatrix () const |
cv::Mat | GetCvMatrix () const |
vnl_vector_fixed< mitk::ScalarType, 3 > | GetVnlTranslation () const |
vnl_vector_fixed< double, 3 > | GetVnlDoubleTranslation () const |
vnl_quaternion< double > | GetVnlDoubleQuaternion () const |
vnl_matrix_fixed< mitk::ScalarType, 3, 3 > | GetVnlRotationMatrix () const |
vnl_matrix_fixed< double, 4, 4 > | GetVnlDoubleMatrix () const |
Public Member Functions inherited from mitk::XMLSerializable | |
virtual const char * | GetNameOfClass () const =0 |
virtual void | ToXMLFile (const std::string &file, const std::string &elemName="") |
virtual void | FromXMLFile (const std::string &file, const std::string &elemName="") |
std::string | GetXMLFileName () const |
Static Public Member Functions | |
static Pointer | New () |
Static Public Attributes | |
static const std::string | UNKNOWN_TYPE |
static const std::string | ENDOSCOPE_SCOPE_TOOL |
static const std::string | ENDOSCOPE_CAM_TOOL |
static const std::string | CHESSBOARD_TOOL |
static const std::string | POINTER_TOOL |
static const std::string | POINTER_TO_CHESSBOARD_ORIGIN |
static const std::string | POINTER_TO_CHESSBOARD_X_SUPPORT_POINT |
static const std::string | POINTER_TO_CHESSBOARD_Y_SUPPORT_POINT |
static const std::string | BOARD_TO_BOARD_TOOL |
static const std::string | REFERENCE_CAMERA_TRANSFORM |
static const std::string | REFERENCE_SCOPE_TRANSFORM |
static const std::string | EYE_TO_HAND_TRANSFORM |
static const std::string | CAMERA_EXTRINSICS |
Static Public Attributes inherited from mitk::XMLSerializable | |
static const std::string | FILE_REFERENCE_ATTRIBUTE_NAME |
static const std::string | ROOT_NAME |
Protected Member Functions | |
Transform () | |
Transform (const mitk::NavigationData *nd) | |
Transform (const std::string &s) | |
Protected Attributes | |
mitk::NavigationData::Pointer | m_NavData |
std::string | m_Type |
class representing a transfrom in 3D
internally it stores a mitk navigation data. this is more or less a wrapper for navigation data for easy casting between opencv/vnl/mitk/xml representations of transform data
Definition at line 40 of file mitkTransform.h.
|
protected |
Definition at line 40 of file mitkTransform.cpp.
References SetRotation().
|
protected |
Definition at line 48 of file mitkTransform.cpp.
References m_NavData.
|
protected |
Definition at line 54 of file mitkTransform.cpp.
References SetRotation().
mitk::Transform::Pointer mitk::Transform::Clone | ( | ) | const |
void mitk::Transform::Concatenate | ( | mitk::Transform * | transform | ) |
concatenate this transform with the given one, i.e. this transform is done first, then transform ( if x is this transform, y is transform, then this will be y*x) post multiply semantics!
Definition at line 67 of file mitkTransform.cpp.
References GetMatrix(), and SetMatrix().
Referenced by Concatenate().
void mitk::Transform::Concatenate | ( | const vnl_matrix_fixed< mitk::ScalarType, 4, 4 > & | transform | ) |
same as above with vnl mat argument
Definition at line 75 of file mitkTransform.cpp.
References Concatenate(), and New().
void mitk::Transform::Concatenate | ( | const vtkMatrix4x4 * | transform | ) |
same as above with vtk mat argument
Definition at line 83 of file mitkTransform.cpp.
References Concatenate(), and New().
void mitk::Transform::Copy | ( | const mitk::Transform * | transform | ) |
Copies the content of transform to this instance
Definition at line 264 of file mitkTransform.cpp.
References GetNavigationData(), GetType(), m_NavData, and m_Type.
Referenced by Reset().
void mitk::Transform::Copy | ( | const mitk::NavigationData * | transform | ) |
Copies the content of transform to this instance
Definition at line 62 of file mitkTransform.cpp.
References m_NavData.
void mitk::Transform::FromCSVFile | ( | const std::string & | file | ) |
read csv file
Definition at line 184 of file mitkTransform.cpp.
References endoAssert, line, New(), and SetNavigationData().
|
overridevirtual |
read from xml
Implements mitk::XMLSerializable.
Definition at line 657 of file mitkTransform.cpp.
References mitk::NavigationData::New(), and UNKNOWN_TYPE.
cv::Mat mitk::Transform::GetCvMatrix | ( | ) | const |
Definition at line 497 of file mitkTransform.cpp.
References GetMatrix(), and mitk::CvMatFromVnlMatrix< T >::Update().
cv::Mat mitk::Transform::GetCvRotationMatrix | ( | ) | const |
Definition at line 487 of file mitkTransform.cpp.
References endodebugvar, GetVnlRotationMatrix(), and mitk::CvMatFromVnlMatrix< T >::Update().
Referenced by GetCvRotationVector().
cv::Mat mitk::Transform::GetCvRotationVector | ( | ) | const |
Definition at line 506 of file mitkTransform.cpp.
References GetCvRotationMatrix().
cv::Mat mitk::Transform::GetCvTranslation | ( | ) | const |
conversion to cv types
Definition at line 477 of file mitkTransform.cpp.
References endodebugvar, GetVnlTranslation(), and mitk::CvMatFromVnlVector< T >::Update().
vnl_matrix_fixed< mitk::ScalarType, 4, 4 > mitk::Transform::GetMatrix | ( | ) | const |
Definition at line 539 of file mitkTransform.cpp.
References GetVnlRotationMatrix(), and GetVnlTranslation().
Referenced by Concatenate(), GetCvMatrix(), GetMatrix(), GetVnlDoubleMatrix(), Invert(), ToCSVString(), and ToMatlabString().
void mitk::Transform::GetMatrix | ( | vtkMatrix4x4 * | matrix | ) | const |
Definition at line 431 of file mitkTransform.cpp.
References GetMatrix().
mitk::NavigationData::Pointer mitk::Transform::GetNavigationData | ( | ) | const |
Definition at line 411 of file mitkTransform.cpp.
References m_NavData.
Referenced by Copy().
mitk::Quaternion mitk::Transform::GetOrientation | ( | ) | const |
calls navigationdata::GetOrientation()
Definition at line 426 of file mitkTransform.cpp.
References m_NavData.
Referenced by GetVnlDoubleQuaternion().
mitk::Point3D mitk::Transform::GetPosition | ( | ) | const |
calls navigationdata::GetPosition()
Definition at line 421 of file mitkTransform.cpp.
References m_NavData.
Referenced by GetVtkOpenGlMatrix(), and TransformPoint().
mitk::Point3D mitk::Transform::GetTranslation | ( | ) | const |
|
virtual |
Referenced by Copy().
vnl_matrix_fixed< double, 4, 4 > mitk::Transform::GetVnlDoubleMatrix | ( | ) | const |
Definition at line 526 of file mitkTransform.cpp.
References GetMatrix().
vnl_quaternion< double > mitk::Transform::GetVnlDoubleQuaternion | ( | ) | const |
Definition at line 174 of file mitkTransform.cpp.
References GetOrientation(), and mitk::VnlVectorFixedCaster< T, R, n >::Update().
vnl_vector_fixed< double, 3 > mitk::Transform::GetVnlDoubleTranslation | ( | ) | const |
Definition at line 154 of file mitkTransform.cpp.
References GetVnlTranslation(), and mitk::VnlVectorFixedCaster< T, R, n >::Update().
vnl_matrix_fixed< mitk::ScalarType, 3, 3 > mitk::Transform::GetVnlRotationMatrix | ( | ) | const |
Definition at line 521 of file mitkTransform.cpp.
References m_NavData.
Referenced by GetCvRotationMatrix(), GetMatrix(), GetVtkOpenGlMatrix(), TransformPoint(), and TransposeRotation().
vnl_vector_fixed< mitk::ScalarType, 3 > mitk::Transform::GetVnlTranslation | ( | ) | const |
conversion to vnl types
Definition at line 514 of file mitkTransform.cpp.
References m_NavData.
Referenced by GetCvTranslation(), GetMatrix(), and GetVnlDoubleTranslation().
void mitk::Transform::GetVtkOpenGlMatrix | ( | vtkMatrix4x4 * | matrix | ) | const |
Definition at line 439 of file mitkTransform.cpp.
References GetPosition(), GetVnlRotationMatrix(), and New().
void mitk::Transform::Invert | ( | ) |
invert this transform
Definition at line 349 of file mitkTransform.cpp.
References GetMatrix(), and SetMatrix().
bool mitk::Transform::IsValid | ( | ) | const |
calls navigationdata::IsValid()
Definition at line 372 of file mitkTransform.cpp.
References m_NavData.
mitk::Transform::mitkClassMacroItkParent | ( | Transform | , |
itk::Object | |||
) |
mitk::Transform::mitkNewMacro1Param | ( | Transform | , |
const mitk::NavigationData * | |||
) |
mitk::Transform::mitkNewMacro1Param | ( | Transform | , |
const std::string & | |||
) |
|
static |
Referenced by Clone(), Concatenate(), FromCSVFile(), and GetVtkOpenGlMatrix().
void mitk::Transform::Reset | ( | ) |
resets the internal variables except type
Definition at line 90 of file mitkTransform.cpp.
References Copy(), and mitk::NavigationData::New().
void mitk::Transform::SetMatrix | ( | const vnl_matrix_fixed< mitk::ScalarType, 4, 4 > & | mat | ) |
sets rotation and translation with a transformation matrix
Definition at line 355 of file mitkTransform.cpp.
References m_NavData, and SetRotation().
Referenced by Concatenate(), Invert(), and SetMatrix().
void mitk::Transform::SetMatrix | ( | const vtkMatrix4x4 * | mat | ) |
sets rotation and translation with a vtk transformation matrix
Definition at line 277 of file mitkTransform.cpp.
References SetMatrix().
void mitk::Transform::SetNavigationData | ( | const mitk::NavigationData * | naviData | ) |
grafts the data from naviData to this transform
Definition at line 306 of file mitkTransform.cpp.
References endoAssert, and m_NavData.
Referenced by FromCSVFile().
void mitk::Transform::SetOrientation | ( | const vnl_quaternion< mitk::ScalarType > & | orientation | ) |
method to set orientation quat
Definition at line 96 of file mitkTransform.cpp.
References m_NavData.
Referenced by SetOrientation().
void mitk::Transform::SetOrientation | ( | const vnl_quaternion< float > & | orientation | ) |
method to set float valued orientation quat
Definition at line 143 of file mitkTransform.cpp.
References SetOrientation(), and mitk::VnlVectorFixedCaster< T, R, n >::Update().
void mitk::Transform::SetPosition | ( | const mitk::Point3D & | transl | ) |
method to set a mitk::Point3D as position
Definition at line 325 of file mitkTransform.cpp.
References SetTranslation().
void mitk::Transform::SetRotation | ( | vnl_matrix_fixed< mitk::ScalarType, 3, 3 > & | mat | ) |
sets rotation with a rotation matrix
Definition at line 313 of file mitkTransform.cpp.
References m_NavData.
Referenced by SetMatrix(), SetRotation(), SetRotationVector(), Transform(), and TransposeRotation().
void mitk::Transform::SetRotation | ( | vnl_matrix< mitk::ScalarType > & | mat | ) |
sets rotation with a non fixed rotation matrix
Definition at line 319 of file mitkTransform.cpp.
References SetRotation().
void mitk::Transform::SetRotation | ( | float * | array | ) |
sets translation from a POD vector. this must be a 3x3=9 sized vector in row major format (first row = first three elements)
Definition at line 122 of file mitkTransform.cpp.
References SetRotation().
void mitk::Transform::SetRotation | ( | double | array[3][3] | ) |
sets translation from a POD vector
Definition at line 339 of file mitkTransform.cpp.
References SetRotation().
void mitk::Transform::SetRotation | ( | const cv::Mat & | mat | ) |
sets rotation with a rotation matrix
Definition at line 385 of file mitkTransform.cpp.
References SetRotation(), and mitk::VnlMatrixFromCvMat< T >::Update().
void mitk::Transform::SetRotationVector | ( | const cv::Mat & | rotVec | ) |
sets rotation with a rodrigues rotation vector
Definition at line 395 of file mitkTransform.cpp.
References SetRotation(), and mitk::VnlMatrixFromCvMat< T >::Update().
void mitk::Transform::SetTranslation | ( | const vnl_vector_fixed< mitk::ScalarType, 3 > & | transl | ) |
method to set translation
Definition at line 103 of file mitkTransform.cpp.
References m_NavData.
Referenced by SetPosition(), and SetTranslation().
void mitk::Transform::SetTranslation | ( | const vnl_vector< double > & | transl | ) |
method to set a vector of doubles as translation
Definition at line 164 of file mitkTransform.cpp.
References SetTranslation(), and mitk::VnlVectorFixedCaster< T, R, n >::Update().
void mitk::Transform::SetTranslation | ( | float * | array | ) |
sets translation from a POD vector
Definition at line 114 of file mitkTransform.cpp.
References SetTranslation().
void mitk::Transform::SetTranslation | ( | double | array[3] | ) |
sets translation from a POD vector
Definition at line 330 of file mitkTransform.cpp.
References SetTranslation().
void mitk::Transform::SetTranslation | ( | const cv::Mat & | transl | ) |
method to set translation by cv vector
Definition at line 377 of file mitkTransform.cpp.
References SetTranslation(), and mitk::VnlVectorFromCvMat< T >::Update().
|
virtual |
void mitk::Transform::SetValid | ( | bool | valid | ) |
calls navigationdata::SetValid()
Definition at line 563 of file mitkTransform.cpp.
References m_NavData.
void mitk::Transform::ToCSVFile | ( | const std::string & | file | ) | const |
write csv representation to file (only the transformation values!!!!)
Definition at line 287 of file mitkTransform.cpp.
References endoAssert, and ToCSVString().
std::string mitk::Transform::ToCSVString | ( | ) | const |
create string csv representation (only the transformation values!!!!)
Definition at line 217 of file mitkTransform.cpp.
References GetMatrix().
Referenced by ToCSVFile().
void mitk::Transform::ToMatlabFile | ( | const std::string & | file, |
const std::string & | varname = "transform" |
||
) | const |
write matlab representation to file
Definition at line 296 of file mitkTransform.cpp.
References endoAssert, and ToMatlabString().
std::string mitk::Transform::ToMatlabString | ( | const std::string & | varname = "transform" , |
bool | printLastRow = true |
||
) | const |
create matlab representation
Definition at line 240 of file mitkTransform.cpp.
References GetMatrix().
Referenced by ToMatlabFile().
std::string mitk::Transform::ToString | ( | ) | const |
create string representation
Definition at line 572 of file mitkTransform.cpp.
|
overridevirtual |
create xml representation
Implements mitk::XMLSerializable.
Definition at line 592 of file mitkTransform.cpp.
mitk::Point3D mitk::Transform::TransformPoint | ( | mitk::Point3D | point | ) | const |
Definition at line 465 of file mitkTransform.cpp.
References GetPosition(), and GetVnlRotationMatrix().
void mitk::Transform::TransposeRotation | ( | ) |
Inverts the rotation of this transform (Polaris navigation Data have inverted rotation so you may want to call this function when using polaris data)
Definition at line 557 of file mitkTransform.cpp.
References GetVnlRotationMatrix(), and SetRotation().
|
static |
Definition at line 61 of file mitkTransform.h.
|
static |
Definition at line 65 of file mitkTransform.h.
|
static |
Definition at line 56 of file mitkTransform.h.
|
static |
Definition at line 55 of file mitkTransform.h.
|
static |
Definition at line 54 of file mitkTransform.h.
|
static |
Definition at line 64 of file mitkTransform.h.
|
protected |
Definition at line 292 of file mitkTransform.h.
Referenced by Copy(), GetNavigationData(), GetOrientation(), GetPosition(), GetTranslation(), GetVnlRotationMatrix(), GetVnlTranslation(), IsValid(), SetMatrix(), SetNavigationData(), SetOrientation(), SetRotation(), SetTranslation(), SetValid(), and Transform().
|
protected |
saves the type of the transform (Default is UNKNOWN_TYPE)
Definition at line 297 of file mitkTransform.h.
Referenced by Copy().
|
static |
Definition at line 58 of file mitkTransform.h.
|
static |
Definition at line 59 of file mitkTransform.h.
|
static |
Definition at line 60 of file mitkTransform.h.
|
static |
Definition at line 57 of file mitkTransform.h.
|
static |
Definition at line 62 of file mitkTransform.h.
|
static |
Definition at line 63 of file mitkTransform.h.
|
static |
constants describing the type of transform represented here
Definition at line 53 of file mitkTransform.h.
Referenced by FromXML().