STIR 6.4.0
Sinogram.h
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000 PARAPET partners
5 Copyright (C) 2000 - 2007-10-08, Hammersmith Imanet Ltd
6 Copyright (C) 2011-07-01 - 2012, Kris Thielemans
7 Copyright (C) 2023, University College London
8 This file is part of STIR.
9
10 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
11
12 See STIR/LICENSE.txt for details
13*/
27#ifndef __Sinogram_h__
28#define __Sinogram_h__
29
30#include "stir/Array.h"
33#include "stir/shared_ptr.h"
34
35START_NAMESPACE_STIR
36
45template <typename elemT>
46class Sinogram : public Array<2, elemT>, public DataWithProjDataInfo
47{
48private:
49 typedef Array<2, elemT> base_type;
50#ifdef STIR_COMPILING_SWIG_WRAPPER
51 // SWIG needs the next typedef to be public
52public:
53#endif
54 typedef Sinogram<elemT> self_type;
55
56public:
58 Sinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_sptr, const SinogramIndices&);
59
61 Sinogram(const Array<2, elemT>& p, const shared_ptr<const ProjDataInfo>& proj_data_info_sptr, const SinogramIndices&);
62
64
67 Sinogram(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
68 const int ax_pos_num,
69 const int segment_num,
70 const int timing_pos_num = 0);
71
73
76 Sinogram(const Array<2, elemT>& p,
77 const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
78 const int ax_pos_num,
79 const int segment_num,
80 const int timing_pos_num = 0);
81
85 inline int get_segment_num() const;
87 inline int get_axial_pos_num() const;
89 inline int get_timing_pos_num() const;
90
92 Sinogram get_empty_copy(void) const;
93
95 void grow(const IndexRange<2>& range) override;
97 void resize(const IndexRange<2>& range) override;
98
99 // inline Sinogram operator = (const Sinogram &s) const;
100
102
103
107 bool has_same_characteristics(self_type const&, std::string& explanation) const;
108
110
112 bool has_same_characteristics(self_type const&) const;
113
115
119 bool operator==(const self_type&) const;
120
122 bool operator!=(const self_type&) const;
124
125private:
126 SinogramIndices _indices;
127};
128
129END_NAMESPACE_STIR
130
131#include "stir/Sinogram.inl"
132
133#endif
defines the stir::Array class for multi-dimensional (numeric) arrays
declaration of stir::DataWithProjDataInfo
Definition of class stir::SinogramIndices.
Implementations of inline functions of class stir::Sinogram.
DataWithProjDataInfo()
Default constructor sets internal member to 0.
Definition DataWithProjDataInfo.cxx:20
This class defines ranges which can be 'irregular'.
Definition IndexRange.h:69
A very simple class to store all dincies to get a (2D) Sinogram.
Definition SinogramIndices.h:34
SinogramIndices get_sinogram_indices() const
Get indices.
Definition Sinogram.inl:27
bool operator==(const self_type &) const
check equality (data has to be identical)
Definition Sinogram.cxx:133
int get_timing_pos_num() const
Get timing position index.
Definition Sinogram.inl:48
int get_segment_num() const
Get segment number.
Definition Sinogram.inl:34
int get_axial_pos_num() const
Get number of axial positions.
Definition Sinogram.inl:41
bool has_same_characteristics(self_type const &, std::string &explanation) const
Checks if the 2 objects have the proj_data_info, segment_num etc.
Definition Sinogram.cxx:96
Sinogram get_empty_copy(void) const
Get an empty sinogram of the same dimensions, segment_num etc.
Definition Sinogram.cxx:43
void resize(const IndexRange< 2 > &range) override
Overloading Array::resize.
Definition Sinogram.cxx:151
bool operator!=(const self_type &) const
negation of operator==
Definition Sinogram.cxx:140
Sinogram(const shared_ptr< const ProjDataInfo > &proj_data_info_sptr, const SinogramIndices &)
Construct sinogram from proj_data_info pointe and indices. Data are set to 0.
Definition Sinogram.cxx:71
void grow(const IndexRange< 2 > &range) override
Overloading Array::grow.
Definition Sinogram.cxx:178
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...