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
Definition direction_cosines.h:23
Direction_cosines_private * d_ptr
Definition direction_cosines.h:25
Definition direction_cosines.h:19
Definition direction_cosines.h:19
#define PLMBASE_API
Definition plmbase_config.h:19