Medical Imaging Interaction Toolkit  2018.4.99-c0f884b2
Medical Imaging Interaction Toolkit
mitk::pa::Vector Class Reference

#include <mitkPAVector.h>

Inheritance diagram for mitk::pa::Vector:
Collaboration diagram for mitk::pa::Vector:

Public Member Functions

 mitkClassMacroItkParent (Vector, itk::LightObject)
 
double GetNorm ()
 GetNorm calculates the length of this vector. More...
 
double GetElement (unsigned short index)
 
void SetElement (unsigned short index, double value)
 
void Normalize ()
 Normalize normalizes this vector. After calling this GetNorm() will return 1. More...
 
void SetValue (Vector::Pointer value)
 
void RandomizeByPercentage (double percentage, double bendingFactor, std::mt19937 *rng)
 RandomizeByPercentage alters this vector randomly by [-percentage, percentage] of the bendingFactor. More...
 
void Randomize (double xLowerLimit, double xUpperLimit, double yLowerLimit, double yUpperLimit, double zLowerLimit, double zUpperLimit, std::mt19937 *rng)
 Randomize randomizes this vector to be [lowerLimit, upperLimit] in each element. More...
 
void Randomize (double xLimit, double yLimit, double zLimit, std::mt19937 *rng)
 Randomize randomizes this vector to be [0, limit] in each element. More...
 
void Randomize (std::mt19937 *rng)
 Randomize randomizes this vector to be [-1, 1] in each element. More...
 
void Rotate (double xAngle, double yAngle)
 Rotate rotates this Vector around the x, y and z axis with the given angles in radians. More...
 
void Scale (double factor)
 Scale scales this Vector with the given factor. More...
 
Vector::Pointer Clone ()
 Clone create a deep copy of this vector. More...
 
void Subtract (Vector::Pointer other)
 
void Add (Vector::Pointer other)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 Vector ()
 
 ~Vector () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Detailed Description

Definition at line 27 of file mitkPAVector.h.

Constructor & Destructor Documentation

◆ Vector()

mitk::pa::Vector::Vector ( )
protected

Definition at line 16 of file mitkPAVector.cpp.

◆ ~Vector()

mitk::pa::Vector::~Vector ( )
overrideprotected

Definition at line 21 of file mitkPAVector.cpp.

Member Function Documentation

◆ Add()

void mitk::pa::Vector::Add ( Vector::Pointer  other)

Definition at line 142 of file mitkPAVector.cpp.

◆ Clone()

mitk::pa::Vector::Pointer mitk::pa::Vector::Clone ( )

Clone create a deep copy of this vector.

Returns
a new vector with the same values.

Definition at line 126 of file mitkPAVector.cpp.

References GetElement(), and New().

◆ GetElement()

double mitk::pa::Vector::GetElement ( unsigned short  index)

Definition at line 31 of file mitkPAVector.cpp.

Referenced by Clone(), and Rotate().

◆ GetNorm()

double mitk::pa::Vector::GetNorm ( )

GetNorm calculates the length of this vector.

Returns
the euclidean norm

Definition at line 26 of file mitkPAVector.cpp.

◆ mitkClassMacroItkParent()

mitk::pa::Vector::mitkClassMacroItkParent ( Vector  ,
itk::LightObject   
)

◆ New()

◆ Normalize()

void mitk::pa::Vector::Normalize ( )

Normalize normalizes this vector. After calling this GetNorm() will return 1.

Definition at line 41 of file mitkPAVector.cpp.

◆ PrintSelf()

void mitk::pa::Vector::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Definition at line 84 of file mitkPAVector.cpp.

◆ Randomize() [1/3]

void mitk::pa::Vector::Randomize ( double  xLowerLimit,
double  xUpperLimit,
double  yLowerLimit,
double  yUpperLimit,
double  zLowerLimit,
double  zUpperLimit,
std::mt19937 *  rng 
)

Randomize randomizes this vector to be [lowerLimit, upperLimit] in each element.

Parameters
xLowerLimit
xUpperLimit
yLowerLimit
yUpperLimit
zLowerLimit
zUpperLimit

Definition at line 64 of file mitkPAVector.cpp.

Referenced by Randomize().

◆ Randomize() [2/3]

void mitk::pa::Vector::Randomize ( double  xLimit,
double  yLimit,
double  zLimit,
std::mt19937 *  rng 
)

Randomize randomizes this vector to be [0, limit] in each element.

Parameters
xLimit
yLimit
zLimit

Definition at line 74 of file mitkPAVector.cpp.

References Randomize().

◆ Randomize() [3/3]

void mitk::pa::Vector::Randomize ( std::mt19937 *  rng)

Randomize randomizes this vector to be [-1, 1] in each element.

Definition at line 79 of file mitkPAVector.cpp.

References Randomize().

◆ RandomizeByPercentage()

void mitk::pa::Vector::RandomizeByPercentage ( double  percentage,
double  bendingFactor,
std::mt19937 *  rng 
)

RandomizeByPercentage alters this vector randomly by [-percentage, percentage] of the bendingFactor.

Parameters
percentage
bendingFactor

Definition at line 56 of file mitkPAVector.cpp.

◆ Rotate()

void mitk::pa::Vector::Rotate ( double  xAngle,
double  yAngle 
)

Rotate rotates this Vector around the x, y and z axis with the given angles in radians.

Parameters
thetaChangerotation of the inclination angle in radians
phiChangerotation of the azimuthal angle in radians

Definition at line 92 of file mitkPAVector.cpp.

References GetElement(), MITK_DEBUG, and SetElement().

◆ Scale()

void mitk::pa::Vector::Scale ( double  factor)

Scale scales this Vector with the given factor.

Parameters
factorthe scaling factor

If a negative number is provided, the direction of the vector will be inverted.

Definition at line 119 of file mitkPAVector.cpp.

◆ SetElement()

void mitk::pa::Vector::SetElement ( unsigned short  index,
double  value 
)

Definition at line 36 of file mitkPAVector.cpp.

Referenced by Rotate().

◆ SetValue()

void mitk::pa::Vector::SetValue ( Vector::Pointer  value)

Definition at line 49 of file mitkPAVector.cpp.

◆ Subtract()

void mitk::pa::Vector::Subtract ( Vector::Pointer  other)

Definition at line 135 of file mitkPAVector.cpp.


The documentation for this class was generated from the following files: