STIR  6.2.0
transform_3d_object.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2003- 2011, Hammersmith Imanet Ltd
5  For internal GE use only
6 */
7 #ifndef __stir_motion_transformed_3d_object_H__
8 #define __stir_motion_transformed_3d_object_H__
9 
20 #include "stir/common.h"
21 
22 // for caching functions
23 #include <utility>
24 #include "stir/Array.h"
25 #include "stir/assign.h"
26 #include "stir/BasicCoordinate.h"
27 
28 START_NAMESPACE_STIR
29 
30 class RigidObject3DTransformation;
31 template <int num_dimensions, class elemT>
32 class ObjectTransformation;
33 
34 template <int num_dimensions, typename elemT>
35 class DiscretisedDensity;
36 class ProjData;
37 class Succeeded;
38 
40 
49 template <class ObjectTransformationT, class PushInterpolatorT>
50 inline Succeeded transform_3d_object_push_interpolation(DiscretisedDensity<3, float>& out_density,
51  const DiscretisedDensity<3, float>& in_density,
52  const ObjectTransformationT& transformation_in_to_out,
53  const PushInterpolatorT& interpolator,
54  const bool do_jacobian);
55 
57 
66 template <class ObjectTransformationT, class PullInterpolatorT>
67 inline Succeeded transform_3d_object_pull_interpolation(DiscretisedDensity<3, float>& out_density,
68  const DiscretisedDensity<3, float>& in_density,
69  const ObjectTransformationT& transformation_out_to_in,
70  const PullInterpolatorT& interpolator,
71  const bool do_jacobian);
72 
74 
80 Succeeded transform_3d_object(DiscretisedDensity<3, float>& out_density,
81  const DiscretisedDensity<3, float>& in_density,
82  const RigidObject3DTransformation& transformation_in_to_out);
83 // const ObjectTransformation<3,float>& transformation_in_to_out);
84 
85 // ugly functions for storing transformed points.
86 // TODO clean up at some point
87 
88 Array<3, BasicCoordinate<3, float>>
89 find_grid_coords_of_transformed_centres(const DiscretisedDensity<3, float>& source_density,
90  const DiscretisedDensity<3, float>& target_density,
91  const ObjectTransformation<3, float>& transformation_source_to_target);
92 
93 // TODO need this for now to get Array<std::pair<>> to work
94 template <class T2>
95 inline void
96 assign(std::pair<BasicCoordinate<3, float>, float>& x, T2 y)
97 {
98  BasicCoordinate<3, float> tmp;
99  assign(tmp, y);
100  x = std::make_pair(tmp, float(y));
101 }
102 
103 Array<3, std::pair<BasicCoordinate<3, float>, float>>
104 find_grid_coords_of_transformed_centres_and_jacobian(const DiscretisedDensity<3, float>& source_density,
105  const DiscretisedDensity<3, float>& target_density,
106  const ObjectTransformation<3, float>& transformation_source_to_target);
107 
109 
114 Succeeded transform_3d_object(ProjData& out_proj_data,
115  const ProjData& in_proj_data,
116  const RigidObject3DTransformation& object_transformation);
117 
119 
124 Succeeded transpose_of_transform_3d_object(DiscretisedDensity<3, float>& out_density,
125  const DiscretisedDensity<3, float>& in_density,
126  const RigidObject3DTransformation& transformation_in_to_out);
127 // const ObjectTransformation<3,float>& transformation_in_to_out);
128 
130 
133 Succeeded transform_3d_object(ProjData& out_proj_data,
134  const ProjData& in_proj_data,
135  const RigidObject3DTransformation& rigid_object_transformation,
136  const int min_in_segment_num_to_process,
137  const int max_in_segment_num_to_process);
138 
139 END_NAMESPACE_STIR
140 
142 
143 #endif
Succeeded transform_3d_object_push_interpolation(DiscretisedDensity< 3, float > &out_density, const DiscretisedDensity< 3, float > &in_density, const ObjectTransformationT &transformation_in_to_out, const PushInterpolatorT &interpolator, const bool do_jacobian)
transform image data
Definition: transform_3d_object.inl:23
Functions to re-interpolate an image.
defines the stir::assign function to assign values to different data types
defines the Array class for multi-dimensional (numeric) arrays
This file declares class stir::BasicCoordinate and some functions acting on stir::BasicCoordinate obj...
Succeeded transform_3d_object(DiscretisedDensity< 3, float > &out_density, const DiscretisedDensity< 3, float > &in_density, const RigidObject3DTransformation &transformation_in_to_out)
transform image data
Definition: transform_3d_object.cxx:39
Succeeded transpose_of_transform_3d_object(DiscretisedDensity< 3, float > &out_density, const DiscretisedDensity< 3, float > &in_density, const RigidObject3DTransformation &transformation_in_to_out)
transform image data using transposed matrix
Definition: transform_3d_object.cxx:51
basic configuration include file
Succeeded transform_3d_object_pull_interpolation(DiscretisedDensity< 3, float > &out_density, const DiscretisedDensity< 3, float > &in_density, const ObjectTransformationT &transformation_out_to_in, const PullInterpolatorT &interpolator, const bool do_jacobian)
transform image data
Definition: transform_3d_object.inl:52