<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.17063" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010>Yes, that was my idea too... unfortunately the discrete
Gaussian filter is even 3 times slower than the recursive
one.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010>Anyway, thanks a lot,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010>Andreas</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=004083116-16062010></SPAN></FONT> </DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> Sergio Vera [mailto:sergio.vera@alma3d.com]
<BR><B>Gesendet:</B> Mittwoch, 16. Juni 2010 17:10<BR><B>An:</B> Merrem,
Andreas<BR><B>Cc:</B> Bill Lorensen; insight-users@itk.org<BR><B>Betreff:</B>
Re: [Insight-users] Smoothing Vector Images<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Hello</DIV>Extracted from the itk doxygen documentation:
<DIV><BR></DIV>
<DIV><SPAN class=Apple-style-span
style="FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif"><I>As compared
to </I><A class=el
title="Blurs an image by separable convolution with discrete gaussian kernels. This filter..."
style="COLOR: rgb(26,65,168); TEXT-DECORATION: none"
href="http://www.itk.org/Doxygen318/html/classitk_1_1DiscreteGaussianImageFilter.html"><I>itk::DiscreteGaussianImageFilter</I></A><I>,
this filter (</I></SPAN><I>RecursiveGaussianImageFilter) </I><SPAN
class=Apple-style-span
style="FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif"><I>tends to be faster
for large kernels, and it can take the derivative of the blurred image in one
step. </I></SPAN></DIV>
<DIV><SPAN class=Apple-style-span
style="FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif"><BR></SPAN></DIV>
<DIV><SPAN class=Apple-style-span
style="FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif">so if you are using
smaller sigmas and hence, smaller Gaussians, DiscreteGaussianImageFilter
may result in faster execution time.</SPAN></DIV>
<DIV><SPAN class=Apple-style-span
style="FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif"><BR></SPAN></DIV>
<DIV><SPAN class=Apple-style-span
style="FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif">And now I'm
speculating but my guess is that 1 second to perform 3x256x256x22 convolutions
is not dramatically slow (it seems reasonable, as those represents more than 4
millions of convolution operations), but i don't know if it can be done much
more faster.</SPAN></DIV>
<DIV><SPAN class=Apple-style-span
style="FONT-SIZE: 14px; FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif"><BR></SPAN></DIV>
<DIV><SPAN class=Apple-style-span
style="FONT-SIZE: 14px; FONT-FAMILY: Geneva, Arial, Helvetica, sans-serif"><BR></SPAN></DIV>
<DIV><BR>
<DIV class=gmail_quote>On Wed, Jun 16, 2010 at 3:41 PM, Merrem, Andreas <SPAN
dir=ltr><<A
href="mailto:andreas.merrem@medma.uni-heidelberg.de">andreas.merrem@medma.uni-heidelberg.de</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi
Bill and Sergio,<BR><BR>Thank you for your answers.<BR><BR>I tried using nth
element adaptors and the VectorIndexSelectionCastImageFilter, but it doesn't
make it faster, what takes time is really the smoothing itself (as you already
expected).<BR><BR>Yes, I built both the itk library and the application in
release mode. Do you think a second is a reasonable amount of time for
smoothing 3 image volumes of size 256*256*22?<BR><BR>If anyone knows a
smoothing filter that does Gaussian smoothing and works faster than the itk
recursive filter (perhaps something in frequency space) that would be a great
help.<BR><BR><BR><BR><BR><BR>-----Ursprüngliche Nachricht-----<BR>Von: Bill
Lorensen [mailto:<A
href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</A>]<BR>Gesendet:
Dienstag, 15. Juni 2010 20:12<BR>An: Merrem, Andreas<BR>Cc: Luis Ibanez; <A
href="mailto:insight-users@itk.org">insight-users@itk.org</A><BR>Betreff: Re:
[Insight-users] Smoothing Vector Images<BR>
<DIV>
<DIV></DIV>
<DIV class=h5><BR>First question: are you building ITK and your app with
Release?<BR><BR>On Tue, Jun 15, 2010 at 11:34 AM, Merrem, Andreas <<A
href="mailto:andreas.merrem@medma.uni-heidelberg.de">andreas.merrem@medma.uni-heidelberg.de</A>>
wrote:<BR>> Hi Luis, hi everyone,<BR>><BR>> I am trying to smooth 3D
image volumes of size 256 * 256 * 22 pixels,<BR>> in which each pixel
contains a 3 dimensional itk::CovariantVector. The<BR>> vector components
should be smoothed independently over the whole<BR>> volume. My current
solution is to first copy the 3 vector components<BR>> in each pixel
into<BR>> 3 separate images with pixel type float, then use the<BR>>
itk::RecursiveGaussianImageFilter for smoothing on all 3 images, and<BR>>
finally copy the pixel values of the smoothed images back into the<BR>>
covariant vector image.<BR>><BR>> My problem is that this procedure
takes about one second. As a part of<BR>> a registration program, this
leads to extremely slow registration<BR>> (about 10 minutes for one
256*256*22 dicom volume). Is there a way to<BR>> use less memory by
avoiding the copying, or do you know a different,<BR>> faster technique of
applying a Gaussian filter?<BR>><BR>> Thanks a lot,<BR>><BR>>
Andreas<BR>><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>><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></DIV></DIV></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></BODY></HTML>