I don&#39;t know if it will be faster (probably not) or will use less memory (doubtful), but you can use NthElementImageFilter to do this.<div><br></div><div>This class can transform a image containing covariant vectors of length N into N images of scalar type. Probably it will slightly faster because you are not explicitly copying the image.</div>
<div><br></div><div>You can try it at least</div><div><br></div><div>Sergio<br><br><div class="gmail_quote">On Tue, Jun 15, 2010 at 5:34 PM, Merrem, Andreas <span dir="ltr">&lt;<a href="mailto:andreas.merrem@medma.uni-heidelberg.de">andreas.merrem@medma.uni-heidelberg.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div>


<p><font size="2" face="Arial">Hi Luis, hi everyone,</font>
</p>

<p><font size="2" face="Arial">I am trying to smooth 3D image volumes of size 256 * 256 * 22 pixels, in which each pixel contains a 3 dimensional itk::CovariantVector. The vector components should be smoothed independently over the whole volume. My current solution is to first copy the 3 vector components in each pixel into 3 separate images with pixel type float, then use the itk::RecursiveGaussianImageFilter for smoothing on all 3 images, and finally copy the pixel values of the smoothed images back into the covariant vector image. </font></p>


<p><font size="2" face="Arial">My problem is that this procedure takes about one second. As a part of a registration program, this leads to extremely slow registration (about 10 minutes for one 256*256*22 dicom volume). Is there a way to use less memory by avoiding the copying, or do you know a different, faster technique of applying a Gaussian filter? </font></p>


<p><font size="2" face="Arial">Thanks a lot,</font>
</p>

<p><font size="2" face="Arial">Andreas   </font>
</p>

</div>
<br>_____________________________________<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.html" target="_blank">http://www.kitware.com/products/protraining.html</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><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>