Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle "compressed" projdatainfo as input of CListEvent #55

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recon_test_pack/root_header.hroot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Default bin size (cm) := 0.208626
Maximum number of non-arc-corrected bins := 344
Default number of arc-corrected bins := 344
View offset (degrees) := 0
Number of TOF time bins := 410
Number of TOF time bins := 411
Size of timing bin (ps) := 10.00
Timing resolution (ps) := 400.0

Expand Down
2 changes: 1 addition & 1 deletion recon_test_pack/template_for_ROOT_scanner.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Maximum number of non-arc-corrected bins := 344
Default number of arc-corrected bins := 344
Energy resolution := 0
Reference energy (in keV) := 511
Number of TOF time bins :=410
Number of TOF time bins :=411
Size of timing bin (ps) := 10
Timing resolution (ps) := 400
Number of blocks per bucket in transaxial direction := 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,24 @@ CListEventScannerWithDiscreteDetectors(const shared_ptr<const ProjDataInfo>& pro
if (!proj_data_info_sptr)
error("CListEventScannerWithDiscreteDetectors constructor called with zero pointer");

this->uncompressed_proj_data_info_sptr = std::dynamic_pointer_cast< const ProjDataInfoT >(proj_data_info_sptr->create_shared_clone());

#if 0 // TODO: actually create uncompressed.
this->scanner_sptr = scanner_sptr_v;
auto scanner_sptr = proj_data_info_sptr->get_scanner_sptr();
// get bare pointer of uncompressed ProjDataInfo
auto pdi_ptr =
ProjDataInfo::ProjDataInfoCTI(scanner_sptr_v,
1, scanner_sptr->get_num_rings()-1,
scanner_sptr->get_num_detectors_per_ring()/2,
scanner_sptr->get_max_num_non_arccorrected_bins(),
false);
auto pdi_ptr_cast =
dynamic_cast<ProjDataInfoT *>(pdi_ptr);
ProjDataInfo::construct_proj_data_info(scanner_sptr,
1, scanner_sptr->get_num_rings()-1,
scanner_sptr->get_num_detectors_per_ring()/2,
scanner_sptr->get_max_num_non_arccorrected_bins(),
/* arc correction = */ false,
/* TOF mashing = */ 1).release();
// check type
auto pdi_ptr_cast = dynamic_cast<ProjDataInfoT *>(pdi_ptr);
if (!pdi_ptr_cast)
{
delete pdi_ptr;
error("CListEventScannerWithDiscreteDetectors constructor called with scanner that gives wrong type of ProjDataInfo");
}
// set shared_ptr from bare pointer (will take ownership)
this->uncompressed_proj_data_info_sptr.reset(pdi_ptr_cast);
#endif
}

template <class ProjDataInfoT>
Expand Down
2 changes: 2 additions & 0 deletions src/listmode_buildblock/CListModeDataROOT.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ set_defaults()
bin_size = -1.f;
view_offset = 0.f;
tof_mash_factor = 1;
reference_energy = 511.F;
energy_resolution = -1.F;
}

Succeeded
Expand Down