16 #include <itkFixedArray.h> 38 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
39 void FillArray(itk::FixedArray<TCoordRep, NVectorDimension> &toArray,
const ArrayType &array)
41 itk::FixedArray<TCoordRep, NVectorDimension> vectorOrPoint;
42 for (
unsigned short int var = 0; var < NVectorDimension; ++var)
44 toArray[var] = array[var];
56 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
57 itk::FixedArray<TCoordRep, NVectorDimension>
FillArray(
const ArrayType &array)
59 itk::FixedArray<TCoordRep, NVectorDimension> vectorOrPoint;
75 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
76 void ToArray(ArrayType &array,
const itk::FixedArray<TCoordRep, NVectorDimension> &vectorOrPoint)
78 for (
unsigned short int var = 0; var < NVectorDimension; ++var)
80 array[var] = vectorOrPoint[var];
93 template <
typename ArrayType,
typename TCoordRep,
unsigned int NVectorDimension>
94 ArrayType
ToArray(
const itk::FixedArray<TCoordRep, NVectorDimension> &vectorOrPoint)
105 template <
class Tout>
113 template <
class Tout>
127 template <
typename TArrayType1,
typename TArrayType2>
132 for (
int var = 0; var < size; ++var)
134 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