12 #ifndef MITKTRANSFORM_H 13 #define MITKTRANSFORM_H 15 #include <itkObject.h> 16 #include <opencv2/calib3d.hpp> 22 #include <vtkMatrix4x4.h> 24 #include <MitkCameraCalibrationExports.h> 36 class MITKCAMERACALIBRATION_EXPORT
Transform:
public itk::Object,
63 itkGetConstMacro(Type, std::string);
64 itkSetMacro(Type, std::string&);
83 void TransposeRotation();
88 mitk::Transform::Pointer
Clone()
const;
101 void Concatenate(
const vnl_matrix_fixed<mitk::ScalarType, 4, 4>& transform );
106 void Concatenate(
const vtkMatrix4x4* transform );
120 void FromXML(TiXmlElement* elem)
override;
124 void FromCSVFile(
const std::string& file);
132 void SetOrientation(
const vnl_quaternion<mitk::ScalarType>& orientation);
136 void SetOrientation(
const vnl_quaternion<float>& orientation);
140 void SetTranslation(
const vnl_vector_fixed<mitk::ScalarType, 3>& transl);
144 void SetTranslation(
const vnl_vector<double>& transl);
152 void SetRotation( vnl_matrix_fixed<mitk::ScalarType, 3, 3>& mat);
156 void SetRotation( vnl_matrix<mitk::ScalarType>& mat);
160 void SetMatrix(
const vnl_matrix_fixed<mitk::ScalarType, 4, 4>& mat);
164 void SetMatrix(
const vtkMatrix4x4* mat);
168 void SetTranslation(
float* array );
174 void SetRotation(
float* array );
178 void SetTranslation(
double array[3] );
182 void SetRotation(
double array[3][3] );
187 void SetTranslation(
const cv::Mat& transl);
191 void SetRotation(
const cv::Mat& mat );
195 void SetRotationVector(
const cv::Mat& rotVec);
200 mitk::NavigationData::Pointer GetNavigationData()
const;
212 bool IsValid()
const;
216 void SetValid(
bool valid);
226 vnl_matrix_fixed<mitk::ScalarType, 4, 4> GetMatrix()
const;
230 void GetMatrix(vtkMatrix4x4* matrix)
const;
235 void GetVtkOpenGlMatrix(vtkMatrix4x4* matrix)
const;
242 void ToXML(TiXmlElement* elem)
const override;
246 std::string ToString()
const;
250 std::string ToCSVString()
const;
254 std::string ToMatlabString(
const std::string& varname=
"transform",
255 bool printLastRow=
true)
const;
259 void ToCSVFile(
const std::string& file)
const;
263 void ToMatlabFile(
const std::string& file
264 ,
const std::string& varname=
"transform")
const;
268 cv::Mat GetCvTranslation()
const;
269 cv::Mat GetCvRotationVector()
const;
270 cv::Mat GetCvRotationMatrix()
const;
271 cv::Mat GetCvMatrix()
const;
276 vnl_vector_fixed<mitk::ScalarType, 3> GetVnlTranslation()
const;
277 vnl_vector_fixed<double, 3> GetVnlDoubleTranslation()
const;
278 vnl_quaternion<double> GetVnlDoubleQuaternion()
const;
279 vnl_matrix_fixed<mitk::ScalarType, 3, 3> GetVnlRotationMatrix()
const;
280 vnl_matrix_fixed<double, 4, 4> GetVnlDoubleMatrix()
const;
298 MITKCAMERACALIBRATION_EXPORT std::ostream&
operator<<
299 (std::ostream& os, mitk::Transform::Pointer p);
301 #endif // MITKTRANSFORM_H
#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