STIR  6.2.0
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
stir::ForwardProjectorByBinUsingRayTracing Class Reference

This class implements forward projection using Siddon's algorithm for ray tracing. That is, it computes length of intersection with the voxels. More...

#include "stir/recon_buildblock/ForwardProjectorByBinUsingRayTracing.h"

Inheritance diagram for stir::ForwardProjectorByBinUsingRayTracing:
Inheritance graph
[legend]

Public Member Functions

 ForwardProjectorByBinUsingRayTracing (const shared_ptr< const ProjDataInfo > &, const shared_ptr< const DiscretisedDensity< 3, float >> &)
 Constructor. More...
 
void set_up (const shared_ptr< const ProjDataInfo > &proj_data_info_ptr, const shared_ptr< const DiscretisedDensity< 3, float >> &density_info_ptr) override
 Stores all necessary geometric info. More...
 
const DataSymmetriesForViewSegmentNumbersget_symmetries_used () const override
 Informs on which symmetries the projector handles. More...
 
- Public Member Functions inherited from stir::RegisteredParsingObject< ForwardProjectorByBinUsingRayTracing, ForwardProjectorByBin >
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::ForwardProjectorByBin
 ForwardProjectorByBin ()
 Default constructor calls reset_timers()
 
void forward_project (ProjData &, const DiscretisedDensity< 3, float > &, int subset_num=0, int num_subsets=1, bool zero=true)
 project the volume into the whole or a subset of proj_data, optionally zeroing the rest More...
 
virtual void forward_project (ProjData &, int subset_num=0, int num_subsets=1, bool zero=true)
 project the volume into the whole proj_data More...
 
void forward_project (RelatedViewgrams< float > &)
 project the volume into the viewgrams More...
 
void forward_project (RelatedViewgrams< float > &, const int min_axial_pos_num, const int max_axial_pos_num)
 
void forward_project (RelatedViewgrams< float > &, const int min_axial_pos_num, const int max_axial_pos_num, const int min_tangential_pos_num, const int max_tangential_pos_num)
 
virtual void set_input (const DiscretisedDensity< 3, float > &)
 Set input.
 
void set_pre_data_processor (shared_ptr< DataProcessor< DiscretisedDensity< 3, float >>> pre_data_processor_sptr)
 Set data processor to use before forward projection. MUST BE CALLED BEFORE SET_INPUT.
 
- Public Member Functions inherited from stir::TimedObject
void reset_timers ()
 reset all timers kept by this object
 
void stop_timers () const
 stop all timers kept by this object More...
 
void start_timers (bool do_reset=false) const
 start all timers kept by this object More...
 
double get_CPU_timer_value () const
 get current value of the CPU timer (since first use or last reset)
 
double get_wall_clock_timer_value () const
 get current value of the wall-clock timer (since first use or last reset)
 
- Public Member Functions inherited from stir::ParsingObject
 ParsingObject (const ParsingObject &)
 
ParsingObjectoperator= (const ParsingObject &)
 
void ask_parameters ()
 
bool parse (std::istream &f)
 
bool parse (const char *const filename)
 

Static Public Attributes

static const char *const registered_name = "Ray Tracing"
 Name which will be used when parsing a ForwardProjectorByBin object.
 

Protected Attributes

bool restrict_to_cylindrical_FOV
 variable that determines if a cylindrical FOV or the whole image will be handled
 
- Protected Attributes inherited from stir::ForwardProjectorByBin
bool _already_set_up
 
shared_ptr< DiscretisedDensity< 3, float > > _density_sptr
 The density ptr set with set_up()
 
shared_ptr< DataProcessor< DiscretisedDensity< 3, float > > > _pre_data_processor_sptr
 
shared_ptr< const ProjDataInfo_proj_data_info_sptr
 ProjDataInfo set by set_up()
 
- Protected Attributes inherited from stir::ParsingObject
KeyParser parser
 

Additional Inherited Members

- Static Public Member Functions inherited from stir::RegisteredParsingObject< ForwardProjectorByBinUsingRayTracing, ForwardProjectorByBin >
static ForwardProjectorByBinread_from_stream (std::istream *)
 Construct a new object (of type Derived) by parsing the istream. More...
 
- Static Public Member Functions inherited from stir::RegisteredObject< ForwardProjectorByBin >
static ForwardProjectorByBinread_registered_object (std::istream *in, const std::string &registered_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 ForwardProjectorByBinask_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< ForwardProjectorByBin >
typedef ForwardProjectorByBin *(* 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_lessRegistryType
 The type of the registry.
 
- Protected Member Functions inherited from stir::ForwardProjectorByBin
virtual void actual_forward_project (RelatedViewgrams< float > &viewgrams, const int min_axial_pos_num, const int max_axial_pos_num, const int min_tangential_pos_num, const int max_tangential_pos_num)
 
virtual void check (const ProjDataInfo &proj_data_info) const
 check if the argument is the same as what was used for set_up() More...
 
virtual void check (const ProjDataInfo &proj_data_info, const DiscretisedDensity< 3, float > &density_info) const
 check if the arguments are the same as what was used for set_up() More...
 
- 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< ForwardProjectorByBin >
static RegistryTyperegistry ()
 Static function returning the registry. More...
 

Detailed Description

This class implements forward projection using Siddon's algorithm for ray tracing. That is, it computes length of intersection with the voxels.

Currently, the LOIs are divided by voxel_size.x(), unless NEWSCALE is #defined during compilation time of ForwardProjectorByBinUsingRayTracing_Siddon.cxx.

If the z voxel size is exactly twice the sampling in axial direction, multiple LORs are used, to avoid missing voxels. (TODOdoc describe how).

Currently, a FOV is used which is circular, and is slightly 'inside' the image (i.e. the radius is about 1 voxel smaller than the maximum possible).

Warning
Current implementation assumes that x,y voxel sizes are at least as large as the sampling in tangential direction, and that z voxel size is either equal to or exactly twice the sampling in axial direction of the segments.
For each bin, maximum 3 LORs are 'traced'
The image forward projected HAS to be of type VoxelsOnCartesianGrid.
The projection data info HAS to be of type ProjDataInfoCylindrical
The implementation assumes that the s -coordinate is antisymmetric in terms of the tangential_pos_num, i.e.
proj_data_info_ptr->get_s(Bin(...,tang_pos_num)) ==
- proj_data_info_ptr->get_s(Bin(...,-tang_pos_num))

Constructor & Destructor Documentation

◆ ForwardProjectorByBinUsingRayTracing()

stir::ForwardProjectorByBinUsingRayTracing::ForwardProjectorByBinUsingRayTracing ( const shared_ptr< const ProjDataInfo > &  proj_data_info_sptr,
const shared_ptr< const DiscretisedDensity< 3, float >> &  image_info_ptr 
)

Constructor.

Warning
Obsolete

Member Function Documentation

◆ set_up()

void stir::ForwardProjectorByBinUsingRayTracing::set_up ( const shared_ptr< const ProjDataInfo > &  proj_data_info_ptr,
const shared_ptr< const DiscretisedDensity< 3, float >> &  density_info_ptr 
)
overridevirtual

Stores all necessary geometric info.

Note that the density_info_ptr is not stored in this object. It's only used to get some info on sizes etc.

Implements stir::ForwardProjectorByBin.

References stir::error(), stir::VoxelsOnCartesianGrid< elemT >::get_voxel_size(), stir::round(), and stir::warning().

◆ get_symmetries_used()

const DataSymmetriesForViewSegmentNumbers * stir::ForwardProjectorByBinUsingRayTracing::get_symmetries_used ( ) const
overridevirtual

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