19 #ifndef rtkHomogeneousMatrix_h 20 #define rtkHomogeneousMatrix_h 38 template <
class TImageType>
42 const unsigned int Dimension = TImageType::ImageDimension;
50 for (
unsigned int j = 0; j <
Dimension; j++)
54 image->TransformIndexToPhysicalPoint(index,
point);
55 for (
unsigned int i = 0; i <
Dimension; i++)
56 matrix[i][j] =
point[i] - image->GetOrigin()[i];
58 for (
unsigned int i = 0; i <
Dimension; i++)
59 matrix[i][
Dimension] = image->GetOrigin()[i];
75 template <
class TImageType>
80 return MatrixType(GetIndexToPhysicalPointMatrix<TImageType>(image).GetInverse());
85 #endif // rtkHomogeneousMatrix_h
itk::Matrix< double, TImageType::ImageDimension+1, TImageType::ImageDimension+1 > GetIndexToPhysicalPointMatrix(const TImageType *image)
Get IndexToPhysicalPoint matrix from an image (no accessor provided by ITK).
constexpr unsigned int Dimension
itk::Matrix< double, TImageType::ImageDimension+1, TImageType::ImageDimension+1 > GetPhysicalPointToIndexMatrix(const TImageType *image)
Get PhysicalPointToIndex matrix from an image (no accessor provided by ITK).
*par Constraints *The filter requires an image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents