STIR  6.2.0
DetectionPosition.h
Go to the documentation of this file.
1 //
2 //
3 /*
4  Copyright (C) 2002- 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 */
17 #ifndef __stir_DetectionPosition_H__
18 #define __stir_DetectionPosition_H__
19 
20 #include "stir/common.h"
21 #include <boost/operators.hpp>
22 
23 START_NAMESPACE_STIR
57 template <typename coordT = unsigned int>
59  : boost::partially_ordered<DetectionPosition<coordT>, // have operator>, <= etc for free
60  boost::equality_comparable<DetectionPosition<coordT>>> // have operator!= for free
61 {
62 public:
63  inline explicit DetectionPosition(const coordT tangential_coord = 0,
64  const coordT axial_coord = 0,
65  const coordT radial_coord = 0);
66 
67  inline coordT tangential_coord() const;
68  inline coordT axial_coord() const;
69  inline coordT radial_coord() const;
70  inline coordT& tangential_coord();
71  inline coordT& axial_coord();
72  inline coordT& radial_coord();
74 
75  inline bool operator==(const DetectionPosition&) const;
76  inline bool operator<(const DetectionPosition&) const;
78 private:
79  coordT tangential;
80  coordT axial;
81  coordT radial;
82 };
83 
84 END_NAMESPACE_STIR
85 
87 
88 #endif //__DetectionPosition_H__
A class for storing coordinates of a detection.
Definition: DetectionPosition.h:58
Implementation of inline methods of class stir::DetectionPosition.
basic configuration include file
Boost class to define all comparison operators given only 2 (see operators.hpp)
Definition: doxygen_doc_for_boost.h:57