STIR 6.4.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*/
19
20#ifndef __stir_Shape_Shape3DWithOrientation__H__
21#define __stir_Shape_Shape3DWithOrientation__H__
22
23#include "stir/Shape/Shape3D.h"
25
26START_NAMESPACE_STIR
27class Succeeded;
28
57
58class Shape3DWithOrientation : public Shape3D
59{
60 typedef Shape3D base_type;
61
62public:
63 bool operator==(const Shape3D& s) const override;
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
85protected:
88
89#if 0
90 /
92 const float alpha,
93 const float beta,
94 const float gamma);
95#endif
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
120private:
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
131END_NAMESPACE_STIR
132
133#endif
Declaration of functions for matrices.
Declaration of class stir::Shape3D.
This class defines multi-dimensional (numeric) arrays.
Definition Array.h:78
a templated class for 3-dimensional coordinates.
Definition CartesianCoordinate3D.h:53
Class for shapes with orientation.
Definition Shape3DWithOrientation.h:59
const Array< 2, float > & get_direction_vectors() const
get direction vectors currently in use
Definition Shape3DWithOrientation.h:68
Shape3DWithOrientation()
default constructor (NO initialisation of values)
Definition Shape3DWithOrientation.cxx:65
bool operator==(const Shape3D &s) const override
Compare shapes.
Definition Shape3DWithOrientation.cxx:95
void scale(const CartesianCoordinate3D< float > &scale3D) override
scale the whole shape
Definition Shape3DWithOrientation.cxx:119
a class containing an enumeration type that can be used by functions to signal successful operation o...
Definition Succeeded.h:44
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