|
STIR 6.5.0
|
Helper class for the wrapped NiftyPET projectors. More...
#include "stir/recon_buildblock/NiftyPET_projector/NiftyPETHelper.h"
Public Member Functions | |
| NiftyPETHelper () | |
| Default constructor. | |
| virtual | ~NiftyPETHelper () |
| Destructor. | |
| void | set_cuda_device_id (const int devid) |
| Set CUDA device ID. | |
| void | set_span (const char span) |
| Set span. | |
| void | set_att (const char att) |
| Set emission (0) or transmission (1) - whether to exp{-result} for attenuation maps. | |
| void | set_verbose (const bool verbose) |
| Set verbosity level for CUDA output. | |
| void | set_scanner_type (const Scanner::Type scanner_type) |
| Set scanner type. | |
| void | set_up () |
| Set up. | |
| std::vector< float > | create_niftyPET_sinogram_no_gaps () const |
| Create NiftyPET singram with no gaps. Forward project into this. | |
| std::vector< float > | create_niftyPET_sinogram_with_gaps () const |
| Create NiftyPET sinogram with gaps. Use this before converting to stir. | |
| void | convert_proj_data_stir_to_niftyPET (std::vector< float > &np_vec, const ProjData &stir) const |
| Convert STIR proj data to NiftyPET proj data. | |
| void | convert_viewgram_stir_to_niftyPET (std::vector< float > &np_vec, const Viewgram< float > &viewgram) const |
| Convert STIR viewgram to NiftyPET. | |
| void | convert_proj_data_niftyPET_to_stir (ProjData &stir_sptr, const std::vector< float > &np_vec) const |
| Convert NiftyPET proj data to STIR proj data. | |
| void | remove_gaps (std::vector< float > &sino_no_gaps, const std::vector< float > &sino_w_gaps) const |
| Remove gaps from sinogram. Do some unavoidable const_casting as the wrapped methods don't use const. | |
| void | put_gaps (std::vector< float > &sino_w_gaps, const std::vector< float > &sino_no_gaps) const |
| Put gaps into sinogram. Do some unavoidable const_casting as the wrapped methods don't use const. | |
| void | back_project (std::vector< float > &image, const std::vector< float > &sino_no_gaps) const |
| Back project. Do some unavoidable const_casting as the wrapped methods don't use const. | |
| void | forward_project (std::vector< float > &sino_no_gaps, const std::vector< float > &image) const |
| Forward project, returns sinogram without gaps. Do some unavoidable const_casting as the wrapped methods don't use const. | |
| void | lm_to_proj_data (shared_ptr< ProjData > &prompts_sptr, shared_ptr< ProjData > &delayeds_sptr, shared_ptr< ProjData > &randoms_sptr, shared_ptr< ProjData > &norm_sptr, const int tstart, const int tstop, const std::string &lm_binary_file, const std::string &norm_binary_file="") const |
| Listmode to sinogram. | |
Static Public Member Functions | |
| static std::vector< float > | create_niftyPET_image () |
| Create NiftyPET image. | |
| static shared_ptr< VoxelsOnCartesianGrid< float > > | create_stir_im () |
| Create STIR image with mMR dimensions. | |
| static void | convert_image_stir_to_niftyPET (std::vector< float > &np, const DiscretisedDensity< 3, float > &stir) |
| Convert STIR image to NiftyPET image. | |
| static void | convert_image_niftyPET_to_stir (DiscretisedDensity< 3, float > &stir, const std::vector< float > &np_vec) |
| Convert NiftyPET image to STIR image. | |
| static shared_ptr< ProjData > | create_stir_sino () |
| Create a STIR sinogram. | |
Helper class for the wrapped NiftyPET projectors.
|
virtual |
|
static |
Create NiftyPET image.
References create_niftyPET_image().
Referenced by back_project(), create_niftyPET_image(), and forward_project().
|
static |
Create STIR image with mMR dimensions.
References create_stir_im(), and MAKE_SHARED.
Referenced by create_stir_im().
| std::vector< float > stir::NiftyPETHelper::create_niftyPET_sinogram_no_gaps | ( | ) | const |
Create NiftyPET singram with no gaps. Forward project into this.
References create_niftyPET_sinogram_no_gaps().
Referenced by create_niftyPET_sinogram_no_gaps(), and lm_to_proj_data().
| std::vector< float > stir::NiftyPETHelper::create_niftyPET_sinogram_with_gaps | ( | ) | const |
Create NiftyPET sinogram with gaps. Use this before converting to stir.
References create_niftyPET_sinogram_with_gaps().
Referenced by create_niftyPET_sinogram_with_gaps(), lm_to_proj_data(), and put_gaps().
|
static |
Convert STIR image to NiftyPET image.
References convert_image_stir_to_niftyPET().
Referenced by convert_image_stir_to_niftyPET().
|
static |
Convert NiftyPET image to STIR image.
References convert_image_niftyPET_to_stir().
Referenced by convert_image_niftyPET_to_stir().
| void stir::NiftyPETHelper::convert_proj_data_stir_to_niftyPET | ( | std::vector< float > & | np_vec, |
| const ProjData & | stir ) const |
Convert STIR proj data to NiftyPET proj data.
References convert_proj_data_stir_to_niftyPET(), and convert_viewgram_stir_to_niftyPET().
Referenced by convert_proj_data_stir_to_niftyPET().
| void stir::NiftyPETHelper::convert_viewgram_stir_to_niftyPET | ( | std::vector< float > & | np_vec, |
| const Viewgram< float > & | viewgram ) const |
Convert STIR viewgram to NiftyPET.
References convert_viewgram_stir_to_niftyPET(), stir::Viewgram< elemT >::get_max_axial_pos_num(), stir::Viewgram< elemT >::get_min_axial_pos_num(), stir::DataWithProjDataInfo::get_proj_data_info_sptr(), stir::Viewgram< elemT >::get_segment_num(), and stir::Viewgram< elemT >::get_view_num().
Referenced by convert_proj_data_stir_to_niftyPET(), and convert_viewgram_stir_to_niftyPET().
| void stir::NiftyPETHelper::convert_proj_data_niftyPET_to_stir | ( | ProjData & | stir_sptr, |
| const std::vector< float > & | np_vec ) const |
Convert NiftyPET proj data to STIR proj data.
References convert_proj_data_niftyPET_to_stir().
Referenced by convert_proj_data_niftyPET_to_stir(), and lm_to_proj_data().
| void stir::NiftyPETHelper::remove_gaps | ( | std::vector< float > & | sino_no_gaps, |
| const std::vector< float > & | sino_w_gaps ) const |
Remove gaps from sinogram. Do some unavoidable const_casting as the wrapped methods don't use const.
References remove_gaps().
Referenced by remove_gaps().
| void stir::NiftyPETHelper::put_gaps | ( | std::vector< float > & | sino_w_gaps, |
| const std::vector< float > & | sino_no_gaps ) const |
Put gaps into sinogram. Do some unavoidable const_casting as the wrapped methods don't use const.
References create_niftyPET_sinogram_with_gaps(), and put_gaps().
Referenced by lm_to_proj_data(), and put_gaps().
| void stir::NiftyPETHelper::back_project | ( | std::vector< float > & | image, |
| const std::vector< float > & | sino_no_gaps ) const |
Back project. Do some unavoidable const_casting as the wrapped methods don't use const.
References back_project(), and create_niftyPET_image().
Referenced by back_project().
| void stir::NiftyPETHelper::forward_project | ( | std::vector< float > & | sino_no_gaps, |
| const std::vector< float > & | image ) const |
Forward project, returns sinogram without gaps. Do some unavoidable const_casting as the wrapped methods don't use const.
References create_niftyPET_image(), and forward_project().
Referenced by forward_project().
|
static |
Create a STIR sinogram.
References stir::ProjDataInfo::construct_proj_data_info(), create_stir_sino(), stir::Scanner::get_scanner_from_name(), and MAKE_SHARED.
Referenced by create_stir_sino(), and lm_to_proj_data().
| void stir::NiftyPETHelper::lm_to_proj_data | ( | shared_ptr< ProjData > & | prompts_sptr, |
| shared_ptr< ProjData > & | delayeds_sptr, | ||
| shared_ptr< ProjData > & | randoms_sptr, | ||
| shared_ptr< ProjData > & | norm_sptr, | ||
| const int | tstart, | ||
| const int | tstop, | ||
| const std::string & | lm_binary_file, | ||
| const std::string & | norm_binary_file = "" ) const |
Listmode to sinogram.
References convert_proj_data_niftyPET_to_stir(), create_niftyPET_sinogram_no_gaps(), create_niftyPET_sinogram_with_gaps(), create_stir_sino(), stir::FilePath::get_as_string(), stir::get_buckets(), stir::FilePath::get_current_working_directory(), stir::FilePath::is_absolute(), lm_to_proj_data(), stir::FilePath::prepend_directory_name(), and put_gaps().
Referenced by lm_to_proj_data().