Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkClippedSurfaceBoundsCalculatorTest.cpp File Reference
#include "mitkTestingMacros.h"
#include <iostream>
#include "mitkClippedSurfaceBoundsCalculator.h"
#include "mitkGeometry3D.h"
#include "mitkNumericTypes.h"
#include "mitkPlaneGeometry.h"

Go to the source code of this file.

Functions

static void CheckPlanesInsideBoundingBoxOnlyOnOneSlice (mitk::BaseGeometry::Pointer geometry3D)
 
static void CheckPlanesInsideBoundingBox (mitk::BaseGeometry::Pointer geometry3D)
 
static void CheckPlanesOutsideOfBoundingBox (mitk::BaseGeometry::Pointer geometry3D)
 
static void CheckIntersectionPointsOfTwoGeometry3D (mitk::BaseGeometry::Pointer firstGeometry3D, mitk::BaseGeometry::Pointer secondGeometry3D)
 
static void CheckIntersectionWithPointCloud (mitk::BaseGeometry::Pointer geometry3D)
 
static void CheckIntersectionWithRotatedGeometry ()
 
static void CheckIntersectionWithRotatedGeometry90 ()
 
int mitkClippedSurfaceBoundsCalculatorTest (int, char *[])
 

Function Documentation

◆ CheckIntersectionPointsOfTwoGeometry3D()

◆ CheckIntersectionWithPointCloud()

◆ CheckIntersectionWithRotatedGeometry()

◆ CheckIntersectionWithRotatedGeometry90()

◆ CheckPlanesInsideBoundingBox()

◆ CheckPlanesInsideBoundingBoxOnlyOnOneSlice()

◆ CheckPlanesOutsideOfBoundingBox()

◆ mitkClippedSurfaceBoundsCalculatorTest()

int mitkClippedSurfaceBoundsCalculatorTest ( int  ,
char *  [] 
)

The class mitkClippedSurfaceBoundsCalculator calculates the intersection points of a PlaneGeometry and a Geometry3D. This unit test checks if the correct min and max values for the three spatial directions (x, y, z) are calculated. To test this we define artificial PlaneGeometries and Geometry3Ds and test different scenarios:

  1. planes which are inside the bounding box of a 3D geometry but only on one slice
  2. planes which are outside of the bounding box
  3. planes which are inside the bounding box but over more than one slice

Note: Currently rotated geometries are not tested!

ToDo: test also rotated 3D geometry!

Definition at line 710 of file mitkClippedSurfaceBoundsCalculatorTest.cpp.

References CheckIntersectionPointsOfTwoGeometry3D(), CheckIntersectionWithPointCloud(), CheckIntersectionWithRotatedGeometry(), CheckIntersectionWithRotatedGeometry90(), CheckPlanesInsideBoundingBox(), CheckPlanesInsideBoundingBoxOnlyOnOneSlice(), CheckPlanesOutsideOfBoundingBox(), mitk::FillVector3D(), MITK_TEST_BEGIN(), MITK_TEST_END(), mitk::SlicedGeometry3D::New(), and mitk::PlaneGeometry::New().