[Insight-developers] itkIndex initialization

Luis Ibanez ibanez@cs.unc.edu
Sat, 10 Mar 2001 11:58:38 -0500


Hi,

I just noticed that itkIndex has a static variable
initialized to zero.

So, Instead of writting

  itk::Index<3> start;
  start[0] = 0;
  start[1] = 0;
  start[2] = 0;

  itk::Region<3> region;
  region.SetIndex( start );

we can write:

  itk::Region<3> region;
  region.SetIndex( itk::Index<3>::ZeroIndex );


That reduces a little the protocol for initializing
images.


Luis