[Insight-users] Getting PixelType& from VectorImage

wanlin wanlinzhu at gmail.com
Thu Mar 24 18:30:57 EDT 2011


You can assign the value by

itk::VariableLengthVector<float> vec = oo.Get();
vec[2] = 3.0;
oo.Set(vec);


On Fri, Mar 25, 2011 at 3:32 AM, Eduardo Suarez-Santana <
esuarez at itccanarias.org> wrote:

> El 24/03/11 16:26, robert tamburo escribió:
> > Hi Eduardo,  Value() cannot be used with a VectorImage. Try doing:
> >
> > itk::VariableLengthVector<float> vec = oo.Get();
> > float value = vec[2];
> >
> > or
> >
> > float vec = oo.Get()[2];
>
> Is there a way to assign the Value?
>
> Would this work?
> oo.Get()[2] = 3.0;
>
> _____________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110325/4ec76db2/attachment.htm>


More information about the Insight-users mailing list