GDCM: gdcmDirectionCosines.h Source File

GDCM 3.2.10

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
19namespace gdcm
20{
21
25 class GDCM_EXPORT DirectionCosines
26{
27public:
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 static double Distance(const double x[3], const double y[3]);
48
50 void Normalize();
51
53 static void Normalize(double v[3]);
54
56 static double Norm(const double v[3]);
57
59 operator const double* () const { return Values; }
60
62 bool IsValid() const;
63
66 bool SetFromString(const char *str);
67
69 double CrossDot(DirectionCosines const &dc) const;
70
72 double ComputeDistAlongNormal(const double ipp[3]) const;
73
74private:
75 double Values[6];
76};
77
78} // end namespace gdcm
79
80#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::Distance
static double Distance(const double x[3], const double y[3])
Compute Distance.
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