12 #ifndef CXTRANSFORM3D_H_ 13 #define CXTRANSFORM3D_H_ 15 #include "cxResourceExport.h" 18 #include <boost/array.hpp> 19 #include <boost/shared_ptr.hpp> 32 cxResource_EXPORT boost::array<double, 16>
flatten(
const Eigen::Affine3d*
self);
35 cxResource_EXPORT
void fill(Eigen::Affine3d*
self,
float m[4][4]);
36 cxResource_EXPORT
void fill(Eigen::Affine3d*
self,
const double* raw);
38 cxResource_EXPORT std::ostream&
put(
const Eigen::Affine3d*
self, std::ostream& s,
int indent,
char newline);
39 cxResource_EXPORT Eigen::Affine3d
fromString(
const QString& text,
bool* _ok);
47 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
48 std::ostream& operator<<(std::ostream& s, const Eigen::Transform<_Scalar, _Dim, _Mode, _Options>& t)
50 s << t.matrix().format(IOFormat());
55 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
56 Vector3d Transform<_Scalar, _Dim, _Mode, _Options>::vector(
const Vector3d& v)
const 58 return this->linear() * v;
61 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
64 return (this->linear() * v).normal();
67 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
68 Vector3d Transform<_Scalar, _Dim, _Mode, _Options>::coord(
const Vector3d& v)
const 73 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
74 Transform<_Scalar, _Dim, _Mode, _Options> Transform<_Scalar, _Dim, _Mode, _Options>::inv()
const 76 return this->inverse();
79 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
85 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
86 Transform<_Scalar, _Dim, _Mode, _Options>::Transform(vtkMatrix4x4* m)
91 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
92 Transform<_Scalar, _Dim, _Mode, _Options>::Transform(
double* raw)
97 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
103 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
109 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
115 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
116 Transform<_Scalar, _Dim, _Mode, _Options> Transform<_Scalar, _Dim, _Mode, _Options>::fromString(
const QString& text,
122 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
123 Transform<_Scalar, _Dim, _Mode, _Options> Transform<_Scalar, _Dim, _Mode, _Options>::fromVtkMatrix(
vtkMatrix4x4Ptr m)
125 Transform<_Scalar, _Dim, _Mode, _Options> retval;
130 template<
typename _Scalar,
int _Dim,
int _Mode,
int _Options>
131 Transform<_Scalar, _Dim, _Mode, _Options> Transform<_Scalar, _Dim, _Mode, _Options>::fromFloatArray(
float m[4][4])
133 Transform<_Scalar, _Dim, _Mode, _Options> retval;
145 class DoubleBoundingBox3D;
163 cxResource_EXPORT
bool similar(
const Transform3D& a,
const Transform3D& b,
double tol = 1.0E-4);
168 cxResource_EXPORT DoubleBoundingBox3D
transform(
const Transform3D& m,
const DoubleBoundingBox3D& bb);
175 cxResource_EXPORT Transform3D
createTransformNormalize(
const DoubleBoundingBox3D& in,
const DoubleBoundingBox3D& out);
vtkSmartPointer< class vtkMatrix4x4 > vtkMatrix4x4Ptr
Transform3D createTransformRotateY(const double angle)
Transform3D createTransformScale(const Vector3D &scale_)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
cxResource_EXPORT Transform3D createTransformFromReferenceToExternal(PATIENT_COORDINATE_SYSTEM external)
boost::shared_ptr< Transform3D > Transform3DPtr
Transform3D createTransformRotationBetweenVectors(Vector3D from, Vector3D to)
cxResource_EXPORT Transform3D createTransformLPS2RAS()
std::string matrixAsSingleLineString(cx::Transform3D transform)
Vector3D unitVector(double thetaXY, double thetaZ)
compute a unit vector given angles xy in the xy plane and z meaning the elevation from the xy plane...
vtkSmartPointer< class vtkTransform > vtkTransformPtr
Transform3D createTransformNormalize(const DoubleBoundingBox3D &in, const DoubleBoundingBox3D &out)
Transform3D createTransformIJC(const Vector3D &ivec, const Vector3D &jvec, const Vector3D ¢er)
Transform3D createTransformTranslate(const Vector3D &translation)
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
Transform3D createTransformRotateZ(const double angle)
Transform3D createTransformRotateX(const double angle)
float4 transform(float16 matrix, float4 voxel)
Namespace for all CustusX production code.