STIR 6.4.0
VoxelsOnCartesianGrid.inl
Go to the documentation of this file.
1//
2//
3/*
4 Copyright (C) 2000 PARAPET partners
5 Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
6 This file is part of STIR.
7
8 SPDX-License-Identifier: Apache-2.0 AND License-ref-PARAPET-license
9
10 See STIR/LICENSE.txt for details
11*/
23START_NAMESPACE_STIR
24
25template <class elemT>
26CartesianCoordinate3D<float>
31
32template <typename elemT>
33int
34VoxelsOnCartesianGrid<elemT>::get_min_z() const
35{
36 return this->get_min_index();
37}
38
39template <typename elemT>
40int
41VoxelsOnCartesianGrid<elemT>::get_min_y() const
42{
43 return this->get_length() == 0 ? 0 : (*this)[get_min_z()].get_min_index();
44}
45
46template <typename elemT>
47int
48VoxelsOnCartesianGrid<elemT>::get_min_x() const
49{
50 return this->get_length() == 0 ? 0 : (*this)[get_min_z()][get_min_y()].get_min_index();
51}
52
53template <typename elemT>
54int
56{
57 return this->get_length() == 0 ? 0 : (*this)[get_min_z()][get_min_y()].get_length();
58}
59
60template <typename elemT>
61int
62VoxelsOnCartesianGrid<elemT>::get_y_size() const
63{
64 return this->get_length() == 0 ? 0 : (*this)[get_min_z()].get_length();
65}
66
67template <typename elemT>
68int
69VoxelsOnCartesianGrid<elemT>::get_z_size() const
70{
71 return this->get_length();
72}
73
74template <typename elemT>
75int
76VoxelsOnCartesianGrid<elemT>::get_max_x() const
77{
78 return this->get_length() == 0 ? 0 : (*this)[get_min_z()][get_min_y()].get_max_index();
79}
80
81template <typename elemT>
82int
83VoxelsOnCartesianGrid<elemT>::get_max_y() const
84{
85 return this->get_length() == 0 ? 0 : (*this)[get_min_z()].get_max_index();
86}
87
88template <typename elemT>
89int
90VoxelsOnCartesianGrid<elemT>::get_max_z() const
91{
92 return this->get_max_index();
93}
94
95END_NAMESPACE_STIR
a templated class for 3-dimensional coordinates.
Definition CartesianCoordinate3D.h:53
const BasicCoordinate< num_dimensions, float > & get_grid_spacing() const
int get_length() const
return number of elements in this vector
Definition VectorWithOffset.inl:538
int get_x_size() const
Definition VoxelsOnCartesianGrid.inl:55
CartesianCoordinate3D< float > get_voxel_size() const
is the same as get_grid_spacing(), but now returns CartesianCoordinate3D for convenience
Definition VoxelsOnCartesianGrid.inl:27