[Insight-users] Initializing itk::Vector?

motes motes mort.motes at gmail.com
Fri Nov 27 14:25:52 EST 2009


I typedef the itk::Vector like this:


typedef Vector<TScalarType, SpaceDimension>  VectorType;

Then I use it like this:

VectorType vectorPoint;

   for (int i=0; i<NDimensions; i++) {
     vectorPoint[i] = i;
   }

But should the vector not be initialized before asigning it, like:
vectorPoint.fill(0)?

But fill is not supported so I am a little uncertain on how to
gurantee that it actually allocated correctly.


More information about the Insight-users mailing list