Skip to content

Commit

Permalink
Merge pull request #619 from rijobro/examinfo_const
Browse files Browse the repository at this point in the history
use const ExamInfo to cope with UCL/STIR#487
  • Loading branch information
KrisThielemans authored Apr 14, 2020
2 parents 439ed1e + c579567 commit 6854699
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/xSTIR/cSTIR/include/sirf/STIR/stir_data_containers.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ namespace sirf {
));
stir::shared_ptr<PETAcquisitionData>
sptr(same_acquisition_data
(data()->get_exam_info_sptr(), out_proj_data_info_sptr));
(data()->get_exam_info_sptr()->create_shared_clone(), out_proj_data_info_sptr));
SSRB(*sptr, *data(), do_normalisation);
return sptr;
}
Expand Down Expand Up @@ -261,7 +261,7 @@ namespace sirf {
{
return data()->set_segment(s);
}
stir::shared_ptr<stir::ExamInfo> get_exam_info_sptr() const
stir::shared_ptr<const stir::ExamInfo> get_exam_info_sptr() const
{
return data()->get_exam_info_sptr();
}
Expand Down Expand Up @@ -300,7 +300,7 @@ namespace sirf {
virtual PETAcquisitionData* clone_impl() const = 0;
PETAcquisitionData* clone_base() const
{
stir::shared_ptr<stir::ExamInfo> sptr_ei = get_exam_info_sptr();
stir::shared_ptr<stir::ExamInfo> sptr_ei = get_exam_info_sptr()->create_shared_clone();
stir::shared_ptr<stir::ProjDataInfo> sptr_pdi = get_proj_data_info_sptr()->create_shared_clone();
PETAcquisitionData* ptr =
_template->same_acquisition_data(sptr_ei, sptr_pdi);
Expand Down Expand Up @@ -381,7 +381,7 @@ namespace sirf {
virtual ObjectHandle<DataContainer>* new_data_container_handle() const
{
init();
DataContainer* ptr = _template->same_acquisition_data(this->get_exam_info_sptr(),
DataContainer* ptr = _template->same_acquisition_data(this->get_exam_info_sptr()->create_shared_clone(),
this->get_proj_data_info_sptr()->create_shared_clone());
return new ObjectHandle<DataContainer>
(stir::shared_ptr<DataContainer>(ptr));
Expand All @@ -390,7 +390,7 @@ namespace sirf {
{
init();
return stir::shared_ptr < PETAcquisitionData >
(_template->same_acquisition_data(this->get_exam_info_sptr(),
(_template->same_acquisition_data(this->get_exam_info_sptr()->create_shared_clone(),
this->get_proj_data_info_sptr()->create_shared_clone()));
}

Expand Down Expand Up @@ -460,7 +460,8 @@ namespace sirf {
{
init();
DataContainer* ptr = _template->same_acquisition_data
(this->get_exam_info_sptr(), this->get_proj_data_info_sptr()->create_shared_clone());
(this->get_exam_info_sptr()->create_shared_clone(),
this->get_proj_data_info_sptr()->create_shared_clone());
return new ObjectHandle<DataContainer>
(stir::shared_ptr<DataContainer>(ptr));
}
Expand All @@ -469,7 +470,8 @@ namespace sirf {
init();
return stir::shared_ptr < PETAcquisitionData >
(_template->same_acquisition_data
(this->get_exam_info_sptr(), this->get_proj_data_info_sptr()->create_shared_clone()));
(this->get_exam_info_sptr()->create_shared_clone(),
this->get_proj_data_info_sptr()->create_shared_clone()));
}
private:
virtual PETAcquisitionDataInMemory* clone_impl() const
Expand Down

0 comments on commit 6854699

Please sign in to comment.