MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkQuaternionAveraging.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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
26namespace mitk {
31 class MITKIGTBASE_EXPORT QuaternionAveraging : public itk::Object
32 {
33 public:
34
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
This class offers methods to average quaternions.
mitkClassMacroItkParent(QuaternionAveraging, itk::Object)
IGT Exceptions.