-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SWIG] add ListRecord and CList versions
To do this cleanly, move lines from stir.i to separate stir_listmode.i
- Loading branch information
1 parent
5a49e13
commit b225bdb
Showing
2 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<stir::ListModeData> read_from_file(const std::string& filename) | ||
{ | ||
using namespace stir; | ||
shared_ptr<ListModeData> ret(read_from_file<ListModeData>(filename)); | ||
return ret; | ||
} | ||
} | ||
|
||
%extend stir::CListModeData { | ||
static shared_ptr<stir::CListModeData> read_from_file(const std::string& filename) | ||
{ | ||
using namespace stir; | ||
shared_ptr<CListModeData> ret(read_from_file<CListModeData>(filename)); | ||
return ret; | ||
} | ||
} |