[ITK] Registration processing time comparison between V3

Brian Eastwood brian at mbfbioscience.com
Mon Nov 20 14:02:37 EST 2017


Hi Kenji,

As Dženan points out, I've seen similar speed differences. Sorry I missed the discussion on Friday!

There are two things I found to speed things up that you could try temporarily.
1) On your metric, call UseFixedImageGradientFilterOff() and UseMovingImageGradientFilterOff(). This means image gradients will be computed on a pixel-by-pixel basis rather than over the whole image with a filter. You'll probably want to combine this with setting a small value for SetMetricSamplingPercentage() on the registration method to limit how many sample points are evaluated in the image metric. Whether this offers a speed up will probably depend on your image sizes.
2) Replace the itk::DiscreteGaussianImageFilter with itk::SmoothingRecursiveGaussianImageFilter inside the registration method code. Note that these two filters have different interfaces (e.g. standard deviation vs. variance, normalization across scales). Yes, this requires modifying ITK source, but as it's in a header file I don't think you need to recompile ITK.

I found both of these options to speed up registration v4, but I think the approach Dženan outlined for the future will be much better.

Regards,
Brian

On Sat, Nov 18, 2017 at 4:59 PM, Kenji Tsumura < kenji.tsumura at neosoftmedical.com> wrote:

> Hi,
>
>
>
> I just started to learn ITK registration and noticed there is a 
> difference in processing time between Registration V3 and V4. It took 
> around 2.4 seconds to perform registration of 20 MRI images using V3, 
> whereas it took around 7.2 seconds using V4. I have no idea where this 
> difference comes from. It would be great if someone gives me an advice 
> on how to make processing time using V4 equivalent of that of V3, as I 
> want to use ObjectToObjectMultiMetricV4. In the past, there was a 
> similar post, but no one gave a clear answer.
>
>
>
> I posted the source code and image data in the following URL.
>
> https://github.com/ktsumura/ITK-BSpline-Registration/tree/master
>
>
>
> I followed the following examples.
>
> https://itk.org/Wiki/ITK/Examples/Registration/
> ImageRegistrationMethodBSpline
>
> DeformableRegistration4.cxx.
>
>
>
> Thank you!
>
>
>
> Kenji
>
>
>
>
>
>
> Disclaimer: The information contained in this communication may be 
> confidential, is intended only for the use of the recipient(s) named 
> above, and may be legally privileged. If the reader of this message is 
> not the intended recipient, you are hereby notified that any 
> dissemination, distribution, or copying of this communication, or any 
> of its contents, is strictly prohibited. If you have received this 
> communication in error, please return it to the sender immediately and 
> delete the original message and any copy of it from your computer 
> system. If you have any questions concerning this message, please contact the sender.
>
> The ITK community is transitioning from this mailing list to 
> discourse.itk.org. Please join us there!
> ________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20171120/26fce061/attachment-0001.html>

------------------------------

Subject: Digest Footer

The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there!
_______________________________________

Community mailing list
Community at itk.org
http://public.kitware.com/mailman/listinfo/community


------------------------------

End of Community Digest, Vol 50, Issue 8
****************************************




More information about the Community mailing list