19 #include "itkScalableAffineTransform.h"
39 originalPoint[0] = 1.0;
40 originalPoint[1] = 0.0;
41 originalPoint[2] = 0.0;
43 for (
int i = 0; i < 3; i++)
63 for (
int i = 0; i < 4; i++)
64 for (
int j = 0; j < 4; j++)
97 transform->SetOffset(offset);
98 transform->SetMatrix(rotation);
103 Point3D pointTransformedByAffineTransform3D = transform->TransformPoint(originalPoint);
106 bool pointCorrect =
true;
107 for (
int i = 0; i < 3; i++)
110 MITK_TEST_CONDITION(pointCorrect,
"Point has been correctly transformed by AffineTranform3D")
125 transform->SetOffset(offset);
126 transform->SetMatrix(rotation);
130 bool allElementsEqual =
true;
131 for (
int i = 0; i < 4; i++)
132 for (
int j = 0; j < 4; j++)
160 transform->SetOffset(offset);
161 transform->SetMatrix(rotation);
166 Point3D pointTransformedByAffineTransform3D = transform->TransformPoint(originalPoint);
172 bool pointsMatch =
true;
173 for (
int i = 0; i < 3; i++)
174 pointsMatch &=
Equal(pointTransformedByAffineTransform3D[i], pointTransformedByHomogenous[i]);
176 bool homogenousComponentCorrect =
Equal(1, pointTransformedByHomogenous[3]);
179 "Point transformed by AffineTransform and homogenous coordinates match")
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
void TransferItkTransformToVtkMatrix(const TTransformType *itkTransform, vtkMatrix4x4 *vtkmatrix)
section GeneralTestsDeprecatedOldTestingStyle Deprecated macros All tests with MITK_TEST_BEGIN()
#define MITK_TEST_CONDITION(COND, MSG)
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.