STIR  6.2.0
Shape3DWithOrientation.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2000- 2007, Hammersmith Imanet Ltd
5  This file is part of STIR.
6 
7  SPDX-License-Identifier: Apache-2.0
8 
9  See STIR/LICENSE.txt for details
10 */
20 #ifndef __stir_Shape_Shape3DWithOrientation__H__
21 #define __stir_Shape_Shape3DWithOrientation__H__
22 
23 #include "stir/Shape/Shape3D.h"
25 
26 START_NAMESPACE_STIR
27 class Succeeded;
28 
59 {
60  typedef Shape3D base_type;
61 
62 public:
63  bool operator==(const Shape3DWithOrientation& s) const;
64  void scale(const CartesianCoordinate3D<float>& scale3D) override;
65 
67 
68  const Array<2, float>& get_direction_vectors() const { return _directions; }
70 
76  Succeeded set_direction_vectors(const Array<2, float>&);
77 
78 #if 0
79  // TODO non-sensical after non-uniform scale
80  float get_angle_alpha() const;
81  float get_angle_beta() const;
82  float get_angle_gamma() const;
83 #endif
84 
85 protected:
88 
89 #if 0
90  /
92  const float alpha,
93  const float beta,
94  const float gamma);
95 #endif
96  Shape3DWithOrientation(const CartesianCoordinate3D<float>& origin, const Array<2, float>& directions = diagonal_matrix(3, 1.F));
97 
98 #if 0
99  void
100  set_directions_from_Euler_angles(
101  const float alpha,
102  const float beta,
103  const float gamma);
104 #endif
105 
107 
108  float get_volume_of_unit_cell() const;
109 
111  CartesianCoordinate3D<float> transform_to_shape_coords(const CartesianCoordinate3D<float>&) const;
112 
114 
115  void set_defaults() override;
116  void initialise_keymap() override;
117  bool post_processing() override;
118  void set_key_values() override;
119 
120 private:
121 #if 0
122  // temporary variables to store values while parsing
123  float alpha_in_degrees;
124  float beta_in_degrees;
125  float gamma_in_degrees;
126 #endif
127 
128  Array<2, float> _directions;
129 };
130 
131 END_NAMESPACE_STIR
132 
133 #endif
Array< 2, elemT > diagonal_matrix(const unsigned dimension, const elemT value)
construct a diagonal matrix with all elements on the diagonal equal
Definition: MatrixFunction.inl:182
The base class for all 3 dimensional shapes.
Definition: Shape3D.h:65
const Array< 2, float > & get_direction_vectors() const
get direction vectors currently in use
Definition: Shape3DWithOrientation.h:68
Declaration of class stir::Shape3D.
Class for shapes with orientation.
Definition: Shape3DWithOrientation.h:58
Declaration of functions for matrices.
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition: Succeeded.h:43