STIR 6.4.0
ProjDataInfoGenericNoArcCorr.inl
Go to the documentation of this file.
1/*
2 Copyright (C) 2021, 2026 University College London
3 Copyright (C) 2017, ETH Zurich, Institute of Particle Physics and Astrophysics
4 Copyright (C) 2018, 2021, University of Leeds
5 This file is part of STIR.
6
7 SPDX-License-Identifier: Apache-2.0
8
9 See STIR/LICENSE.txt for details
10*/
11
24
25// for sqrt
26#include <cmath>
27#include "stir/Bin.h"
28#include "stir/Succeeded.h"
29#include "stir/LORCoordinates.h"
30#include "stir/is_null_ptr.h"
31#include <algorithm>
33#include "stir/error.h"
34
35START_NAMESPACE_STIR
36
38float
40{
42 get_LOR(lor, bin);
43 return lor.phi();
44}
45
49float
51{
53 get_LOR(lor, bin);
54 return (static_cast<float>(lor.z1() + lor.z2())) / 2.F;
55}
56
57float
59{
60 return get_m(bin) * get_costheta(bin);
61}
62
63/*
64 theta is copolar angle of normal to projection plane with z axis, i.e. copolar angle of lor with z axis.
65 tan (theta) = dz/sqrt(dx2+dy2)
66 cylindrical geometry:
67 delta_z = delta_ring * ring spacing
68 generic geometry:
69 delta_z is calculated from lor
70*/
71float
73{
75 get_LOR(lor, bin);
76
77 return (lor.z2() - lor.z1()) / (2 * lor.radius());
78}
79
80float
82{
83 // TODOBLOCK
84 return get_scanner_ptr()
85 ->get_ring_spacing(); // TODO currently restricted to span=1 get_num_axial_poss_per_ring_inc(segment_num);
86 // return get_axial_sampling(bin.segment_num());
87}
88
89float
91{
92 // TODOBLOCK
93 return get_scanner_ptr()->get_ring_spacing()
94 * get_costheta(bin); // TODO currently restricted to span=1 get_num_axial_poss_per_ring_inc(segment_num);
95 // return get_axial_sampling(bin.segment_num())*get_costheta(bin);
96}
97
98float
100{
101 // TODOBLOCK should check sampling
102 return get_ring_spacing(); // TODO currently restricted to span=1 get_num_axial_poss_per_ring_inc(segment_num);
103}
104
105bool
107{
108 // TODOBLOCK should check sampling
109 return true;
110}
111
112float
114{
115 return get_scanner_ptr()->get_ring_spacing();
116}
117
121float
123{
125 get_LOR(lor, bin);
126 return lor.s();
127}
128
129END_NAMESPACE_STIR
Declaration of class stir::Bin.
defines the stir::CartesianCoordinate3D<coordT> class
defines various classes for specifying a line in 3 dimensions
Declaration of class stir::Succeeded.
A class for storing coordinates and value of a single projection bin.
Definition Bin.h:49
A class for LORs.
Definition LORCoordinates.h:511
float get_sampling_in_m(const Bin &) const override
Get sampling distance in the m coordinate.
Definition ProjDataInfoGenericNoArcCorr.inl:81
float get_axial_sampling(int segment_num) const override
Get the axial sampling (e.g in z_direction)
Definition ProjDataInfoGenericNoArcCorr.inl:99
float get_t(const Bin &) const override
Get value of the (roughly) axial coordinate in the projection plane (in mm)
Definition ProjDataInfoGenericNoArcCorr.inl:58
float get_s(const Bin &) const override
Gets s coordinate in mm.
Definition ProjDataInfoGenericNoArcCorr.inl:122
bool axial_sampling_is_uniform() const override
Return if axial sampling makes sense.
Definition ProjDataInfoGenericNoArcCorr.inl:106
float get_sampling_in_t(const Bin &) const override
Get sampling distance in the t coordinate.
Definition ProjDataInfoGenericNoArcCorr.inl:90
float get_ring_spacing() const override
return an average ring-spacing (from Scanner)
Definition ProjDataInfoGenericNoArcCorr.inl:113
float get_tantheta(const Bin &) const override
Get tangent of the co-polar angle of the normal to the projection plane.
Definition ProjDataInfoGenericNoArcCorr.inl:72
float get_m(const Bin &) const override
Return z-coordinate of the middle of the LOR.
Definition ProjDataInfoGenericNoArcCorr.inl:50
void get_LOR(LORInAxialAndNoArcCorrSinogramCoordinates< float > &lor, const Bin &bin) const override
warning Find lor from cartesian coordinates of detector pair
Definition ProjDataInfoGeneric.cxx:94
float get_phi(const Bin &) const override
find phi from correspoding lor
Definition ProjDataInfoGenericNoArcCorr.inl:39
float get_costheta(const Bin &) const
Get cosine of the co-polar angle of the normal to the projection plane.
Definition ProjDataInfo.inl:200
const Scanner * get_scanner_ptr() const
Get scanner pointer.
Definition ProjDataInfo.inl:212
Declaration of stir::error()
Definition of stir::is_null_ptr functions.