Data class containing an cuboid. More...
#include <mitkCuboid.h>
Public Types | |
typedef Cuboid | 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 | |
Cuboid () | |
virtual | ~Cuboid () |
Data class containing an cuboid.
Definition at line 30 of file mitkCuboid.h.
typedef itk::SmartPointer<const Self> mitk::Cuboid::ConstPointer |
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCuboid.h.
typedef itk::SmartPointer<Self> mitk::Cuboid::Pointer |
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCuboid.h.
typedef Cuboid mitk::Cuboid::Self |
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCuboid.h.
Reimplemented from mitk::BoundingObject.
Definition at line 33 of file mitkCuboid.h.
mitk::Cuboid::Cuboid | ( | ) | [protected] |
Definition at line 26 of file mitkCuboid.cpp.
References New(), and mitk::Surface::SetVtkPolyData().
: BoundingObject() { vtkCubeSource* cube = vtkCubeSource::New(); cube->SetXLength(2.0); cube->SetYLength(2.0); cube->SetZLength(2.0); cube->Update(); SetVtkPolyData(cube->GetOutput()); cube->Delete(); }
mitk::Cuboid::~Cuboid | ( | ) | [protected, virtual] |
Definition at line 38 of file mitkCuboid.cpp.
{ }
virtual const char* mitk::Cuboid::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BoundingObject.
mitk::ScalarType mitk::Cuboid::GetVolume | ( | ) | [virtual] |
Reimplemented from mitk::BoundingObject.
Definition at line 59 of file mitkCuboid.cpp.
References mitk::Geometry3D::GetExtentInMM().
{ Geometry3D* geometry = GetTimeSlicedGeometry(); return geometry->GetExtentInMM(0) * geometry->GetExtentInMM(1) * geometry->GetExtentInMM(2); }
bool mitk::Cuboid::IsInside | ( | const Point3D & | p ) | const [virtual] |
Definition at line 43 of file mitkCuboid.cpp.
{ // 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); return (p[0] >= -1) && (p[0] <= 1) && (p[1] >= -1) && (p[1] <= 1) && (p[2] >= -1) && (p[2] <= 1); }
static Pointer mitk::Cuboid::New | ( | ) | [static] |
Reimplemented from mitk::Surface.
Referenced by QmitkImageCropper::CreateBoundingObject(), QmitkBoundingObjectWidget::CreateBoundingObject(), Cuboid(), and mitkBoundingObjectCutterTest().