Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkQuaternionAveraging.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef mitkQuaternionAveraging_h
15 #define mitkQuaternionAveraging_h
16 
17 #include "MitkIGTBaseExports.h"
18 #include <itkObject.h>
19 #include <itkObjectFactory.h>
20 #include <mitkCommon.h>
21 #include <mitkQuaternion.h>
22 #include <mitkVector.h>
23 #include <vector>
24 
25 
26 namespace mitk {
31  class MITKIGTBASE_EXPORT QuaternionAveraging : public itk::Object
32  {
33  public:
34 
36  itkNewMacro(Self);
37 
38  enum Mode
39  {
40  SimpleMean, //simple averaging over all components of the quaternion, only valid for small differences.
41  Slerp //more advanced algorithm for averaging (spherical linear interpolation), may also be used for huge differences
42  };
43 
44  static mitk::Quaternion CalcAverage(const std::vector<Quaternion>& quaternions, Mode mode = SimpleMean);
45 
46  protected:
48  ~QuaternionAveraging() override;
49 
50  };
51 } // Ende Namespace
52 #endif
mitk::QuaternionAveraging
This class offers methods to average quaternions.
Definition: mitkQuaternionAveraging.h:31
mitk::QuaternionAveraging::SimpleMean
@ SimpleMean
Definition: mitkQuaternionAveraging.h:40
MITKIGTBASE_EXPORT
#define MITKIGTBASE_EXPORT
Definition: MitkIGTBaseExports.h:15
mitk::QuaternionAveraging::Mode
Mode
Definition: mitkQuaternionAveraging.h:38
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
MitkIGTBaseExports.h
mitkQuaternion.h
mitkCommon.h
mitkVector.h
mitk::Quaternion
vnl_quaternion< ScalarType > Quaternion
Definition: mitkQuaternion.h:21