20 #include <itkFixedArray.h>
42 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
43 void FillArray(itk::FixedArray<TCoordRep, NVectorDimension> &toArray,
const ArrayType &array)
45 itk::FixedArray<TCoordRep, NVectorDimension> vectorOrPoint;
46 for (
unsigned short int var = 0; var < NVectorDimension; ++var)
48 toArray[var] = array[var];
60 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
61 itk::FixedArray<TCoordRep, NVectorDimension>
FillArray(
const ArrayType &array)
63 itk::FixedArray<TCoordRep, NVectorDimension> vectorOrPoint;
79 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
80 void ToArray(ArrayType &array,
const itk::FixedArray<TCoordRep, NVectorDimension> &vectorOrPoint)
82 for (
unsigned short int var = 0; var < NVectorDimension; ++var)
84 array[var] = vectorOrPoint[var];
97 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
98 ArrayType
ToArray(
const itk::FixedArray<TCoordRep, NVectorDimension> &vectorOrPoint)
109 template <
class Tout>
117 template <
class Tout>
131 template <
typename TArrayType1,
typename TArrayType2>
133 TArrayType1 &arrayType1, TArrayType2 &arrayType2,
int size,
ScalarType eps =
mitk::eps,
bool verbose =
false)
136 for (
int var = 0; var < size; ++var)
138 isEqual = isEqual &&
Equal(arrayType1[var], arrayType2[var],
eps);
bool EqualArray(TArrayType1 &arrayType1, TArrayType2 &arrayType2, int size, ScalarType eps=mitk::eps, bool verbose=false)
void ConditionalOutputOfDifference(ElementToOutput1 elem1, ElementToOutput2 elem2, mitk::ScalarType eps, bool verbose, bool isEqual)
DataCollection - Class to facilitate loading/accessing structured data.
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
void FillArray(itk::FixedArray< TCoordRep, NVectorDimension > &toArray, const ArrayType &array)
Copies elements of an array to this Vector.
void FillVector4D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z, mitk::ScalarType t)
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
void ToArray(ArrayType &array, const itk::FixedArray< TCoordRep, NVectorDimension > &vectorOrPoint)
Copies the elements of this into an array.
MITKCORE_EXPORT const ScalarType eps