20 #ifndef MIRTK_HomogeneousTransformationIterator_H 21 #define MIRTK_HomogeneousTransformationIterator_H 23 #include "mirtk/Point.h" 24 #include "mirtk/BaseImage.h" 25 #include "mirtk/HomogeneousTransformation.h" 62 double _xdx, _xdy, _xdz;
65 double _ydx, _ydy, _ydz;
68 double _zdx, _zdy, _zdz;
84 double x = .0,
double y = .0,
double z = .0,
115 _Transformation(transformation)
123 if (_Transformation == NULL) {
124 cout <<
"HomogeneousTransformationIterator::Initialize(): Transformation has not been set" << endl;
129 Matrix matrix = _Transformation->GetMatrix();
134 _x = matrix(0, 0) * x + matrix(0, 1) * y + matrix(0, 2) * z + matrix(0, 3);
135 _y = matrix(1, 0) * x + matrix(1, 1) * y + matrix(1, 2) * z + matrix(1, 3);
136 _z = matrix(2, 0) * x + matrix(2, 1) * y + matrix(2, 2) * z + matrix(2, 3);
138 _xx = _yx = _zx =
_x;
139 _xy = _yy = _zy =
_y;
140 _xz = _yz = _zz =
_z;
165 _x = (_xx += _xdx * offset);
166 _y = (_xy += _xdy * offset);
167 _z = (_xz += _xdz * offset);
173 _x = _xx = (_yx += _ydx);
174 _y = _xy = (_yy += _ydy);
175 _z = _xz = (_yz += _ydz);
181 _x = _xx = (_yx + _ydx * offset);
182 _y = _xy = (_yy + _ydy * offset);
183 _z = _xz = (_yz + _ydz * offset);
189 _x = _xx = _yx = (_zx += _zdx);
190 _y = _xy = _yy = (_zy += _zdy);
191 _z = _xz = _yz = (_zz += _zdz);
197 _x = _xx = _yx = (_zx += _zdx * offset);
198 _y = _xy = _yy = (_zy += _zdy * offset);
199 _z = _xz = _yz = (_zz += _zdz * offset);
205 #endif // MIRTK_HomogeneousTransformationIterator_H
double _x
x coordinate of Point
Matrix & Invert(bool use_svd_if_singular=true)
Invert matrix.
const Matrix & GetWorldToImageMatrix() const
Return transformation matrix for world to image coordinates.
double _z
z coordinate of Point
double _y
y coordinate of Point
const Matrix & GetImageToWorldMatrix() const
Return transformation matrix for image to world coordinates.