NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cxFrame3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXFRAME3D_H_
13 #define CXFRAME3D_H_
14 
15 #include "cxResourceExport.h"
16 #include "cxPrecompiledHeader.h"
17 
18 #include "cxTransform3D.h"
19 
20 // --------------------------------------------------------
21 namespace cx
22 {
23 
40 class cxResource_EXPORT DecomposedTransform3D
41 {
42 public:
45  void reset(Transform3D m);
46  void setAngles(Vector3D xyz);
47  void setPosition(Vector3D pos);
48  Vector3D getAngles() const;
49  Vector3D getPosition() const;
50  Transform3D getMatrix() const;
51 private:
52  Vector3D mAngle;
53  Vector3D mPos;
54  Transform3D m_R;
55 };
56 
69 class cxResource_EXPORT Frame3D
70 {
71 public:
72  static Frame3D create(const Transform3D& transform);
73  Transform3D transform() const;
74  Vector3D rotationAxis() const;
75  void setRotationAxis(const Vector3D& k);
76  void put(std::ostream& s) const;
77  void test();
78 
79  boost::array<double, 6> getCompactAxisAngleRep() const;
80  static Frame3D fromCompactAxisAngleRep(const boost::array<double, 6>& rep);
81 
82  Vector3D getEulerXYZ() const;
83  void setEulerXYZ(const Vector3D& xyz);
84 
85  Frame3D();
86  virtual ~Frame3D();
87 
88  Eigen::AngleAxisd mAngleAxis;
90 
91 private:
92 };
93 
94 cxResource_EXPORT std::ostream& operator<<(std::ostream& s, const Frame3D& t);
95 
100 } // namespace cx
101 // --------------------------------------------------------
102 
103 #endif /*CXFRAME3D_H_*/
cx::Frame3D
Defines an axis-angle representation of a position+orientation in 3D space.
Definition: cxFrame3D.h:69
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxPrecompiledHeader.h
cx::Frame3D::mPos
Vector3D mPos
position
Definition: cxFrame3D.h:89
cx_transform3D_internal::put
std::ostream & put(const Eigen::Affine3d *self, std::ostream &s, int indent, char newline)
Definition: cxTransform3D.cpp:87
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::Frame3D::mAngleAxis
Eigen::AngleAxisd mAngleAxis
angle-axis representation of rotation
Definition: cxFrame3D.h:88
cx::DecomposedTransform3D
Helper class for visualizing rotational angles to a human user.
Definition: cxFrame3D.h:40
cx::operator<<
std::ostream & operator<<(std::ostream &s, const IntBoundingBox3D &data)
Definition: cxBoundingBox3D.cpp:125
cx::transform
DoubleBoundingBox3D transform(const Transform3D &m, const DoubleBoundingBox3D &bb)
Definition: cxTransform3D.cpp:150
cxTransform3D.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42