STIR 6.4.0
Segment.inl
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000 PARAPET partners
5 Copyright (C) 2000- 2007, IRSL
6 Copyright (C) 2023, 2024 University College London
7 This file is part of STIR.
8
9 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
10
11 See STIR/LICENSE.txt for details
12*/
23#include "stir/Sinogram.h"
24
25START_NAMESPACE_STIR
26
27template <typename elemT>
28Segment<elemT>::Segment(const shared_ptr<const ProjDataInfo>& proj_data_info_sptr_v, const SegmentIndices& ind)
29 : DataWithProjDataInfo(proj_data_info_sptr_v),
30 _indices(ind)
31{}
32
33template <typename elemT>
34SegmentIndices
35Segment<elemT>::get_segment_indices() const
36{
37 return _indices;
38}
39
40template <typename elemT>
41int
43{
44 return _indices.segment_num();
45}
46
47template <typename elemT>
48int
50{
51 return _indices.timing_pos_num();
52}
53
54template <typename elemT>
55int
56Segment<elemT>::get_min_axial_pos_num() const
57{
58 return this->proj_data_info_sptr->get_min_axial_pos_num(this->get_segment_num());
59}
60
61template <typename elemT>
62int
63Segment<elemT>::get_max_axial_pos_num() const
64{
65 return this->proj_data_info_sptr->get_max_axial_pos_num(this->get_segment_num());
66}
67
68template <typename elemT>
69int
70Segment<elemT>::get_num_axial_poss() const
71{
72 return this->proj_data_info_sptr->get_num_axial_poss(this->get_segment_num());
73}
74
75template <typename elemT>
78{
79 return this->get_sinogram(s.axial_pos_num());
80}
82template <typename elemT>
88
89END_NAMESPACE_STIR
Declaration of class stir::Sinogram.
virtual Viewgram< elemT > get_viewgram(int view_num) const =0
return a new viewgram, with data set as in the segment
int get_segment_num() const
Get the segment number.
Definition Segment.inl:42
virtual Sinogram< elemT > get_sinogram(int axial_pos_num) const =0
return a new sinogram, with data set as in the segment
int get_timing_pos_num() const
Get the timing position index.
Definition Segment.inl:49
A very simple class to store all dincies to get a (2D) Sinogram.
Definition SinogramIndices.h:34
int axial_pos_num() const
get view number for const objects
Definition SinogramIndices.inl:41
A class for 2d projection data.
Definition Sinogram.h:47
A very simple class to store all dincies to get a (2D) Viewgram.
Definition ViewgramIndices.h:33
int view_num() const
get view number for const objects
Definition ViewgramIndices.inl:36
A class for 2d projection data.
Definition Viewgram.h:49