diff --git a/Modules/IGTBase/include/mitkQuaternionAveraging.h b/Modules/IGTBase/include/mitkQuaternionAveraging.h index da8f5a4859..76edad654e 100644 --- a/Modules/IGTBase/include/mitkQuaternionAveraging.h +++ b/Modules/IGTBase/include/mitkQuaternionAveraging.h @@ -1,56 +1,56 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QUATERNIONAVERAGING_H_HEADER_INCLUDED_ #define QUATERNIONAVERAGING_H_HEADER_INCLUDED_ #include "MitkIGTBaseExports.h" #include #include #include #include #include #include namespace mitk { /**Documentation * \brief This class offers methods to average quaternions. * \ingroup IGT Base */ class MITKIGTBASE_EXPORT QuaternionAveraging : public itk::Object { public: mitkClassMacroItkParent(QuaternionAveraging, itk::Object); itkNewMacro(Self); enum Mode { SimpleMean, //simple averaging over all components of the quaternion, only valid for small differences. Slerp //more advanced algorithm for averaging (spherical linear interpolation), may also be used for huge differences }; - static mitk::Quaternion CalcAverage(const std::vector quaternions, Mode mode = SimpleMean); + static mitk::Quaternion CalcAverage(const std::vector& quaternions, Mode mode = SimpleMean); protected: QuaternionAveraging(); virtual ~QuaternionAveraging(); }; } // Ende Namespace #endif diff --git a/Modules/IGTBase/src/mitkQuaternionAveraging.cpp b/Modules/IGTBase/src/mitkQuaternionAveraging.cpp index 275920a45e..5f573aef27 100644 --- a/Modules/IGTBase/src/mitkQuaternionAveraging.cpp +++ b/Modules/IGTBase/src/mitkQuaternionAveraging.cpp @@ -1,69 +1,69 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkQuaternionAveraging.h" //#include "bussvrmath/Quaternion.h" //#include "SphereMean.h" mitk::QuaternionAveraging::QuaternionAveraging() { } mitk::QuaternionAveraging::~QuaternionAveraging() { } -mitk::Quaternion mitk::QuaternionAveraging::CalcAverage(const std::vector quaternions, Mode mode) +mitk::Quaternion mitk::QuaternionAveraging::CalcAverage(const std::vector& quaternions, Mode mode) { mitk::Quaternion result; switch (mode) { case SimpleMean: for (int i=0; i