|
STIR
6.3.0
|
A class that allows combining several shapes using logical operations. More...
#include "stir/Shape/CombinedShape3D.h"

Public Member Functions | |
| CombinedShape3D (shared_ptr< Shape3D > object1_v, shared_ptr< Shape3D > object2_v) | |
| bool | is_inside_shape (const CartesianCoordinate3D< float > &coord) const |
| determine if a point is inside the shape or not (up to floating point errors) More... | |
| void | translate (const CartesianCoordinate3D< float > &direction) |
| translate the whole shape by shifting its origin More... | |
| void | scale (const CartesianCoordinate3D< float > &scale3D) |
| scale the whole shape More... | |
| Shape3D * | clone () const |
| Allocate a new Shape3D object which is a copy of the current one. | |
Public Member Functions inherited from stir::RegisteredParsingObject< CombinedShape3D, Shape3D, Shape3D > | |
| std::string | get_registered_name () const override |
| Returns Derived::registered_name. | |
| std::string | parameter_info () override |
| Returns a string with all parameters and their values, in a form suitable for parsing again. | |
Public Member Functions inherited from stir::Shape3D | |
| virtual bool | operator== (const Shape3D &) const =0 |
| Compare shapes. More... | |
| bool | operator!= (const Shape3D &) const |
| Compare shapes. | |
| 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. More... | |
| void | scale_around_origin (const CartesianCoordinate3D< float > &scale3D) |
| scale the whole shape, keeping the centre at the same place | |
| virtual void | construct_volume (VoxelsOnCartesianGrid< float > &image, const CartesianCoordinate3D< int > &num_samples) const |
| construct an image representation the shape in a discretised manner More... | |
| virtual float | get_geometric_volume () const |
| Compute approximate volume. More... | |
| CartesianCoordinate3D< float > | get_origin () const |
| get the origin of the shape-coordinate system | |
| virtual void | set_origin (const CartesianCoordinate3D< float > &) |
| set the origin of the shape-coordinate system | |
Public Member Functions inherited from stir::ParsingObject | |
| ParsingObject (const ParsingObject &) | |
| ParsingObject & | operator= (const ParsingObject &) |
| void | ask_parameters () |
| bool | parse (std::istream &f) |
| bool | parse (const char *const filename) |
Additional Inherited Members | |
Static Public Member Functions inherited from stir::RegisteredParsingObject< CombinedShape3D, Shape3D, Shape3D > | |
| static Shape3D * | read_from_stream (std::istream *) |
| Construct a new object (of type Derived) by parsing the istream. More... | |
Static Public Member Functions inherited from stir::RegisteredObject< Shape3D > | |
| static Shape3D * | read_registered_object (std::istream *in, const std::string ®istered_name) |
| Construct a new object (of a type derived from Root, its actual type determined by the registered_name parameter) by parsing the istream. More... | |
| static Shape3D * | ask_type_and_parameters () |
| ask the user for the type, and then calls read_registered_object(0, type) More... | |
| static void | list_registered_names (std::ostream &stream) |
| List all possible registered names to the stream. More... | |
Protected Types inherited from stir::RegisteredObject< Shape3D > | |
| typedef Shape3D *(* | RootFactory) (std::istream *) |
| The type of a root factory is a function, taking an istream* as argument, and returning a Root*. | |
| typedef FactoryRegistry< std::string, RootFactory, interfile_less > | RegistryType |
| The type of the registry. | |
Protected Member Functions inherited from stir::Shape3D | |
| Shape3D (const CartesianCoordinate3D< float > &origin) | |
| void | set_defaults () override |
| Set defaults before parsing. | |
| void | initialise_keymap () override |
| Initialise all keywords. | |
Protected Member Functions inherited from stir::ParsingObject | |
| virtual bool | post_processing () |
| This will be called at the end of the parsing. More... | |
| virtual void | set_key_values () |
| This will be called before parsing or parameter_info is called. More... | |
Static Protected Member Functions inherited from stir::RegisteredObject< Shape3D > | |
| static RegistryType & | registry () |
| Static function returning the registry. More... | |
Protected Attributes inherited from stir::ParsingObject | |
| KeyParser | parser |
A class that allows combining several shapes using logical operations.
document more
Parsing cannot work yet because of template (can be solved by explicit instantiation)
|
inlinevirtual |
determine if a point is inside the shape or not (up to floating point errors)
| coord | is a cartesian coordinate in 'absolute' coordinates, i.e. in mm and not relative to the origin member. |
This is really only well defined for shapes with sharp boundaries.
Implements stir::Shape3D.
|
inlinevirtual |
translate the whole shape by shifting its origin
Uses set_origin().
Reimplemented from stir::Shape3D.
Referenced by stir::Utah_phantom::make_inside_C_ptr().
|
inlinevirtual |
scale the whole shape
Scaling the shape also shifts the origin of the shape: new_origin = old_origin * scale3D. This is necessary such that combined shapes keep their correct relative positions. This means that scaling and translating is non-commutative.
Implements stir::Shape3D.
1.8.13