16 #ifndef MITKTRANSFORM_H
17 #define MITKTRANSFORM_H
19 #include <itkObject.h>
26 #include <vtkMatrix4x4.h>
28 #include <MitkCameraCalibrationExports.h>
40 class MITKCAMERACALIBRATION_EXPORT
Transform:
public itk::Object,
67 itkGetConstMacro(Type, std::string);
68 itkSetMacro(Type, std::string&);
87 void TransposeRotation();
105 void Concatenate(
const vnl_matrix_fixed<mitk::ScalarType, 4, 4>& transform );
110 void Concatenate(
const vtkMatrix4x4* transform );
124 void FromXML(TiXmlElement* elem)
override;
128 void FromCSVFile(
const std::string& file);
136 void SetOrientation(
const vnl_quaternion<mitk::ScalarType>& orientation);
140 void SetOrientation(
const vnl_quaternion<float>& orientation);
144 void SetTranslation(
const vnl_vector_fixed<mitk::ScalarType, 3>& transl);
148 void SetTranslation(
const vnl_vector<double>& transl);
156 void SetRotation( vnl_matrix_fixed<mitk::ScalarType, 3, 3>& mat);
160 void SetRotation( vnl_matrix<mitk::ScalarType>& mat);
164 void SetMatrix(
const vnl_matrix_fixed<mitk::ScalarType, 4, 4>& mat);
168 void SetMatrix(
const vtkMatrix4x4* mat);
172 void SetTranslation(
float* array );
178 void SetRotation(
float* array );
182 void SetTranslation(
double array[3] );
186 void SetRotation(
double array[3][3] );
191 void SetTranslation(
const cv::Mat& transl);
195 void SetRotation(
const cv::Mat& mat );
199 void SetRotationVector(
const cv::Mat& rotVec);
216 bool IsValid()
const;
220 void SetValid(
bool valid);
230 vnl_matrix_fixed<mitk::ScalarType, 4, 4> GetMatrix()
const;
234 void GetMatrix(vtkMatrix4x4* matrix)
const;
239 void GetVtkOpenGlMatrix(vtkMatrix4x4* matrix)
const;
246 void ToXML(TiXmlElement* elem)
const override;
250 std::string ToString()
const;
254 std::string ToCSVString()
const;
258 std::string ToMatlabString(
const std::string& varname=
"transform",
259 bool printLastRow=
true)
const;
263 void ToCSVFile(
const std::string& file)
const;
267 void ToMatlabFile(
const std::string& file
268 ,
const std::string& varname=
"transform")
const;
272 cv::Mat GetCvTranslation()
const;
273 cv::Mat GetCvRotationVector()
const;
274 cv::Mat GetCvRotationMatrix()
const;
275 cv::Mat GetCvMatrix()
const;
280 vnl_vector_fixed<mitk::ScalarType, 3> GetVnlTranslation()
const;
281 vnl_vector_fixed<double, 3> GetVnlDoubleTranslation()
const;
282 vnl_quaternion<double> GetVnlDoubleQuaternion()
const;
283 vnl_matrix_fixed<mitk::ScalarType, 3, 3> GetVnlRotationMatrix()
const;
284 vnl_matrix_fixed<double, 4, 4> GetVnlDoubleMatrix()
const;
302 MITKCAMERACALIBRATION_EXPORT std::ostream&
operator<<
305 #endif // MITKTRANSFORM_H
itk::SmartPointer< Self > Pointer
#define mitkNewMacro1Param(classname, type)
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
vnl_quaternion< ScalarType > Quaternion
interface for all classes able to write themselves to XML files