GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmOrientation.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMORIENTATION_H
15 #define GDCMORIENTATION_H
16
17 #include "gdcmTypes.h"
18
19 namespace gdcm
20 {
21
25 class GDCM_EXPORT Orientation
26 {
27 friend std::ostream& operator<<(std::ostream &_os, const Orientation &o);
28 public:
29 Orientation();
30 ~Orientation();
31
33 void Print(std::ostream &) const;
34
35 typedef enum {
36 UNKNOWN,
37 AXIAL,
38 CORONAL,
39 SAGITTAL,
40 OBLIQUE
41 } OrientationType;
42
45 static OrientationType GetType(const double dircos[6]);
46
48 static void SetObliquityThresholdCosineValue(double val);
49 static double GetObliquityThresholdCosineValue();
50
52 static const char *GetLabel(OrientationType type);
53
54 protected:
55 static char GetMajorAxisFromPatientRelativeDirectionCosine(double x, double y, double z);
56
57 private:
58 static double ObliquityThresholdCosineValue;
59 };
60 //-----------------------------------------------------------------------------
61 inline std::ostream& operator<<(std::ostream &os, const Orientation &o)
62 {
63 o.Print( os );
64 return os;
65 }
66
67 } // end namespace gdcm
68
69 #endif //GDCMORIENTATION_H