Create a CovariantVector

Synopsis

Create a CovariantVector

Results

Output:

v: [1, 2, 3]

Code

C++

#include "itkCovariantVector.h"

int
main(int, char *[])
{
  constexpr unsigned int Dimension = 3;
  using CoordType = double;

  using VectorType = itk::CovariantVector<CoordType, Dimension>;
  VectorType v;
  v[0] = 1.0;
  v[1] = 2.0;
  v[2] = 3.0;

  std::cout << "v: " << v << std::endl;

  return EXIT_SUCCESS;
}

Classes demonstrated