21#ifndef __stir_Shape_Shape3D_h__
22#define __stir_Shape_Shape3D_h__
30template <
typename elemT>
31class VoxelsOnCartesianGrid;
65class Shape3D :
public RegisteredObject<Shape3D>
68 ~Shape3D()
override {}
78 virtual inline bool operator==(
const Shape3D&)
const = 0;
169 virtual float get_geometric_area()
const;
183 std::string parameter_info()
override;
defines the stir::CartesianCoordinate3D<coordT> class
Declaration of class stir::ParsingObject.
Declaration of class stiir::RegisteredObject.
Inline-implementations of class stir::Shape3D.
a templated class for 3-dimensional coordinates.
Definition CartesianCoordinate3D.h:53
virtual float get_geometric_volume() const
Compute approximate volume.
Definition Shape3D.cxx:55
void set_defaults() override
Set defaults before parsing.
Definition Shape3D.cxx:197
virtual void translate(const CartesianCoordinate3D< float > &direction)
translate the whole shape by shifting its origin
Definition Shape3D.cxx:49
virtual bool operator==(const Shape3D &) const =0
Compare shapes.
Definition Shape3D.inl:32
void initialise_keymap() override
Initialise all keywords.
Definition Shape3D.cxx:203
bool operator!=(const Shape3D &) const
Compare shapes.
Definition Shape3D.inl:38
void scale_around_origin(const CartesianCoordinate3D< float > &scale3D)
scale the whole shape, keeping the centre at the same place
Definition Shape3D.inl:44
virtual void scale(const CartesianCoordinate3D< float > &scale3D)=0
scale the whole shape
virtual bool is_inside_shape(const CartesianCoordinate3D< float > &coord) const =0
determine if a point is inside the shape or not (up to floating point errors)
virtual float get_voxel_weight(const CartesianCoordinate3D< float > &voxel_centre, const CartesianCoordinate3D< float > &voxel_size, const CartesianCoordinate3D< int > &num_samples) const
Determine (approximately) the intersection volume of a voxel with the shape.
Definition Shape3D.cxx:70
CartesianCoordinate3D< float > get_origin() const
get the origin of the shape-coordinate system
Definition Shape3D.inl:54
virtual void construct_volume(VoxelsOnCartesianGrid< float > &image, const CartesianCoordinate3D< int > &num_samples) const
construct an image representation the shape in a discretised manner
Definition Shape3D.cxx:101
virtual void set_origin(const CartesianCoordinate3D< float > &)
set the origin of the shape-coordinate system
Definition Shape3D.cxx:43
virtual Shape3D * clone() const =0
Allocate a new Shape3D object which is a copy of the current one.
This class is used to represent voxelised densities on a cuboid grid (3D).
Definition VoxelsOnCartesianGrid.h:46