GDCM 3.2.1

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() = default;
33
35 void Print(std::ostream &) const;
36
38 void Cross(double z[3]) const;
39
41 double Dot() const;
42
44 static double Dot(const double x[3], const double y[3]);
45
47 void Normalize();
48
50 static void Normalize(double v[3]);
51
53 static double Norm(const double v[3]);
54
56 operator const double* () const { return Values; }
57
59 bool IsValid() const;
60
63 bool SetFromString(const char *str);
64
66 double CrossDot(DirectionCosines const &dc) const;
67
69 double ComputeDistAlongNormal(const double ipp[3]) const;
70
71 private:
72 double Values[6];
73};
74
75} // end namespace gdcm
76
77#endif //GDCMDIRECTIONCOSINES_H
gdcm::DirectionCosines::ComputeDistAlongNormal
double ComputeDistAlongNormal(const double ipp[3]) const
Compute the distance along the normal.
gdcm::DirectionCosines::IsValid
bool IsValid() const
Return whether or not this is a valid direction cosines.
gdcm::DirectionCosines::Dot
static double Dot(const double x[3], const double y[3])
Compute Dot.
gdcm::DirectionCosines::Norm
static double Norm(const double v[3])
Return norm of the vector.
gdcm::DirectionCosines::Normalize
static void Normalize(double v[3])
Normalize in-place.
gdcm::DirectionCosines::DirectionCosines
DirectionCosines()
gdcm::DirectionCosines::Cross
void Cross(double z[3]) const
Compute Cross product.
gdcm::DirectionCosines::Normalize
void Normalize()
Normalize in-place.
gdcm::DirectionCosines::CrossDot
double CrossDot(DirectionCosines const &dc) const
Compute the Dot product of the two cross vector of both DirectionCosines object.
gdcm::DirectionCosines::Dot
double Dot() const
Compute Dot.
gdcm::DirectionCosines::SetFromString
bool SetFromString(const char *str)
gdcm::DirectionCosines::~DirectionCosines
~DirectionCosines()=default
gdcm::DirectionCosines::DirectionCosines
DirectionCosines(const double dircos[6])
gdcm::DirectionCosines::Print
void Print(std::ostream &) const
Print.
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21