GDCM 2.2.1

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

- File List
- File Members

gdcmDirectionCosines.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 GDCMDIRECTIONCOSINES_H
15 #define GDCMDIRECTIONCOSINES_H
16
17 #include "gdcmTypes.h"
18
19 namespace gdcm
20 {
21
25 class GDCM_EXPORT DirectionCosines
26 {
27 public:
28 DirectionCosines();
29 DirectionCosines(const double dircos[6]);
30 // Cannot get the following signature to be wrapped with swig...
31 //DirectionCosines(const double *dircos = 0 );
32 ~DirectionCosines();
33
35 void Print(std::ostream &) const;
36
38 void Cross(double z[3]) const;
39
41 double Dot() const;
42
44 void Normalize();
45
47 operator const double* () const { return Values; }
48
50 bool IsValid() const;
51
54 bool SetFromString(const char *str);
55
57 double CrossDot(DirectionCosines const &dc) const;
58
60 double ComputeDistAlongNormal(const double ipp[3]) const;
61
62 private:
63 double Values[6];
64 };
65
66 } // end namespace gdcm
67
68 #endif //GDCMDIRECTIONCOSINES_H