<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>good. So in order to append a new component to my vector image, I will create a new vector image with the new data and use the ComposeImageFilter or something alike to get the final one.<br>
<br></div>than you!<span class="HOEnZb"><font color="#888888"><br>
sebastian<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 11, 2013 at 1:41 PM, Bradley Lowekamp <span dir="ltr"><<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
There is not resize in place for the vector pixels. That is a lot of copying to get to an undefined state. It's better to copy as you know what the new values should be.<br>
<br>
Have you looked into the ComposeImageFilter?<br>
<br>
<a href="http://www.itk.org/Doxygen/html/classitk_1_1ComposeImageFilter.html" target="_blank">http://www.itk.org/Doxygen/html/classitk_1_1ComposeImageFilter.html</a><br>
<br>
You should be able to join 2 vector images together. If the second vector image has the new values you want then it should be able to efficiently create the new vector image.<br>
<br>
Brad<br>
<div><div><br>
On Sep 11, 2013, at 6:51 AM, sebastian ordas <<a href="mailto:sebastian.ordas@gmail.com" target="_blank">sebastian.ordas@gmail.com</a>> wrote:<br>
<br>
> Hello,<br>
><br>
> I would like to change the vector length of an itk::VectorImage at runtime.<br>
><br>
> e.g.:<br>
><br>
> image->SetVectorLength(Components+1);<br>
> image->Allocate();<br>
><br>
> My problem is that previous components are overwritten<br>
> Is it possible to this on the fly? or should I create a new VectorImage<br>
> and transfer the image components one by one?<br>
><br>
> many thanks,<br>
> sebastian<br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
</blockquote></div><br></div>
</div></div></div><br></div>