Classes | Functions

mitkPlanarPolygonTest.cpp File Reference

#include "mitkTestingMacros.h"
#include "mitkPlanarPolygon.h"
#include "mitkPlaneGeometry.h"

Go to the source code of this file.

Classes

class  mitkPlanarPolygonTestClass

Functions

int mitkPlanarPolygonTest (int, char *[])

Function Documentation

int mitkPlanarPolygonTest ( int  ,
char *  [] 
)

mitkplanarPolygonTest tests the methods and behavior of mitk::PlanarPolygon with sub-tests:

1. Instantiation and basic tests, including feature evaluation

Definition at line 96 of file mitkPlanarPolygonTest.cpp.

References MITK_TEST_BEGIN, MITK_TEST_CONDITION_REQUIRED, MITK_TEST_END, mitk::PlanarPolygon::New(), mitk::PlaneGeometry::New(), and mitkPlanarPolygonTestClass::TestPlanarPolygonPlacement().

{
  // always start with this!
  MITK_TEST_BEGIN("planarPolygon")

  // create PlaneGeometry on which to place the planarPolygon
  mitk::PlaneGeometry::Pointer planeGeometry = mitk::PlaneGeometry::New();
  planeGeometry->InitializeStandardPlane( 100.0, 100.0 );

  // **************************************************************************
  // 1. Instantiation and basic tests, including feature evaluation
  mitk::PlanarPolygon::Pointer planarPolygon = mitk::PlanarPolygon::New();
  planarPolygon->SetGeometry2D( planeGeometry );

  // first test: did this work?
  MITK_TEST_CONDITION_REQUIRED( planarPolygon.IsNotNull(), "Testing instantiation" );

  // Test placement of planarPolygon by control points
  mitkPlanarPolygonTestClass::TestPlanarPolygonPlacement( planarPolygon );

  // always end with this!
  MITK_TEST_END();
} 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines