diff --git a/Core/Code/DataManagement/mitkMatrix.h b/Core/Code/DataManagement/mitkMatrix.h index 62e513b17c..0a8ab4a3d7 100644 --- a/Core/Code/DataManagement/mitkMatrix.h +++ b/Core/Code/DataManagement/mitkMatrix.h @@ -1,168 +1,191 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKMATRIX_H_ #define MITKMATRIX_H_ #include #include "mitkConstants.h" #include "mitkArray.h" #include "mitkEqual.h" namespace mitk { template< class T, unsigned int NRows = 3, unsigned int NColumns = 3 > class Matrix : public itk::Matrix { public: /** Standard class typedefs. */ typedef Matrix Self; typedef typename itk::Matrix::InternalMatrixType InternalMatrixType; /** Default constructor. */ Matrix() : itk::Matrix() {} /** Copy constructor. */ Matrix(const Matrix & matrix) : itk::Matrix(matrix) {} /** Copy constructor for itk compatibility */ Matrix(const itk::Matrix & matrix) : itk::Matrix(matrix) {} /**For every operator=, there should be an equivalent copy constructor. */ inline Matrix(const vnl_matrix< T > & matrix) : itk::Matrix(matrix) {} /**For every operator=, there should be an equivalent copy constructor. */ inline explicit Matrix(InternalMatrixType & matrix) : itk::Matrix(matrix) {} /** * Necessary because otherwise operator= is default operator= from Matrix. */ using itk::Matrix::operator=; + /** + * Copies the elements from array array to this. + * Note that this method will assign doubles to floats without complaining! + * + * @param array the array whose values shall be copied. Must overload [] operator. + */ + template + void FromArray(const ArrayType& array) + { + for (unsigned i = 0; i < NRows; i++) + { + for (unsigned j = 0; j < NColumns; j++) + { + (*this)[i][j] = array[i][j]; + } + } + }; /** * Warning: Array must have same dimension as Matrix */ - void CopyToArray(ScalarType const array_p[NRows][NColumns]) const + template + void ToArray(ArrayType array) const { - for (int i = 0; i < this->GetPointDimension(); i++) + for (unsigned i = 0; i < NRows; i++) { - array_p[i] = this->GetElement(i); + for (unsigned j = 0; j < NColumns; j++) + { + array[i][j] = (*this)[i][j]; + } } } + + }; typedef Matrix Matrix2D; typedef Matrix Matrix3D; typedef Matrix Matrix4D; /*! \brief Check for matrix equality with a user defined accuracy. As an equality metric the root mean squared error (RMS) of all elements is calculated. \param matrix1 first vnl matrix \param matrix2 second vnl matrix \param epsilon user defined accuracy bounds */ template inline bool MatrixEqualRMS(const vnl_matrix_fixed& matrix1,const vnl_matrix_fixed& matrix2,mitk::ScalarType epsilon=mitk::eps) { if ( (matrix1.rows() == matrix2.rows()) && (matrix1.cols() == matrix2.cols()) ) { vnl_matrix_fixed differenceMatrix = matrix1-matrix2; if (differenceMatrix.rms() inline bool MatrixEqualRMS(const itk::Matrix& matrix1,const itk::Matrix& matrix2,mitk::ScalarType epsilon=mitk::eps) { return mitk::MatrixEqualRMS(matrix1.GetVnlMatrix(),matrix2.GetVnlMatrix(),epsilon); } /*! \brief Check for element-wise matrix equality with a user defined accuracy. \param matrix1 first vnl matrix \param matrix2 second vnl matrix \param epsilon user defined accuracy bounds */ template inline bool MatrixEqualElementWise(const vnl_matrix_fixed& matrix1,const vnl_matrix_fixed& matrix2,mitk::ScalarType epsilon=mitk::eps) { if ( (matrix1.rows() == matrix2.rows()) && (matrix1.cols() == matrix2.cols()) ) { for( unsigned int r=0; r inline bool MatrixEqualElementWise(const itk::Matrix& matrix1,const itk::Matrix& matrix2,mitk::ScalarType epsilon=mitk::eps) { return mitk::MatrixEqualElementWise(matrix1.GetVnlMatrix(),matrix2.GetVnlMatrix(),epsilon); } } #endif /* MITKMATRIX_H_ */ diff --git a/Core/Code/Testing/files.cmake b/Core/Code/Testing/files.cmake index 4453e442c3..29daeb5f3e 100644 --- a/Core/Code/Testing/files.cmake +++ b/Core/Code/Testing/files.cmake @@ -1,209 +1,209 @@ # tests with no extra command line parameter set(MODULE_TESTS # IMPORTANT: If you plan to deactivate / comment out a test please write a bug number to the commented out line of code. # # Example: #mitkMyTest #this test is commented out because of bug 12345 # # It is important that the bug is open and that the test will be activated again before the bug is closed. This assures that # no test is forgotten after it was commented out. If there is no bug for your current problem, please add a new one and # mark it as critical. ################## DISABLED TESTS ################################################# #mitkAbstractTransformGeometryTest.cpp #seems as tested class mitkExternAbstractTransformGeometry doesnt exist any more #mitkStateMachineContainerTest.cpp #rewrite test, indirect since no longer exported Bug 14529 #mitkRegistrationBaseTest.cpp #tested class mitkRegistrationBase doesn't exist any more #mitkSegmentationInterpolationTest.cpp #file doesn't exist! #mitkPipelineSmartPointerCorrectnessTest.cpp #file doesn't exist! #mitkITKThreadingTest.cpp #test outdated because itk::Semaphore was removed from ITK #mitkAbstractTransformPlaneGeometryTest.cpp #mitkVtkAbstractTransformPlaneGeometry doesn't exist any more #mitkTestUtilSharedLibrary.cpp #Linker problem with this test... #mitkTextOverlay2DSymbolsRenderingTest.cpp #Implementation of the tested feature is not finished yet. Ask Christoph or see bug 15104 for details. ################# RUNNING TESTS ################################################### mitkAccessByItkTest.cpp mitkCoreObjectFactoryTest.cpp mitkMaterialTest.cpp mitkActionTest.cpp mitkDispatcherTest.cpp mitkEnumerationPropertyTest.cpp mitkEventTest.cpp mitkFocusManagerTest.cpp mitkGenericPropertyTest.cpp mitkGeometry2DTest.cpp mitkGeometry3DTest.cpp mitkGeometry3DEqualTest.cpp mitkGeometryDataToSurfaceFilterTest.cpp mitkGlobalInteractionTest.cpp mitkImageEqualTest.cpp mitkImageDataItemTest.cpp mitkImageGeneratorTest.cpp mitkIOUtilTest.cpp mitkBaseDataTest.cpp mitkImportItkImageTest.cpp mitkGrabItkImageMemoryTest.cpp mitkInstantiateAccessFunctionTest.cpp mitkInteractorTest.cpp mitkLevelWindowTest.cpp mitkMessageTest.cpp mitkPixelTypeTest.cpp mitkPlaneGeometryTest.cpp mitkPointSetEqualTest.cpp mitkPointSetFileIOTest.cpp mitkPointSetTest.cpp mitkPointSetWriterTest.cpp mitkPointSetReaderTest.cpp mitkPointSetInteractorTest.cpp mitkPropertyTest.cpp mitkPropertyListTest.cpp mitkSlicedGeometry3DTest.cpp mitkSliceNavigationControllerTest.cpp mitkStateMachineTest.cpp mitkStateTest.cpp mitkSurfaceTest.cpp mitkSurfaceEqualTest.cpp mitkSurfaceToSurfaceFilterTest.cpp mitkTimeGeometryTest.cpp mitkTransitionTest.cpp mitkUndoControllerTest.cpp mitkVtkWidgetRenderingTest.cpp mitkVerboseLimitedLinearUndoTest.cpp mitkWeakPointerTest.cpp mitkTransferFunctionTest.cpp mitkStepperTest.cpp mitkRenderingManagerTest.cpp vtkMitkThickSlicesFilterTest.cpp mitkNodePredicateSourceTest.cpp mitkVectorTest.cpp mitkClippedSurfaceBoundsCalculatorTest.cpp mitkExceptionTest.cpp mitkExtractSliceFilterTest.cpp mitkLogTest.cpp mitkImageDimensionConverterTest.cpp mitkLoggingAdapterTest.cpp mitkUIDGeneratorTest.cpp mitkShaderRepositoryTest.cpp mitkPlanePositionManagerTest.cpp mitkAffineTransformBaseTest.cpp mitkPropertyAliasesTest.cpp mitkPropertyDescriptionsTest.cpp mitkPropertyExtensionsTest.cpp mitkPropertyFiltersTest.cpp mitkTinyXMLTest.cpp mitkRawImageFileReaderTest.cpp mitkInteractionEventTest.cpp mitkLookupTableTest.cpp mitkSTLFileReaderTest.cpp mitkPointTypeConversionTest.cpp - mitkTypeVectorConversionTest.cpp - mitkTypeMatrixConversionTest.cpp + mitkVectorTypeConversionTest.cpp + mitkMatrixTypeConversionTest.cpp mitkSurfaceToImageFilterTest.cpp mitkImageToSurfaceFilterTest.cpp mitkEqualTest.cpp ) if(MITK_ENABLE_RENDERING_TESTING) #since mitkInteractionTestHelper is currently creating a vtkRenderWindow set(MODULE_TESTS ${MODULE_TESTS} mitkPointSetDataInteractorTest.cpp ) endif() IF(MITK_USE_OpenCV) set(MODULE_TESTS ${MODULE_TESTS} mitkTypeConversionOpenCVTest.cpp ) endif(MITK_USE_OpenCV) # test with image filename as an extra command line parameter set(MODULE_IMAGE_TESTS mitkImageTimeSelectorTest.cpp #only runs on images mitkImageAccessorTest.cpp #only runs on images mitkDataNodeFactoryTest.cpp #runs on all types of data ) set(MODULE_SURFACE_TESTS mitkSurfaceVtkWriterTest.cpp #only runs on surfaces mitkDataNodeFactoryTest.cpp #runs on all types of data ) # list of images for which the tests are run set(MODULE_TESTIMAGES US4DCyl.nrrd Pic3D.nrrd Pic2DplusT.nrrd BallBinary30x30x30.nrrd Png2D-bw.png ) set(MODULE_TESTSURFACES binary.stl ball.stl ) set(MODULE_CUSTOM_TESTS mitkDataStorageTest.cpp mitkDataNodeTest.cpp mitkDicomSeriesReaderTest.cpp mitkDICOMLocaleTest.cpp mitkEventMapperTest.cpp mitkEventConfigTest.cpp mitkNodeDependentPointSetInteractorTest.cpp mitkStateMachineFactoryTest.cpp mitkPointSetLocaleTest.cpp mitkImageTest.cpp mitkImageWriterTest.cpp mitkImageVtkMapper2DTest.cpp mitkImageVtkMapper2DLevelWindowTest.cpp mitkImageVtkMapper2DOpacityTest.cpp mitkImageVtkMapper2DResliceInterpolationPropertyTest.cpp mitkImageVtkMapper2DColorTest.cpp mitkImageVtkMapper2DSwivelTest.cpp mitkImageVtkMapper2DTransferFunctionTest.cpp mitkImageVtkMapper2DLookupTableTest.cpp mitkSurfaceVtkMapper3DTest mitkSurfaceVtkMapper3DTexturedSphereTest.cpp mitkSurfaceGLMapper2DColorTest.cpp mitkSurfaceGLMapper2DOpacityTest.cpp mitkVolumeCalculatorTest.cpp mitkLevelWindowManagerTest.cpp mitkPointSetVtkMapper2DTest.cpp mitkPointSetVtkMapper2DImageTest.cpp mitkPointSetVtkMapper2DGlyphTypeTest.cpp mitkPointSetVtkMapper2DTransformedPointsTest.cpp mitkLabelOverlay3DRendering2DTest.cpp mitkLabelOverlay3DRendering3DTest.cpp mitkTextOverlay2DRenderingTest.cpp mitkTextOverlay2DLayouterRenderingTest.cpp mitkTextOverlay3DRendering2DTest.cpp mitkTextOverlay3DRendering3DTest.cpp mitkTextOverlay3DColorRenderingTest.cpp mitkVTKRenderWindowSizeTest.cpp mitkMultiComponentImageDataComparisonFilterTest.cpp mitkImageToItkTest.cpp mitkImageSliceSelectorTest.cpp mitkSurfaceDepthPeelingTest.cpp ) set(MODULE_RESOURCE_FILES Interactions/AddAndRemovePoints.xml Interactions/globalConfig.xml Interactions/StatemachineTest.xml Interactions/StatemachineConfigTest.xml ) # Create an artificial module initializing class for # the usServiceListenerTest.cpp usFunctionGenerateExecutableInit(testdriver_init_file IDENTIFIER ${MODULE_NAME}TestDriver ) # Embed the resources set(testdriver_resources ) usFunctionEmbedResources(testdriver_resources EXECUTABLE_NAME ${MODULE_NAME}TestDriver ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Resources FILES ${MODULE_RESOURCE_FILES} ) set(TEST_CPP_FILES ${testdriver_init_file} ${testdriver_resources}) diff --git a/Core/Code/Testing/mitkMatrixTypeConversionTest.cpp b/Core/Code/Testing/mitkMatrixTypeConversionTest.cpp new file mode 100644 index 0000000000..4c4935b203 --- /dev/null +++ b/Core/Code/Testing/mitkMatrixTypeConversionTest.cpp @@ -0,0 +1,100 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include + +#include "mitkTestingMacros.h" +#include "mitkTestFixture.h" + +#include "mitkMatrix.h" + + +class mitkMatrixTypeConversionTestSuite : public mitk::TestFixture + +{ + + CPPUNIT_TEST_SUITE(mitkMatrixTypeConversionTestSuite); + + MITK_TEST(Mitk2Pod); + MITK_TEST(Pod2Mitk); + + CPPUNIT_TEST_SUITE_END(); + +private: + + mitk::Matrix3D mitkMatrix3D; + mitk::ScalarType podMatrix3D[3][3]; + + + /** + * @brief Convenience method to test if one matrix has been assigned successfully to the other. + * + * More specifically, tests if m1 = m2 was performed correctly. + * + * @param m1 The matrix m1 of the assignment m1 = m2 + * @param m2 The matrix m2 of the assignment m1 = m2 + */ + template + void TestForEquality(T1 m1, T2 m2) + { + for (unsigned i = 0; i < 3; i++) + { + for (unsigned j = 0; j < 3; j++) + { + std::stringstream ss; + ss << "element [" << i << "][" + j << "] equal for mitkMatrix and podMatrix"; + + CPPUNIT_ASSERT_EQUAL_MESSAGE(ss.str(), true, + (mitkMatrix3D[i][j]==podMatrix3D[i][j])); + } + } + } + + +public: + + void setUp(void) + { + for (unsigned i = 0; i < 3; i++) + for (unsigned j = 0; j < 3; j++) + { + mitkMatrix3D[i][j] = i + j; + podMatrix3D[i][j] = (mitk::ScalarType) (9 - (i + j)); + } + } + + void tearDown(void) + { + + } + + void Mitk2Pod(void) + { + mitkMatrix3D.ToArray(podMatrix3D); + + TestForEquality(mitkMatrix3D, podMatrix3D); + } + + void Pod2Mitk(void) + { + mitkMatrix3D.FromArray(podMatrix3D); + + TestForEquality(podMatrix3D, mitkMatrix3D); + } + +}; + +MITK_TEST_SUITE_REGISTRATION(mitkMatrixTypeConversion) diff --git a/Core/Code/Testing/mitkTypeMatrixConversionTest.cpp b/Core/Code/Testing/mitkTypeMatrixConversionTest.cpp deleted file mode 100644 index 0873f342f5..0000000000 --- a/Core/Code/Testing/mitkTypeMatrixConversionTest.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - - -#include "mitkTestingMacros.h" - -/** -* Test the conversions from and to mitk matrix types -*/ -int mitkTypeMatrixConversionTest(int /*argc*/ , char* /*argv*/[]) -{ - // always start with this! - MITK_TEST_BEGIN("MatrixConversionTest") - - - MITK_TEST_END() - -} diff --git a/Core/Code/Testing/mitkTypeVectorConversionTest.cpp b/Core/Code/Testing/mitkVectorTypeConversionTest.cpp similarity index 95% rename from Core/Code/Testing/mitkTypeVectorConversionTest.cpp rename to Core/Code/Testing/mitkVectorTypeConversionTest.cpp index 667fd45924..a9d9f8cda2 100644 --- a/Core/Code/Testing/mitkTypeVectorConversionTest.cpp +++ b/Core/Code/Testing/mitkVectorTypeConversionTest.cpp @@ -1,265 +1,264 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include #include "itkVector.h" #include "mitkTestFixture.h" #include "mitkTestingMacros.h" #include #include "vnl/vnl_math.h" #include "mitkConstants.h" #include "mitkVector.h" #include "mitkPoint.h" using namespace mitk; -class VectorTypeConversionTestSuite : public mitk::TestFixture +class mitkVectorTypeConversionTestSuite : public mitk::TestFixture { - CPPUNIT_TEST_SUITE(VectorTypeConversionTestSuite); + CPPUNIT_TEST_SUITE(mitkVectorTypeConversionTestSuite); MITK_TEST(Point2Vector); MITK_TEST(Pod2Mitk); MITK_TEST(Mitk2Pod); MITK_TEST(OneElement2Mitk); MITK_TEST(Itk2Mitk); MITK_TEST(Mitk2Itk); MITK_TEST(Vnlfixed2Mitk); MITK_TEST(Mitk2Vnlfixed); MITK_TEST(Vnl2Mitk); MITK_TEST(Mitk2Vnl); MITK_TEST(Vnl2Mitk_WrongVnlVectorSize); MITK_TEST(ToArray_DifferentType); MITK_TEST(FromArray_DifferentType); CPPUNIT_TEST_SUITE_END(); private: /** * these variables are used in the test functions * * The variable which should be copied into is set to its original value. * The value which should be copied is set to valuesToCopy. * * Then the copying takes place. The test is successful, if the variable which * should be copied into holds the valuesToCopy afterwards and is equal to the * vector which should be copied. */ ScalarType originalValues[3]; ScalarType valuesToCopy[3]; float epsDouble2Float; -public: - - - void setUp(void) - { - FillVector3D(originalValues, 1.123456789987, 2.789456321456, 3.123654789987456); - FillVector3D(valuesToCopy, 4.654789123321, 5.987456789321, 6.321654987789546); - - epsDouble2Float = vnl_math::float_eps * 10.0; - } - - void tearDown(void) - { - - } - /** * @brief Convenience method to test if one vector has been assigned successfully to the other. * * More specifically, tests if v1 = v2 was performed correctly. * * @param v1 The vector v1 of the assignment v1 = v2 * @param v2 The vector v2 of the assignment v1 = v2 * @param v1Name The type name of v1 (e.g.: mitk::Vector3D). Necessary for the correct test output. * @param v2Name The type name of v2 (e.g.: mitk::Vector3D). Necessary for the correct test output. * @param eps defines the allowed tolerance when testing for equality. */ template void TestForEquality(T1 v1, T2 v2, std::string v1Name, std::string v2Name, ScalarType eps = mitk::eps) { - CPPUNIT_ASSERT_ASSERTION_PASS_MESSAGE("\nAssigning " + v2Name + " to " + v1Name + ":\n both are equal", EqualArray(v1, v2, 3, eps)); + CPPUNIT_ASSERT_EQUAL_MESSAGE("\nAssigning " + v2Name + " to " + v1Name + ":\n both are equal", true, + EqualArray(v1, v2, 3, eps)); } +public: + + + void setUp(void) + { + FillVector3D(originalValues, 1.123456789987, 2.789456321456, 3.123654789987456); + FillVector3D(valuesToCopy, 4.654789123321, 5.987456789321, 6.321654987789546); + epsDouble2Float = vnl_math::float_eps * 10.0; + } + + void tearDown(void) + { + + } void Pod2Mitk(void) { mitk::Vector3D vector3D = valuesToCopy; TestForEquality(vector3D, valuesToCopy, "mitk::Vector3D", "double POD"); } void Mitk2Pod(void) { ScalarType podArray[3]; mitk::Vector3D vector3D = valuesToCopy; vector3D.ToArray(podArray); TestForEquality(podArray, vector3D, "double POD", "mitk::Vector3D"); } void OneElement2Mitk(void) { double twos[] = {2.0, 2.0, 2.0}; mitk::Vector vector3D(2.0); CPPUNIT_ASSERT_ASSERTION_PASS_MESSAGE( "\n one values initializes all elements to this value", EqualArray(vector3D, twos, 3)); } void Itk2Mitk(void) { Vector3D vector3D = originalValues; itk::Vector itkVector = valuesToCopy; vector3D = itkVector; TestForEquality(vector3D, itkVector, "mitk::Vector3D", "itk::Vector"); } void Mitk2Itk(void) { Vector3D vector3D = valuesToCopy; itk::Vector itkVector = originalValues; itkVector = vector3D; TestForEquality(itkVector, vector3D, "itk::Vector", "mitk::Vector3D"); } void Vnlfixed2Mitk(void) { mitk::Vector3D vector3D = originalValues; vnl_vector_fixed vnlVectorFixed(valuesToCopy); vector3D = vnlVectorFixed; TestForEquality(vector3D, vnlVectorFixed, "mitk::Vector3D", "vnl_vector_fixed"); } void Mitk2Vnlfixed(void) { vnl_vector_fixed vnlVectorFixed(originalValues); mitk::Vector3D vector3D = valuesToCopy; vnlVectorFixed = vector3D; TestForEquality(vnlVectorFixed, vector3D, "vnl_vector_fixed", "mitk::Vector3D"); } void Vnl2Mitk(void) { mitk::Vector3D vector3D = originalValues; vnl_vector vnlVector(3); vnlVector.set(valuesToCopy); vector3D = vnlVector; TestForEquality(vector3D, vnlVector, "mitk::Vector3D", "vnl_vector"); } void Mitk2Vnl(void) { vnl_vector vnlVector(3); vnlVector.set(originalValues); mitk::Vector3D vector3D = valuesToCopy; vnlVector = vector3D; TestForEquality(vnlVector, vector3D, "vnl_vector", "mitk::Vector3D"); } /** * @brief Tests if an exception is thrown when constructing an mitk::Vector form a vnl_vector of not suited size. */ void Vnl2Mitk_WrongVnlVectorSize() { ScalarType largerValuesToCopy[] = {4.12345678910, 5.10987654321, 6.123456789132456, 7.123456987789456}; mitk::Vector3D vector3D = originalValues; vnl_vector vnlVector(4); vnlVector.set(largerValuesToCopy); CPPUNIT_ASSERT_THROW(vector3D = vnlVector, mitk::Exception); } void ToArray_DifferentType(void) { float podArray[3]; for (int var = 0; var < 3; ++var) { podArray[var] = originalValues[var]; } mitk::Vector3D vector3D = valuesToCopy; vector3D.ToArray(podArray); TestForEquality(podArray, vector3D, "float POD", "mitk::Vector3D", epsDouble2Float); } void FromArray_DifferentType(void) { mitk::Vector3D vector3D = originalValues; float podArray[3]; for (int var = 0; var < 3; ++var) { podArray[var] = valuesToCopy[var]; } vector3D.FromArray(podArray); TestForEquality(vector3D, podArray, "mitk::Vector3D", "float POD", epsDouble2Float); } void Point2Vector() { mitk::Point3D point3D = originalValues; mitk::Vector3D vector3D = valuesToCopy; vector3D = point3D.GetVectorFromOrigin(); TestForEquality(point3D, vector3D, "mitk::Point3D", "mitk::Vector3D"); } }; -MITK_TEST_SUITE_REGISTRATION(VectorTypeConversion) +MITK_TEST_SUITE_REGISTRATION(mitkVectorTypeConversion)