STIR 6.4.0
ProjMatrixElemsForOneBin.inl
Go to the documentation of this file.
1//
2//
16/*
17 Copyright (C) 2000 PARAPET partners
18 Copyright (C) 2000- 2009, Hammersmith Imanet Ltd
19 This file is part of STIR.
20
21 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
22
23 See STIR/LICENSE.txt for details
24*/
25
26START_NAMESPACE_STIR
27
28const Bin&
30{
31 return bin;
32}
33
34void
36{
37 bin = new_bin;
38}
39
40void
45
46ProjMatrixElemsForOneBin::size_type
48{
49 return elements.size();
50}
51
54{
55 return elements.begin();
56}
57
58ProjMatrixElemsForOneBin::const_iterator
60{
61 return elements.begin();
62};
63
64ProjMatrixElemsForOneBin::iterator
65ProjMatrixElemsForOneBin::end()
66{
67 return elements.end();
68};
69
70ProjMatrixElemsForOneBin::const_iterator
71ProjMatrixElemsForOneBin::end() const
72{
73 return elements.end();
74};
75
76ProjMatrixElemsForOneBin::reverse_iterator
77ProjMatrixElemsForOneBin::rbegin()
78{
79 return elements.rbegin();
80}
81
82ProjMatrixElemsForOneBin::const_reverse_iterator
83ProjMatrixElemsForOneBin::rbegin() const
84{
85 return elements.rbegin();
86};
87
88ProjMatrixElemsForOneBin::reverse_iterator
89ProjMatrixElemsForOneBin::rend()
90{
91 return elements.rend();
92};
93
94ProjMatrixElemsForOneBin::const_reverse_iterator
95ProjMatrixElemsForOneBin::rend() const
96{
97 return elements.rend();
98};
99
100ProjMatrixElemsForOneBin::iterator
102{
103 return elements.erase(it);
104}
105
106#if 0
107unsigned int ProjMatrixElemsForOneBin::make_key(int X,int Y,int Z)
108{
109 // make x and y positive
110 // min_x and min_y is supposed to be > -300
111 X+= 300; // assert : mix_x >= -300, max_x < 2^10 -300
112 Y+= 300; // ....
113 assert ( X >=0 && X < 0x03FF -300);
114 assert ( Y >=0 && Y < 0x03FF -300);
115 assert ( Z >= 0 && Z < 0x03FF ); // Z >=0 & < 2^10
116 return ( ((unsigned int)X<<20) | ((unsigned int)Y<<10) | (unsigned int)Z );
117}
118#endif
119END_NAMESPACE_STIR
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
size_type size() const
number of non-zero elements
Definition ProjMatrixElemsForOneBin.inl:47
Element_vector::iterator iterator
typedefs for iterator support
Definition ProjMatrixElemsForOneBin.h:86
const Bin & get_bin() const
get the bin coordinates corresponding to this row
Definition ProjMatrixElemsForOneBin.inl:29
void push_back(const value_type &)
add a new value_type object at the end
Definition ProjMatrixElemsForOneBin.inl:41
void set_bin(const Bin &)
and set the bin coordinates
Definition ProjMatrixElemsForOneBin.inl:35
iterator begin()
functions for allowing iterator access
Definition ProjMatrixElemsForOneBin.inl:53
ProjMatrixElemsForOneBinValue value_type
Recommended way to call the type of the elements, instead of referring to the actual classname.
Definition ProjMatrixElemsForOneBin.h:78
void erase()
reset lor to 0 length
Definition ProjMatrixElemsForOneBin.cxx:57