<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">&lt;<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>&gt;</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&#39;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 &lt;<a href="mailto:sebastian.ordas@gmail.com" target="_blank">sebastian.ordas@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hello,<br>
&gt;<br>
&gt; I would like to change the vector length of an itk::VectorImage at runtime.<br>
&gt;<br>
&gt; e.g.:<br>
&gt;<br>
&gt; image-&gt;SetVectorLength(Components+1);<br>
&gt; image-&gt;Allocate();<br>
&gt;<br>
&gt; My problem is that previous components are overwritten<br>
&gt; Is it possible to this on the fly? or should I create a new VectorImage<br>
&gt; and transfer the image components one by one?<br>
&gt;<br>
&gt; many thanks,<br>
&gt; sebastian<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <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>