plastimatch
Loading...
Searching...
No Matches
direction_cosines.h
Go to the documentation of this file.
1/* -----------------------------------------------------------------------
2 See COPYRIGHT.TXT and LICENSE.TXT for copyright and license information
3 ----------------------------------------------------------------------- */
4#ifndef _direction_cosines_h_
5#define _direction_cosines_h_
6
7#include "plmbase_config.h"
8#include <string>
9#include <stdio.h>
10
11#ifndef PLM_CUDA_COMPILE
12#include "itk_direction_type.h"
13#endif
14#include "plm_math.h"
15
16#define DIRECTION_COSINES_IDENTITY_THRESH 1e-9
17#define DIRECTION_COSINES_EQUALITY_THRESH 1e-9
18
19namespace itk { template<class T, unsigned int NRows, unsigned int NColumns> class Matrix; }
20
21class Direction_cosines_private;
22
24public:
25 Direction_cosines_private *d_ptr;
26
27public:
29 Direction_cosines (const float *dm);
30#ifndef PLM_CUDA_COMPILE
31 Direction_cosines (const DirectionType& itk_dc);
32#endif
34
35public:
36 operator const float* () const;
37 operator float* ();
38 bool operator==(const Direction_cosines& dc) const;
39public:
40 void set_identity ();
41
42 /* Presets */
43 void set_rotated_1 ();
44 void set_rotated_2 ();
45 void set_rotated_3 ();
46 void set_skewed ();
47
48 const float* get_matrix() const;
49 float* get_matrix ();
50 const float* get_inverse () const;
51 void set (const float dc[]);
52#ifndef PLM_CUDA_COMPILE
53 void set (const DirectionType& itk_dc);
54#endif
55 bool set_from_string (std::string& str);
56 bool is_identity ();
57 std::string get_string () const;
58protected:
59 void solve_inverse ();
60private:
62 void operator= (const Direction_cosines&);
63};
64
65#endif
const float * get_matrix() const
Definition direction_cosines.cxx:188
void set_rotated_1()
Definition direction_cosines.cxx:81
Direction_cosines()
Definition direction_cosines.cxx:21
bool operator==(const Direction_cosines &dc) const
Definition direction_cosines.cxx:55
void set_rotated_3()
Definition direction_cosines.cxx:107
void set_rotated_2()
Definition direction_cosines.cxx:94
bool is_identity()
Definition direction_cosines.cxx:243
void set_identity()
Definition direction_cosines.cxx:68
std::string get_string() const
Definition direction_cosines.cxx:256
void set(const float dc[])
Definition direction_cosines.cxx:168
void set_skewed()
Definition direction_cosines.cxx:120
bool set_from_string(std::string &str)
Definition direction_cosines.cxx:205
Direction_cosines_private * d_ptr
Definition direction_cosines.h:25
const float * get_inverse() const
Definition direction_cosines.cxx:200
void solve_inverse()
Definition direction_cosines.cxx:161
Definition direction_cosines.h:19
itk::Matrix< double, 3, 3 > DirectionType
Definition itk_direction_type.h:9
Definition direction_cosines.h:19
#define PLMBASE_API
Definition plmbase_config.h:19