diff --git a/src/swig/stir.i b/src/swig/stir.i index 734397ecc..0746e57c6 100644 --- a/src/swig/stir.i +++ b/src/swig/stir.i @@ -70,8 +70,12 @@ #include "stir/recon_buildblock/BinNormalisationFromProjData.h" #include "stir/recon_buildblock/BinNormalisationFromAttenuationImage.h" #include "stir/recon_buildblock/TrivialBinNormalisation.h" - #include "stir/listmode/LmToProjData.h" + #include "stir/listmode/ListRecord.h" + #include "stir/listmode/ListEvent.h" + #include "stir/listmode/CListRecord.h" #include "stir/listmode/ListModeData.h" + #include "stir/listmode/CListModeData.h" + #include "stir/listmode/LmToProjData.h" #include "stir/CartesianCoordinate2D.h" #include "stir/CartesianCoordinate3D.h" @@ -955,6 +959,7 @@ ADD_REPR(stir::Succeeded, %arg($self->succeeded() ? "yes" : "no")); %shared_ptr(stir::DataSymmetriesForViewSegmentNumbers); %include "stir_projdata.i" +%include "stir_listmode.i" %include "stir/DataSymmetriesForViewSegmentNumbers.h" %include "stir_voxels.i" @@ -989,10 +994,6 @@ ADD_REPR(stir::Succeeded, %arg($self->succeeded() ? "yes" : "no")); %include "stir/multiply_crystal_factors.h" %include "stir/decay_correction_factor.h" -%rename (set_template_proj_data_info) *::set_template_proj_data_info_sptr; -%shared_ptr(stir::LmToProjData); -%include "stir/listmode/LmToProjData.h" - %shared_ptr(stir::ScatterSimulation); %shared_ptr(stir::RegisteredParsingObject); @@ -1011,18 +1012,6 @@ ADD_REPR(stir::Succeeded, %arg($self->succeeded() ? "yes" : "no")); %shared_ptr(stir::CreateTailMaskFromACFs); %include "stir/scatter/CreateTailMaskFromACFs.h" -%shared_ptr(stir::ListModeData); -%include "stir/listmode/ListModeData.h" - -%extend stir::ListModeData { - static shared_ptr read_from_file(const std::string& filename) - { - using namespace stir; - shared_ptr ret(read_from_file(filename)); - return ret; - } -} - %shared_ptr(stir::FanProjData); %shared_ptr(stir::GeoData3D); %ignore operator<<; diff --git a/src/swig/stir_listmode.i b/src/swig/stir_listmode.i new file mode 100644 index 000000000..2818ebe6a --- /dev/null +++ b/src/swig/stir_listmode.i @@ -0,0 +1,53 @@ +/* + Copyright (C) 2023 University College London + Copyright (C) 2022 Positrigo + This file is part of STIR. + + SPDX-License-Identifier: Apache-2.0 + + See STIR/LICENSE.txt for details +*/ +/*! + \file + \brief Interface file for SWIG: stir::ListModeData, stir:LmToProjData, stir::ListRecord + + \author Kris Thielemans + \author Markus Jehl +*/ +%shared_ptr(stir::ListRecord); +%shared_ptr(stir::ListEvent); +%shared_ptr(stir::CListRecord); +%shared_ptr(stir::CListEvent); +%shared_ptr(stir::CListRecordWithGatingInput); + +%include "stir/listmode/ListRecord.h" +%include "stir/listmode/ListEvent.h" +%include "stir/listmode/CListRecord.h" + +%rename (get_empty_record) *::get_empty_record_sptr; + +%rename (set_template_proj_data_info) *::set_template_proj_data_info_sptr; +%shared_ptr(stir::LmToProjData); +%include "stir/listmode/LmToProjData.h" +ADD_REPR_PARAMETER_INFO(stir::LmToProjData); + +%shared_ptr(stir::ListModeData); +%include "stir/listmode/ListModeData.h" + +%extend stir::ListModeData { + static shared_ptr read_from_file(const std::string& filename) + { + using namespace stir; + shared_ptr ret(read_from_file(filename)); + return ret; + } +} + +%extend stir::CListModeData { + static shared_ptr read_from_file(const std::string& filename) + { + using namespace stir; + shared_ptr ret(read_from_file(filename)); + return ret; + } +}