STIR  6.2.0
DataSymmetriesForDensels_PET_CartesianGrid.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2001- 2011, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
21 #ifndef __stir_recon_buildblock_DataSymmetriesForDensels_PET_CartesianGrid_H__
22 #define __stir_recon_buildblock_DataSymmetriesForDensels_PET_CartesianGrid_H__
23 
25 #include "stir/ProjDataInfo.h"
26 //#include "stir/SymmetryOperations_PET_CartesianGrid.h"
27 //#include "stir/ViewSegmentNumbers.h"
28 //#include "stir/VoxelsOnCartesianGrid.h"
29 #include "stir/Densel.h"
30 #include "stir/shared_ptr.h"
31 #include <vector>
32 
33 START_NAMESPACE_STIR
34 
35 template <int num_dimensions, typename elemT>
36 class DiscretisedDensity;
37 template <int num_dimensions, typename elemT>
38 class DiscretisedDensityOnCartesianGrid;
39 
49 {
50 private:
53 
54 public:
55  DataSymmetriesForDensels_PET_CartesianGrid(const shared_ptr<const ProjDataInfo>& proj_data_info_ptr,
56  const shared_ptr<const DiscretisedDensity<3, float>>& image_info_ptr);
57 
58 #ifndef STIR_NO_COVARIANT_RETURN_TYPES
60 #else
62 #endif
63  clone() const override;
64 
65  bool operator==(const DataSymmetriesForDensels_PET_CartesianGrid&) const;
66 
67 #if 0
68  TODO!
70  virtual DenselIndexRange
71  get_basic_densel_index_range() const;
72 #endif
73 
74  inline void get_related_densels(std::vector<Densel>&, const Densel& b) const override;
75 
76  inline int num_related_densels(const Densel& b) const override;
77 
78  inline unique_ptr<SymmetryOperation> find_symmetry_operation_from_basic_densel(Densel&) const override;
79 
80  inline bool find_basic_densel(Densel& b) const override;
81 
83  inline float get_num_planes_per_scanner_ring() const;
84 
86 
91  inline float get_num_planes_per_axial_pos(const int segment_num) const;
92  inline float get_axial_pos_to_z_offset(const int segment_num) const;
93 
94 private:
95  const shared_ptr<const ProjDataInfo>& proj_data_info_ptr;
96  int num_planes;
97  int num_independent_planes;
98  int num_views;
99  int num_planes_per_scanner_ring;
101  VectorWithOffset<int> num_planes_per_axial_pos;
103  VectorWithOffset<float> axial_pos_to_z_offset;
104 
105 #if 0
106  // at the moment, we don't need the following 2 members
107 
108  // TODO somehow store only the info
109  shared_ptr<const DiscretisedDensity<3,float> > image_info_ptr;
110 
111  // a convenience function that does the dynamic_cast from the above
113  cartesian_grid_info_ptr() const;
114 #endif
115 
116  bool blindly_equals(const root_type* const) const override;
117 
118  inline SymmetryOperation* find_sym_op_general_densel(const int z, const int y, const int x) const;
119 };
120 
121 END_NAMESPACE_STIR
122 
124 
125 #endif
Declaration of class stir::DataSymmetriesForDensels.
Declaration of class stir::ProjDataInfo.
inline implementations for class DataSymmetriesForDensels_PET_CartesianGrid
Encodes symmetry operation on image coordinates and projection data coordinates.
Definition: SymmetryOperation.h:61
This abstract class is the basis for images on a Cartesian grid.
Definition: DiscretisedDensityOnCartesianGrid.h:44
Declaration of typedef stir::Densel.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
A class for encoding/finding symmetries common to the geometry of the projection data and the discret...
Definition: DataSymmetriesForDensels.h:50
Symmetries appropriate for a (cylindrical) PET scanner, and a discretised density on a Cartesian grid...
Definition: DataSymmetriesForDensels_PET_CartesianGrid.h:48