STIR  6.2.0
PatientPosition.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2004 - 2007-10-08, Hammersmith Imanet Ltd
3  Copyright (C) 2013, University College London
4  This file is part of STIR.
5 
6  SPDX-License-Identifier: Apache-2.0
7 
8  See STIR/LICENSE.txt for details
9 */
19 #ifndef __stir_PatientPosition_H__
20 #define __stir_PatientPosition_H__
21 
22 #include "stir/common.h"
23 
24 START_NAMESPACE_STIR
29 {
30 public:
33  {
34  head_in,
35  feet_in,
36  other_orientation,
37  unknown_orientation
38  };
40 
42  {
43  supine,
44  prone,
45  right,
46  left,
47  other_rotation,
48  unknown_rotation
49  };
50 
52 
54  {
55  HFS,
56  HFP,
57  HFDR,
58  HFDL,
59  FFS,
60  FFP,
61  FFDR,
62  FFDL,
63  unknown_position
64  };
65 
68  : orientation(unknown_orientation),
69  rotation(unknown_rotation)
70  {
71  assert(rotation >= 0);
72  assert(rotation <= unknown_rotation);
73  assert(orientation >= 0);
74  assert(orientation <= unknown_orientation);
75  }
76 
77  PatientPosition(OrientationValue orientation, RotationValue rotation)
78  : orientation(orientation),
79  rotation(rotation)
80  {
81  assert(rotation >= 0);
82  assert(rotation <= unknown_rotation);
83  assert(orientation >= 0);
84  assert(orientation <= unknown_orientation);
85  }
86 
87  explicit PatientPosition(PositionValue position);
88 
89  bool operator==(const PatientPosition& p1) const
90  {
91  return this->get_orientation() == p1.get_orientation() && this->get_position() == p1.get_position()
92  && this->get_position_as_string() == p1.get_position_as_string() && this->get_rotation() == p1.get_rotation();
93  }
94 
95  void set_rotation(const RotationValue rotation_v)
96  {
97  assert(rotation_v >= 0);
98  assert(rotation_v <= unknown_rotation);
99  rotation = rotation_v;
100  }
101  RotationValue get_rotation() const { return rotation; }
102 
103  void set_orientation(const OrientationValue orientation_v)
104  {
105  assert(orientation_v >= 0);
106  assert(orientation_v <= unknown_orientation);
107  orientation = orientation_v;
108  }
109  OrientationValue get_orientation() const { return orientation; }
110 
111  PositionValue get_position() const;
112 
113  const char* const get_position_as_string() const;
114 
115 private:
116  OrientationValue orientation;
117  RotationValue rotation;
118 };
119 
120 END_NAMESPACE_STIR
121 #endif
Definition: PatientPosition.h:28
Feet First-Decubitus Right.
Definition: PatientPosition.h:61
Feet First-Prone.
Definition: PatientPosition.h:60
Head First-Prone.
Definition: PatientPosition.h:56
Feet First-Supine.
Definition: PatientPosition.h:59
Feet First-Decubitus Left.
Definition: PatientPosition.h:62
Head First-Supine.
Definition: PatientPosition.h:55
Head First-Decubitus Right.
Definition: PatientPosition.h:57
RotationValue
enum specifying on what side the patient is lying on
Definition: PatientPosition.h:41
PatientPosition()
Default constructor (setting to unknown position and orientation)
Definition: PatientPosition.h:67
Head First-Decubitus Left.
Definition: PatientPosition.h:58
basic configuration include file
OrientationValue
enum specifying if the patient is scanned with the head first in the gantry, or the feet...
Definition: PatientPosition.h:32
PositionValue
enum using DICOM abreviations
Definition: PatientPosition.h:53