[ITK] Not making updates helps performance

Nirvedh Meshram nmeshram at wisc.edu
Fri May 12 14:01:44 EDT 2017


Hi all,


I am looking at a ITK code written by a predecessor in my lab group. This code is used for image registration and the snippet of this looks as shown below.


    m_FixedImage->Update();
   m_MovingImage->Update();
    m_FixedImage->DisconnectPipeline();
    m_MovingImage->DisconnectPipeline();

  // do image registration

However, if I comment the first two lines. I still get the exact same results but I end up saving 30 seconds.

If I comment all lines I get an error saying I tried to access some region which was of size [0,0]

I was hoping someone could give me insight into what exactly is going on here.
I understand updates matter to make sure your pipeline executes. But both these images are inputs to downstream filters then why had my predecessor chosen to do these updates separately here and why do I still get correct results without the updates.
Why is it important to disconnect these pipelines here before continuing the registration?

Thank you,
Nirvedh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170512/92e26eb5/attachment.html>


More information about the Community mailing list