STIR 6.4.0
RelatedBins.h
Go to the documentation of this file.
1
12/*
13 Copyright (C) 2000 PARAPET partners
14 Copyright (C) 2000- 2009, Hammersmith Imanet Ltd
15 This file is part of STIR.
16
17 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
18
19 See STIR/LICENSE.txt for details
20*/
21#ifndef __RelatedBins_H__
22#define __RelatedBins_H__
23
24#include "stir/shared_ptr.h"
25#include <vector>
26#include <iterator>
27
28START_NAMESPACE_STIR
29
30class ProjData;
31class Bin;
32class DataSymmetriesForBins;
38
40{
41public:
43
44 typedef std::random_access_iterator_tag iterator_category;
45 typedef Bin value_type;
46 typedef value_type& reference;
47 typedef const value_type& const_reference;
48 typedef std::ptrdiff_t difference_type;
49 typedef std::size_t size_type;
50
52 typedef std::vector<Bin>::iterator iterator;
53 typedef std::vector<Bin>::const_iterator const_iterator;
55 inline RelatedBins();
56
58 inline int get_num_related_bins() const;
59
61 inline Bin get_basic_bin() const;
62
63 // get the pointer to a ProjDataInfo class
64 // inline const ProjDataInfo * get_proj_data_info_sptr() const;
65
67 inline const DataSymmetriesForBins* get_symmetries_ptr() const;
68
71
72 // basic iterator support
73
75 inline iterator begin();
77 inline iterator end();
79 inline const_iterator begin() const;
81 inline const_iterator end() const;
82
83private:
84 std::vector<Bin> related_bins;
85 shared_ptr<DataSymmetriesForBins> symmetries;
87 inline RelatedBins(const std::vector<Bin>& related_bins, const shared_ptr<DataSymmetriesForBins>& symmetries_used);
88};
89
90END_NAMESPACE_STIR
91
93
94#endif //__RelatedBins_H__
Implementations of inline functions of class stir::RelatedBins.
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
A class for encoding/finding symmetries common to the geometry of the projection data and the discret...
Definition DataSymmetriesForBins.h:68
RelatedBins()
Default constructor: creates no bins, no symmetries.
Definition RelatedBins.inl:29
std::random_access_iterator_tag iterator_category
typedefs for iterator support
Definition RelatedBins.h:44
int get_num_related_bins() const
get the number of related bins
Definition RelatedBins.inl:40
std::vector< Bin >::iterator iterator
typedefs to make it partly comply with STL requirements
Definition RelatedBins.h:52
iterator begin()
use to initialise an iterator to the first element of the vector
Definition RelatedBins.inl:68
RelatedBins get_empty_copy() const
get an empty copy
iterator end()
iterator 'past' the last element of the vector
Definition RelatedBins.inl:74
const DataSymmetriesForBins * get_symmetries_ptr() const
return the symmetries used
Definition RelatedBins.inl:62
Bin get_basic_bin() const
get 'basic' bin coordinates
Definition RelatedBins.inl:46
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast into the stir names...