Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkPAVector.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 #ifndef MITKSMARTVECTOR_H
14 #define MITKSMARTVECTOR_H
15 
16 #include <mitkVector.h>
17 #include <random>
18 
20 
21 //Includes for smart pointer usage
22 #include "mitkCommon.h"
23 #include "itkLightObject.h"
24 
25 namespace mitk {
26  namespace pa {
27  class MITKPHOTOACOUSTICSLIB_EXPORT Vector : public itk::LightObject
28  {
29  public:
30  mitkClassMacroItkParent(Vector, itk::LightObject);
31  itkFactorylessNewMacro(Self);
32 
37  double GetNorm();
38 
39  double GetElement(unsigned short index);
40  void SetElement(unsigned short index, double value);
41 
45  void Normalize();
46  void SetValue(Vector::Pointer value);
47 
54  void RandomizeByPercentage(double percentage, double bendingFactor, std::mt19937* rng);
55 
66  void Randomize(double xLowerLimit, double xUpperLimit, double yLowerLimit, double yUpperLimit, double zLowerLimit, double zUpperLimit, std::mt19937* rng);
67 
75  void Randomize(double xLimit, double yLimit, double zLimit, std::mt19937* rng);
76 
80  void Randomize(std::mt19937* rng);
81 
88  void Rotate(double xAngle, double yAngle);
89 
97  void Scale(double factor);
98 
104  Vector::Pointer Clone();
105 
106  void Subtract(Vector::Pointer other);
107 
108  void Add(Vector::Pointer other);
109 
110  protected:
111  Vector();
112  ~Vector() override;
113 
114  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
115 
116  private:
117  mitk::Vector3D m_Vector;
118  };
119 
129  MITKPHOTOACOUSTICSLIB_EXPORT bool Equal(const Vector::Pointer leftHandSide, const Vector::Pointer rightHandSide, double eps, bool verbose);
130  }
131 }
132 #endif // MITKSMARTVECTOR_H
DataCollection - Class to facilitate loading/accessing structured data.
MITKPHOTOACOUSTICSLIB_EXPORT bool Equal(const MonteCarloThreadHandler::Pointer leftHandSide, const MonteCarloThreadHandler::Pointer rightHandSide, double eps, bool verbose)
Equal A function comparing two thread handlers for beeing equal.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
bool verbose(false)
void Normalize(itk::Image< TPixel, VImageDimension > *itkImage, mitk::Image::Pointer im2, mitk::Image::Pointer mask1, std::string output)
Definition: CLBrainMask.cpp:36
MITKCORE_EXPORT const ScalarType eps
static mitk::PlanarFigure::Pointer Clone(mitk::PlanarFigure::Pointer original)
#define MITKPHOTOACOUSTICSLIB_EXPORT