Create A Fixed Array

Synopsis

Create a FixedArray

Results

Output::

[0, 1]

Code

C++

#include "itkFixedArray.h"

int
main(int, char *[])
{
  itk::FixedArray<double, 2> array;
  array[0] = 0;
  array[1] = 1;

  std::cout << array << std::endl;

  return EXIT_SUCCESS;
}

Python

#!/usr/bin/env python
#
# ==========================================================================*/

import itk

array = itk.FixedArray[itk.D, 2]()
array[0] = 0
array[1] = 1

print(array)

Classes demonstrated