STIR  6.2.0
Transform3DObjectImageProcessor.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2005- 2012, Hammersmith Imanet Ltd
5 */
16 #ifndef __stir_motion_Transform3DObjectImageProcessor_H__
17 #define __stir_motion_Transform3DObjectImageProcessor_H__
18 
20 #include "stir/DataProcessor.h"
21 #include "stir/shared_ptr.h"
23 // next is currently needed to get Array<pair<>> to compile (definition of assign() in there)
25 
26 START_NAMESPACE_STIR
27 
28 // TODO!! remove define
29 
30 #define num_dimensions 3
31 
38 template <typename elemT>
39 class Transform3DObjectImageProcessor : public RegisteredParsingObject<Transform3DObjectImageProcessor<elemT>,
40  DataProcessor<DiscretisedDensity<3, elemT>>,
41  DataProcessor<DiscretisedDensity<3, elemT>>>
42 {
44 
45 public:
46  static const char* const registered_name;
47 
49  // Transform3DObjectImageProcessor();
52  const shared_ptr<ObjectTransformation<3, elemT>> = shared_ptr<ObjectTransformation<3, elemT>>());
53 
54  bool get_do_transpose() const;
55  void set_do_transpose(const bool);
56  bool get_do_jacobian() const;
57  void set_do_jacobian(const bool);
58  bool get_do_cache() const;
59  void set_do_cache(const bool);
60 
61 private:
62  // motion
63  shared_ptr<ObjectTransformation<3, elemT>> transformation_sptr;
64  bool _do_transpose;
65  bool _do_jacobian;
66  bool _cache_transformed_coords;
67 
68  Array<3, BasicCoordinate<3, elemT>> _transformed_coords;
69  Array<3, std::pair<BasicCoordinate<3, elemT>, elemT>> _transformed_coords_and_jacobian;
70 
71  virtual void set_defaults();
72  virtual void initialise_keymap();
73  virtual bool post_processing();
74 
75  Succeeded virtual_set_up(const DiscretisedDensity<num_dimensions, elemT>& image);
76  void virtual_apply(DiscretisedDensity<num_dimensions, elemT>& out_density,
77  const DiscretisedDensity<num_dimensions, elemT>& in_density) const;
78  void virtual_apply(DiscretisedDensity<num_dimensions, elemT>& density) const;
79 };
80 
81 #undef num_dimensions
82 
83 END_NAMESPACE_STIR
84 
85 #endif
Declaration of functions to re-interpolate an image or projection data to a new coordinate system...
Declaration of class stir::DataProcessor.
Declaration of class stir::ObjectTransformation.
Import of std::shared_ptr, std::dynamic_pointer_cast and std::static_pointer_cast (or corresponding b...
Base class that defines an interface for classes that do data processing.
Definition: DataProcessor.h:46
A class in the ImageProcessor hierarchy that performs movement by reinterpolation.
Definition: Transform3DObjectImageProcessor.h:39
Base-class for performing (potentially non-rigid) object transformations.
Definition: ObjectTransformation.h:29
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
This class defines multi-dimensional (numeric) arrays.
Definition: Array.h:73
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43
Declaration of class stir::RegisteredParsingObject.
This abstract class is the basis for all image representations.
Definition: FBP2DReconstruction.h:35