STIR  6.2.0
Box3D.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2005- 2008, 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_Box3D_h__
21 #define __stir_Shape_Box3D_h__
22 
25 
26 START_NAMESPACE_STIR
27 
49 class Box3D : public RegisteredParsingObject<Box3D, Shape3D, Shape3DWithOrientation>
50 {
51 public:
53  static const char* const registered_name;
54 
55  Box3D();
56 #if 0
57  Box3D( const float length_x,
58  const float length_y,
59  const float length_z,
60  const CartesianCoordinate3D<float>& centre,
61  const float alpha,
62  const float beta,
63  const float gamma);
64 #endif
65 
66  Box3D(const float length_x,
67  const float length_y,
68  const float length_z,
69  const CartesianCoordinate3D<float>& centre,
70  const Array<2, float>& direction_vectors = diagonal_matrix(3, 1.F));
71 
72  float get_geometric_volume() const override;
73  // float get_geometric_area() const;
74 
75  bool is_inside_shape(const CartesianCoordinate3D<float>& coord) const override;
76 
77  Shape3D* clone() const override;
78 
80 
81  bool operator==(const Box3D&) const;
82 
83  bool operator==(const Shape3D& shape) const override;
84 
85 protected:
87  float length_x;
89  float length_y;
91  float length_z;
92 
93 private:
94  void set_defaults() override;
95  void initialise_keymap() override;
96  bool post_processing() override;
97 };
98 
99 END_NAMESPACE_STIR
100 
101 #endif
Declaration of class stir::Shape3DWithOrientation.
static const char *const registered_name
Name which will be used when parsing a Shape3D object.
Definition: Box3D.h:53
float length_y
Length in y-direction if the shape is not rotated.
Definition: Box3D.h:89
float length_x
Length in x-direction if the shape is not rotated.
Definition: Box3D.h:87
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
float length_z
Length in z-direction if the shape is not rotated.
Definition: Box3D.h:91
Parent class for all leaves in a RegisteredObject hierarchy that do parsing of parameter files...
Definition: RegisteredParsingObject.h:77
Three-dimensional cuboid box.
Definition: Box3D.h:49
Declaration of class stir::RegisteredParsingObject.