RTK  2.0.1
Reconstruction Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected 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

using ConstPointer = itk::SmartPointer< const Self >
 
using Pointer = itk::SmartPointer< Self >
 
using PointType = itk::Vector< ScalarType, Dimension >
 
using RotationMatrixType = itk::Matrix< ScalarType, Dimension, Dimension >
 
using ScalarType = double
 
using Self = ConvexShape
 
using Superclass = itk::DataObject
 
using VectorType = itk::Vector< ScalarType, Dimension >
 

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 constexpr 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 ()
 
itk::LightObject::Pointer InternalClone () const override
 

Private Attributes

ScalarType m_Density {0.}
 
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

◆ ConstPointer

Definition at line 55 of file rtkConvexShape.h.

◆ Pointer

Definition at line 54 of file rtkConvexShape.h.

◆ PointType

Definition at line 60 of file rtkConvexShape.h.

◆ RotationMatrixType

Definition at line 62 of file rtkConvexShape.h.

◆ ScalarType

Definition at line 59 of file rtkConvexShape.h.

◆ Self

Standard class type alias.

Definition at line 52 of file rtkConvexShape.h.

◆ Superclass

Definition at line 53 of file rtkConvexShape.h.

◆ VectorType

Definition at line 61 of file rtkConvexShape.h.

Constructor & Destructor Documentation

◆ ConvexShape()

rtk::ConvexShape::ConvexShape ( )
protected

Member Function Documentation

◆ AddClipPlane()

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.

◆ ApplyClipPlanes() [1/2]

bool rtk::ConvexShape::ApplyClipPlanes ( const PointType rayOrigin,
const VectorType rayDirection,
ScalarType nearDist,
ScalarType farDist 
) const
protected

◆ ApplyClipPlanes() [2/2]

bool rtk::ConvexShape::ApplyClipPlanes ( const PointType point) const
protected

◆ CreateAnother()

virtual::itk::LightObject::Pointer rtk::ConvexShape::CreateAnother ( ) const
virtual

Reimplemented from itk::Object.

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

◆ GetDensity() [1/2]

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

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

◆ GetDensity() [2/2]

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

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

◆ GetNameOfClass()

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.

◆ GetPlaneDirections()

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

Get reference to vector of plane parameters.

◆ GetPlanePositions()

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

Get reference to vector of plane parameters.

◆ InternalClone()

itk::LightObject::Pointer rtk::ConvexShape::InternalClone ( ) const
overrideprotectedvirtual

Reimplemented from itk::LightObject.

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

◆ IsInside()

virtual bool rtk::ConvexShape::IsInside ( const PointType point) const
virtual

Returns true if a point is inside the object.

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

◆ IsIntersectedByRay()

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::QuadricShape, and rtk::IntersectionOfConvexShapes.

◆ New()

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

Method for creation through the object factory.

◆ Rescale()

virtual void rtk::ConvexShape::Rescale ( const VectorType r)
virtual

Rescale object along each direction by a 3D vector.

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

◆ Rotate()

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.

◆ SetClipPlanes()

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.

◆ SetDensity()

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

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

◆ Translate()

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

Translate object by a given 3D vector.

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

Member Data Documentation

◆ Dimension

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

Convenient type alias.

Definition at line 58 of file rtkConvexShape.h.

◆ m_Density

ScalarType rtk::ConvexShape::m_Density {0.}
private

Definition at line 117 of file rtkConvexShape.h.

◆ m_PlaneDirections

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

Definition at line 118 of file rtkConvexShape.h.

◆ m_PlanePositions

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

Definition at line 119 of file rtkConvexShape.h.


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