RTK  1.4.0
Reconstruction Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
rtk::ConvexShape Class Reference

#include <rtkConvexShape.h>

+ Inheritance diagram for rtk::ConvexShape:
+ Collaboration diagram for rtk::ConvexShape:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::Vector< ScalarType, DimensionPointType
 
typedef itk::Matrix< ScalarType, Dimension, DimensionRotationMatrixType
 
typedef double ScalarType
 
typedef ConvexShape Self
 
typedef itk::DataObject Superclass
 
typedef itk::Vector< ScalarType, DimensionVectorType
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
virtual bool IsInside (const PointType &point) const
 
virtual bool IsIntersectedByRay (const PointType &rayOrigin, const VectorType &rayDirection, double &nearDist, double &farDist) const
 
virtual void Rescale (const VectorType &r)
 
virtual void Rotate (const RotationMatrixType &r)
 
virtual void Translate (const VectorType &t)
 
void AddClipPlane (const VectorType &dir, const ScalarType &pos)
 
void SetClipPlanes (const std::vector< VectorType > &dir, const std::vector< ScalarType > &pos)
 
virtual void SetDensity (ScalarType _arg)
 
virtual ScalarType GetDensity () const
 
virtual ScalarType GetDensity ()
 
virtual const std::vector< VectorType > & GetPlaneDirections () const
 
virtual const std::vector< ScalarType > & GetPlanePositions () const
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int Dimension = 3
 

Protected Member Functions

bool ApplyClipPlanes (const PointType &rayOrigin, const VectorType &rayDirection, ScalarType &nearDist, ScalarType &farDist) const
 
bool ApplyClipPlanes (const PointType &point) const
 
 ConvexShape ()
 
virtual itk::LightObject::Pointer InternalClone () const override
 

Private Member Functions

 ConvexShape (const Self &)
 
void operator= (const Self &)
 

Private Attributes

ScalarType m_Density
 
std::vector< VectorTypem_PlaneDirections
 
std::vector< ScalarTypem_PlanePositions
 

Detailed Description

Base class for a 3D convex shape.

A ConvexShape is used to draw and project (in the tomographic sense) a geometric phantom using the functions IsInside and IsIntersectedByRay, respectively.

Test:
rtkforbildtest.cxx
Author
Simon Rit

Definition at line 46 of file rtkConvexShape.h.

Member Typedef Documentation

Definition at line 53 of file rtkConvexShape.h.

Definition at line 52 of file rtkConvexShape.h.

Definition at line 58 of file rtkConvexShape.h.

Definition at line 60 of file rtkConvexShape.h.

Definition at line 57 of file rtkConvexShape.h.

Standard class typedefs.

Definition at line 50 of file rtkConvexShape.h.

Definition at line 51 of file rtkConvexShape.h.

Definition at line 59 of file rtkConvexShape.h.

Constructor & Destructor Documentation

rtk::ConvexShape::ConvexShape ( )
protected
rtk::ConvexShape::ConvexShape ( const Self )
private

Member Function Documentation

void rtk::ConvexShape::AddClipPlane ( const VectorType dir,
const ScalarType pos 
)

Add clipping plane to the object. The plane is defined by the equation dir * (x,y,z)' + pos = 0.

bool rtk::ConvexShape::ApplyClipPlanes ( const PointType rayOrigin,
const VectorType rayDirection,
ScalarType nearDist,
ScalarType farDist 
) const
protected
bool rtk::ConvexShape::ApplyClipPlanes ( const PointType point) const
protected
virtual::itk::LightObject::Pointer rtk::ConvexShape::CreateAnother ( ) const
virtual ScalarType rtk::ConvexShape::GetDensity ( ) const
virtual

Volume density, i.e., value in the volume.

virtual ScalarType rtk::ConvexShape::GetDensity ( )
virtual

Volume density, i.e., value in the volume.

virtual const char* rtk::ConvexShape::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::DataObject.

Reimplemented in rtk::BoxShape, rtk::QuadricShape, and rtk::IntersectionOfConvexShapes.

virtual const std::vector<VectorType>& rtk::ConvexShape::GetPlaneDirections ( ) const
virtual

Get reference to vector of plane parameters.

virtual const std::vector<ScalarType>& rtk::ConvexShape::GetPlanePositions ( ) const
virtual

Get reference to vector of plane parameters.

virtual itk::LightObject::Pointer rtk::ConvexShape::InternalClone ( ) const
overrideprotectedvirtual
virtual bool rtk::ConvexShape::IsInside ( const PointType point) const
virtual

Returns true if a point is inside the object.

Reimplemented in rtk::BoxShape, rtk::QuadricShape, and rtk::IntersectionOfConvexShapes.

virtual bool rtk::ConvexShape::IsIntersectedByRay ( const PointType rayOrigin,
const VectorType rayDirection,
double &  nearDist,
double &  farDist 
) const
virtual

Returns true if a ray intersects the object. If it does, the parameters nearDist and farDist get the shape distance from the source in the ray direction. Note that nearDist<farDist, and nearDist and farDist can be negative.

Reimplemented in rtk::BoxShape, rtk::QuadricShape, and rtk::IntersectionOfConvexShapes.

static Pointer rtk::ConvexShape::New ( )
static

Method for creation through the object factory.

void rtk::ConvexShape::operator= ( const Self )
private
virtual void rtk::ConvexShape::Rescale ( const VectorType r)
virtual

Rescale object along each direction by a 3D vector.

Reimplemented in rtk::BoxShape, rtk::IntersectionOfConvexShapes, and rtk::QuadricShape.

virtual void rtk::ConvexShape::Rotate ( const RotationMatrixType r)
virtual

Rotate object according to a 3D rotation matrix.

Reimplemented in rtk::BoxShape, rtk::IntersectionOfConvexShapes, and rtk::QuadricShape.

void rtk::ConvexShape::SetClipPlanes ( const std::vector< VectorType > &  dir,
const std::vector< ScalarType > &  pos 
)

Add clipping plane to the object. The plane is defined by the equation dir * (x,y,z)' + pos = 0.

virtual void rtk::ConvexShape::SetDensity ( ScalarType  _arg)
virtual

Volume density, i.e., value in the volume.

virtual void rtk::ConvexShape::Translate ( const VectorType t)
virtual

Translate object by a given 3D vector.

Reimplemented in rtk::BoxShape, rtk::IntersectionOfConvexShapes, and rtk::QuadricShape.

Member Data Documentation

const unsigned int rtk::ConvexShape::Dimension = 3
static

Convenient typedefs.

Definition at line 56 of file rtkConvexShape.h.

ScalarType rtk::ConvexShape::m_Density
private

Definition at line 118 of file rtkConvexShape.h.

std::vector<VectorType> rtk::ConvexShape::m_PlaneDirections
private

Definition at line 119 of file rtkConvexShape.h.

std::vector<ScalarType> rtk::ConvexShape::m_PlanePositions
private

Definition at line 120 of file rtkConvexShape.h.


The documentation for this class was generated from the following file: