Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkAffineTransformBaseTest.cpp File Reference
#include "itkScalableAffineTransform.h"
#include "mitkMatrixConvert.h"
#include "mitkNumericTypes.h"
#include "mitkTestingMacros.h"

Go to the source code of this file.

Functions

static void Setup ()
 
static void TearDown ()
 
static void testIfPointIsTransformedAsExpected (void)
 
static void testTransferItkTransformToVtkMatrix (void)
 
static void testIfBothTransformationsProduceSameResults (void)
 
int mitkAffineTransformBaseTest (int, char *[])
 

Variables

static Vector3D offset
 
static Matrix3D rotation
 
static Point3D originalPoint
 
static double originalPointDouble [4]
 
static vtkMatrix4x4 * homogenMatrix
 
static vtkMatrix4x4 * expectedHomogenousMatrix
 
static const double expectedPointAfterTransformation []
 

Function Documentation

int mitkAffineTransformBaseTest ( int  ,
char *  [] 
)

This test shall ensure and document the basic functionality of the itk AffineTransformation functionality and test some basic transformation functionalities provided by mitk.

Definition at line 188 of file mitkAffineTransformBaseTest.cpp.

References MITK_TEST_BEGIN(), MITK_TEST_END(), testIfBothTransformationsProduceSameResults(), testIfPointIsTransformedAsExpected(), and testTransferItkTransformToVtkMatrix().

static void testIfBothTransformationsProduceSameResults ( void  )
static

This test basically is just a sanity check and should be PASSED exactly when both testTransferItkTransformToVtkMatrix and testIfPointIsTransformedAsExpected are PASSED. Tests if we get the same result by using the AffineTransform3D to transform a point or the vtkMatrix4x4 which we got by applying the TransferItkTransformToVtkMatrix function. This test e.g. ensures we made no mistake in our reference results.

create both a AffineTransform3D and let this AffineTransform describe also a homogenous 4x4 Matrix vtkMatrix by using our transfer method

Let a point be transformed by the AffineTransform3D and by homogenMatrix

Definition at line 149 of file mitkAffineTransformBaseTest.cpp.

References mitk::Equal(), homogenMatrix, MITK_TEST_CONDITION, mitk::New(), originalPointDouble, Setup(), TearDown(), and mitk::TransferItkTransformToVtkMatrix().

Referenced by mitkAffineTransformBaseTest().

static void testIfPointIsTransformedAsExpected ( void  )
static

This first test basically assures that we understand the usage of AffineTransform3D correct. Meaning that the rotation is set by SetMatrix and the translation is set by SetOffset

construct the transformation

Let a point be transformed by the AffineTransform3D

assert that the transformation was successful

Definition at line 90 of file mitkAffineTransformBaseTest.cpp.

References mitk::Equal(), expectedPointAfterTransformation, homogenMatrix, MITK_TEST_CONDITION, mitk::New(), Setup(), TearDown(), and mitk::TransferItkTransformToVtkMatrix().

Referenced by mitkAffineTransformBaseTest().

static void testTransferItkTransformToVtkMatrix ( void  )
static

This test ensures that the function TransferItkTransformToVtkMatrix translates the AffineTransform3D correctly to a VtkMatrix4x4

Definition at line 119 of file mitkAffineTransformBaseTest.cpp.

References mitk::Equal(), expectedHomogenousMatrix, homogenMatrix, MITK_TEST_CONDITION, mitk::New(), Setup(), TearDown(), and mitk::TransferItkTransformToVtkMatrix().

Referenced by mitkAffineTransformBaseTest().

Variable Documentation

vtkMatrix4x4* expectedHomogenousMatrix
static
const double expectedPointAfterTransformation[]
static

Definition at line 35 of file mitkAffineTransformBaseTest.cpp.

Referenced by testIfPointIsTransformedAsExpected().

Vector3D offset
static

Definition at line 27 of file mitkAffineTransformBaseTest.cpp.

Referenced by AccessPixel(), CalculateCoocurenceFeatures(), CalculateGrayLevelRunLengthFeatures(), mitk::DataStorage::ComputeBoundingGeometry3D(), ComputeIntensityProfile(), vtkMitkVolumeTextureMapper3D::ComputePolygons(), vtkPointSetSlicer::ContourUnstructuredGridCell(), mitk::ConvertItkTransform(), mitk::TestDCMLoading::DumpImageInformation(), mitk::TestDICOMLoading::DumpImageInformation(), mitk::PlaneGeometry::ExecuteOperation(), mitk::IGTLMeasurements::ExportData(), mitk::SiemensDicomDiffusionImageHeaderReader::ExtractSiemensDiffusionInformation(), mitk::SiemensMosaicDicomDiffusionImageHeaderReader::ExtractSiemensDiffusionInformation(), mitk::Geometry3DToXML::FromXML(), itk::MultiHistogramFilter< TInputImageType, TOuputImageType >::GenerateData(), mitk::NavigationDataObjectVisualizationFilter::GenerateData(), mitk::IGTLMessageToNavigationDataFilter::GenerateTrackingDataData(), mitk::IGTLMessageToNavigationDataFilter::GenerateTransformData(), mitk::ToFCameraPMDCamBoardController::GetDistanceOffset(), mitk::ToFCameraPMDCamCubeController::GetDistanceOffset(), mitk::IGTTimeStamp::GetElapsed(), mitk::ImagePixelAccessor< TPixel, VDimension >::GetOffset(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByIndex(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByIndexSafe(), mitk::Image::GetPixelValueByIndex(), mitk::ScaleLegendOverlay::GetRightBorderOffset(), mitk::NDITrackingDevice::GetSupportedVolumes(), mitk::GetWorldToItkPhysicalTransform(), mitk::PlaneGeometry::InitializeStandardPlane(), QmitkStdMultiWidget::InitializeWidget(), mitk::ImageStatisticsCalculator::InternalCalculateStatisticsMasked(), mitk::MRNormLinearStatisticBasedFilter::InternalComputeMask(), mitk::MRNormTwoRegionsBasedFilter::InternalComputeMask(), mitk::LogoOverlay::LogoOverlay(), main(), mitkPointSetFileIOTest(), mitk::NavigationData::NavigationData(), mitk::LinearSplitting< TLossAccumulator >::operator()(), mitk::VectorImageMapper2D::PaintCells(), mitk::ParseInputString(), mitk::NavigationDataReaderCSV::parseLine(), mitk::PlanarFigureMapper2D::RenderAnnotations(), mitk::PlanarFigureMapper2D::RenderQuantities(), mitk::RandomParcellationGenerator< TPixel, VImageDimension >::SetAppropriateValues(), mitk::ToFCameraPMDCamBoardController::SetDistanceOffset(), mitk::ToFCameraPMDCamCubeController::SetDistanceOffset(), itk::FieldmapGeneratorFilter< OutputImageType >::SetOffset(), mitk::NavigationDataObjectVisualizationFilter::SetOffset(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::SetPixelByIndex(), mitk::ImagePixelWriteAccessor< TPixel, VDimension >::SetPixelByIndexSafe(), itk::OdfMaximaExtractionFilter< TOdfPixelType >::SolveCubic(), mitk::Geometry3DToXML::ToXML(), mitk::TransferVtkMatrixToItkTransform(), vtkMitkRectangleProp::UpdateRectangle(), vtkMitkOpenGLVolumeTextureMapper3D::UpdateVolumes(), mitk::TextOverlay3D::UpdateVtkOverlay(), mitk::LogoOverlay::UpdateVtkOverlay(), QmitkResidualViewWidget::wheelEvent(), and mitk::BaseGeometry::WorldToIndex().

Point3D originalPoint
static
double originalPointDouble[4]
static