14 #ifndef __stir_VoxelsOnCartesianGrid_H__ 15 #define __stir_VoxelsOnCartesianGrid_H__ 34 template <
typename elemT>
35 class PixelsOnCartesianGrid;
44 template <
class elemT>
45 class VoxelsOnCartesianGrid :
public DiscretisedDensityOnCartesianGrid<3, elemT>
50 static VoxelsOnCartesianGrid ask_parameters();
55 VoxelsOnCartesianGrid();
58 VoxelsOnCartesianGrid(
const Array<3, elemT>& v,
59 const CartesianCoordinate3D<float>& origin,
60 const BasicCoordinate<3, float>& grid_spacing);
64 VoxelsOnCartesianGrid(
const IndexRange<3>& range,
65 const CartesianCoordinate3D<float>& origin,
66 const BasicCoordinate<3, float>& grid_spacing);
69 VoxelsOnCartesianGrid(
const shared_ptr<const ExamInfo>& exam_info_sptr,
70 const Array<3, elemT>& v,
71 const CartesianCoordinate3D<float>& origin,
72 const BasicCoordinate<3, float>& grid_spacing);
76 VoxelsOnCartesianGrid(
const shared_ptr<const ExamInfo>& exam_info_sptr,
77 const IndexRange<3>& range,
78 const CartesianCoordinate3D<float>& origin,
79 const BasicCoordinate<3, float>& grid_spacing);
106 VoxelsOnCartesianGrid(
const ProjDataInfo& proj_data_info_ptr,
107 const float zoom = 1.F,
108 const CartesianCoordinate3D<float>& origin = CartesianCoordinate3D<float>(0.F, 0.F, 0.F),
109 const CartesianCoordinate3D<int>& sizes = CartesianCoordinate3D<int>(-1, -1, -1));
117 VoxelsOnCartesianGrid(
const shared_ptr<const ExamInfo>& exam_info_sptr,
118 const ProjDataInfo& proj_data_info,
119 const float zoom = 1.F,
120 const CartesianCoordinate3D<float>& origin = CartesianCoordinate3D<float>(0.F, 0.F, 0.F),
121 const CartesianCoordinate3D<int>& sizes = CartesianCoordinate3D<int>(-1, -1, -1));
129 VoxelsOnCartesianGrid(
const shared_ptr<const ExamInfo>& exam_info_sptr_v,
130 const ProjDataInfo& proj_data_info,
131 const CartesianCoordinate3D<float>& zooms,
132 const CartesianCoordinate3D<float>& origin = CartesianCoordinate3D<float>(0.F, 0.F, 0.F),
133 const CartesianCoordinate3D<int>& sizes = CartesianCoordinate3D<int>(-1, -1, -1));
136 #ifdef STIR_NO_COVARIANT_RETURN_TYPES 137 DiscretisedDensity<3, elemT>*
139 VoxelsOnCartesianGrid<elemT>*
141 get_empty_copy()
const override;
144 VoxelsOnCartesianGrid<elemT>* get_empty_voxels_on_cartesian_grid()
const;
146 #ifdef STIR_NO_COVARIANT_RETURN_TYPES 147 virtual DiscretisedDensity<3, elemT>*
149 VoxelsOnCartesianGrid<elemT>*
151 clone()
const override;
154 PixelsOnCartesianGrid<elemT> get_plane(
const int z)
const;
157 void set_plane(
const PixelsOnCartesianGrid<elemT>& plane,
const int z);
160 inline CartesianCoordinate3D<float> get_voxel_size()
const;
163 void set_voxel_size(
const BasicCoordinate<3, float>&);
166 void grow_z_range(
const int min_z,
const int max_z);
172 inline int get_x_size()
const;
174 inline int get_y_size()
const;
176 inline int get_z_size()
const;
178 inline int get_min_x()
const;
180 inline int get_min_y()
const;
182 inline int get_min_z()
const;
184 inline int get_max_x()
const;
186 inline int get_max_y()
const;
188 inline int get_max_z()
const;
190 BasicCoordinate<3, int> get_lengths()
const;
192 BasicCoordinate<3, int> get_max_indices()
const;
197 void construct_from_projdata_info(
const shared_ptr<const ExamInfo>& exam_info_sptr_v,
198 const ProjDataInfo& proj_data_info,
199 const CartesianCoordinate3D<float>& zooms,
200 const CartesianCoordinate3D<float>& origin,
201 const CartesianCoordinate3D<int>& sizes);
BasicCoordinate< num_dimensions, int > get_min_indices(const Array< num_dimensions, T > &a)
Get the first multi-dimensional index of the array.
Definition: array_index_functions.inl:100
inline implementations for the stir::VoxelsOnCartesianGrid class
defines the stir::DiscretisedDensityOnCartesianGrid class
defines the stir::CartesianCoordinate3D<coordT> class