Data class containing an cylinder. More...
#include <mitkCone.h>
Public Types | |
typedef Cone | Self |
typedef BoundingObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual mitk::ScalarType | GetVolume () |
virtual bool | IsInside (const Point3D &p) const |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
Cone () | |
virtual | ~Cone () |
Data class containing an cylinder.
Definition at line 30 of file mitkCone.h.
typedef itk::SmartPointer<const Self> mitk::Cone::ConstPointer |
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCone.h.
typedef itk::SmartPointer<Self> mitk::Cone::Pointer |
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCone.h.
typedef Cone mitk::Cone::Self |
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCone.h.
typedef BoundingObject mitk::Cone::Superclass |
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCone.h.
mitk::Cone::Cone | ( | ) | [protected] |
Definition at line 24 of file mitkCone.cpp.
References New(), and mitk::Surface::SetVtkPolyData().
: BoundingObject() { // Set up Cone Surface. Radius 1.0, height 2.0, , centered around the origin vtkConeSource* cone = vtkConeSource::New(); cone->SetRadius(1.0); cone->SetHeight(2.0); cone->SetDirection(0.0, -1.0, 0.0); cone->SetCenter(0.0, 0.0, 0.0); cone->SetResolution(20); cone->CappingOn(); cone->Update(); SetVtkPolyData(cone->GetOutput()); cone->Delete(); }
mitk::Cone::~Cone | ( | ) | [protected, virtual] |
Definition at line 40 of file mitkCone.cpp.
{ }
virtual const char* mitk::Cone::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BoundingObject.
mitk::ScalarType mitk::Cone::GetVolume | ( | ) | [virtual] |
Reimplemented from mitk::BoundingObject.
Definition at line 59 of file mitkCone.cpp.
References mitk::Geometry3D::GetExtentInMM().
{ Geometry3D* geometry = GetTimeSlicedGeometry(); return geometry->GetExtentInMM(0) * 0.5 * geometry->GetExtentInMM(2) * 0.5 * vnl_math::pi / 3.0 * geometry->GetExtentInMM(1); }
bool mitk::Cone::IsInside | ( | const Point3D & | p ) | const [virtual] |
Definition at line 44 of file mitkCone.cpp.
References QuadProgPP::sqrt().
{ // transform point from world to object coordinates ScalarType p[4]; p[0] = worldPoint[0]; p[1] = worldPoint[1]; p[2] = worldPoint[2]; p[3] = 1; GetGeometry()->GetVtkTransform()->GetInverse()->TransformPoint(p, p); p[1] += 1; // translate point, so that it fits to the formula below, which describes a cone that has its cone vertex at the origin return (sqrt(p[0] * p[0] + p[2] * p[2]) <= p[1] * 0.5) && (p[1] <= 2); // formula to calculate if a given point is inside a cone that has its cone vertex at the origin, is aligned on the second axis, has a radius of one an a height of two }
static Pointer mitk::Cone::New | ( | ) | [static] |
Reimplemented from mitk::Surface.
Referenced by Cone(), QmitkImageCropper::CreateBoundingObject(), QmitkBoundingObjectWidget::CreateBoundingObject(), QmitkToolPairNavigationView::CreateConeAsInstrumentVisualization(), QmitkImageGuidedTherapyTutorialView::OnStartIGT(), and QmitkIGTExampleView::OnTestNavigation().