[Insight-users] Initializing itk::Vector?

Bill Lorensen bill.lorensen at gmail.com
Fri Nov 27 16:52:12 EST 2009


vectorPoint.Fill(0);

But, in your case, you don't need to initialize it, so I guess I don't
understand your question.

Bill

On Fri, Nov 27, 2009 at 2:25 PM, motes motes <mort.motes at gmail.com> wrote:
> 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.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list