Skip to content

Commit

Permalink
first steps to expose mask functions for Scatter
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisThielemans committed Jul 10, 2024
1 parent cb8a998 commit 51911cc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/xSTIR/cSTIR/cstir_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,23 @@ sirf::cSTIR_setScatterEstimatorParameter
SPTR_FROM_HANDLE(STIRImageData, sptr_id, hv);
obj.set_attenuation_image_sptr(sptr_id);
}
else if (sirf::iequals(name, "setMaskImage"))
{
SPTR_FROM_HANDLE(STIRImageData, sptr_id, hv);
obj.set_mask_image_sptr(sptr_id);
}
else if (sirf::iequals(name, "setMaskAcqData"))
{
SPTR_FROM_HANDLE(STIRAcquisitionData, sptr_pd, hv);
obj.set_mask_acq_data_sptr(sptr_pd);
}
#if STIR_VERSION >= 060200
else if (sirf::iequals(name, "setRecomputeMaskImage"))
{
bool value = dataFromHandle<bool>(hv);
obj.set_recompute_mask_image(value);
}
#endif
else if (sirf::iequals(name, "setAttenuationCorrectionFactors"))
{
SPTR_FROM_HANDLE(STIRAcquisitionData, sptr_ad, hv);
Expand Down
8 changes: 8 additions & 0 deletions src/xSTIR/cSTIR/include/sirf/STIR/stir_x.h
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,14 @@ The actual algorithm is described in
stir::ScatterEstimation::set_attenuation_image_sptr(arg->data_sptr());
#endif
}
void set_mask_image_sptr(std::shared_ptr<const STIRImageData> arg)
{
stir::ScatterEstimation::set_mask_image_sptr(arg->data_sptr());
}
void set_mask_acq_data_sptr(std::shared_ptr<const STIRAcquisitionData> arg)
{
stir::ScatterEstimation::set_mask_proj_data_sptr(arg->data());
}

//! Set prefix for filenames with scatter estimates.
/*!
Expand Down

0 comments on commit 51911cc

Please sign in to comment.