<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><font size="-1">From the previous mails
        I'd assume you tried this as a starting point but just in case:
        you did try to pass a smaller region as requested region for the
        output (filter->GetOutput()->SetRequestedRegion(my_region)
        before calling filter->Update()), didn't you? From a quick
        glance at the cascade of filters which the DemonsImageFilter
        inherits from, it's not obvious that the filter does not respect
        the requested region set by the user for the output.<br>
        <br>
        Otherwise, assuming your images are already affinely registered,
        it should be fairly safe to only run the algorithm on cropped
        images as suggested, yes, especially if you expect the motion at
        the boundary of your smaller domain to be roughly null.<br>
        <br>
        Another silly question/comment in case none of the above helps,
        and before you decide to invest time adapting the code: is the
        runtime of the demons algorithm an annoying bottleneck to you?
        I'd imagine it's one of the fastest algorithms out there. If
        it's fast enough, maybe you can just run it on the full images
        regardless. <br>
        <br>
        Le 31/10/2015 17:07, Nhung Pham a écrit :<br>
      </font></div>
    <blockquote
cite="mid:CAARpg10Ptegj8O2dOKMOHoptrH_5pmV1NXrjWfD2KEL6CgmVUA@mail.gmail.com"
      type="cite">
      <div dir="ltr"><font size="-1">Normally with Python, I can
          register one template( e.g: a center region of reference
          image) to the target image to find the corresponding position
          of the template in the target image. In this Demon
          Registration algorithm, we of course do not know the position
          of the template in the fixed image, so my goal is not to
          register two smaller images but to find the best match of the
          small region in the fixed image, or do you mean I should do
          registration with small regions of fixed image iteratively?
          (Sorry, my English is not so good)</font></div>
      <div class="gmail_extra"><font size="-1"><br clear="all">
        </font>
        <div>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div dir="ltr">
                            <div dir="ltr">
                              <div dir="ltr">
                                <div dir="ltr">
                                  <div dir="ltr">
                                    <div><font size="-1">Best regards,</font></div>
                                    <div><font size="-1">===============================</font>
                                      <div><font size="-1">Phạm Hồng
                                          Nhung,</font></div>
                                      <div><font size="-1">ICT
                                          Department,</font></div>
                                      <div><font size="-1">University of
                                          Science and Technology of
                                          Hanoi.</font></div>
                                      <div>
                                        <div><font size="-1">Mobile:
                                            +84979093732</font></div>
                                        <div><font size="-1">Gmail: <a
                                              moz-do-not-send="true"
                                              href="mailto:phnhung98@gmail.com"
                                              target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:phnhung98@gmail.com">phnhung98@gmail.com</a></a></font></div>
                                        <div><font size="-1">Skype:
                                            phnhung98</font></div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <font size="-1"><br>
        </font>
        <div class="gmail_quote"><font size="-1">On Sat, Oct 31, 2015 at
            4:51 PM, Dženan Zukić <span dir="ltr"><<a
                moz-do-not-send="true" href="mailto:dzenanz@gmail.com"
                target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a></a>></span> wrote:<br>
          </font>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">
              <div class="gmail_default"
                style="font-family:verdana,sans-serif;font-size:small"><font
                  size="-1">Have you tried extracting only the regions
                  of interest using <a moz-do-not-send="true"
href="http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html"
                    target="_blank">RoI</a> filter and registering these
                  two smaller images? That is the usual workaround if
                  some filter does not respect requested region.</font></div>
              <div class="gmail_default"
                style="font-family:verdana,sans-serif;font-size:small"><font
                  size="-1"><br>
                </font></div>
              <div class="gmail_default"
                style="font-family:verdana,sans-serif;font-size:small"><font
                  size="-1">HTH</font></div>
            </div>
            <div class="gmail_extra"><font size="-1"><br>
              </font>
              <div class="gmail_quote"><font size="-1">On Thu, Oct 29,
                  2015 at 9:49 AM, HONG NHUNG PHAM <span dir="ltr"><<a
                      moz-do-not-send="true"
                      href="mailto:hong.nhung.pham@univ-poitiers.fr"
                      target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:hong.nhung.pham@univ-poitiers.fr">hong.nhung.pham@univ-poitiers.fr</a></a>></span>
                  wrote:<br>
                </font>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div>
                    <div
style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000">
                      <div><font size="-1">Hello everyone,</font></div>
                      <div><font size="-1"><br>
                        </font></div>
                      <div><font size="-1">I want to apply Demons
                          Registration to register two medical images,
                          the image information is strong at the center,
                          therefore I want to apply registration method
                          on only the center region of the images. For
                          example, take a center region of moving image,
                          and find the corresponding positions of each
                          pixel of the region in the fixed image.
                          However, I can not find a method that allows
                          processing on a region like that in
                          itkDemonsRegistrationFilter.h. I tried passing
                          the full fixed image as SetFixedImage, and
                          only the center region of moving image as
                          SetMovingImage. However, it crashes because it
                          requires same size of fixed image and moving
                          image. </font></div>
                      <div><font size="-1"><br>
                        </font></div>
                      <div><font size="-1">Does anyone have any idea of
                          how to pass a region to demons registration
                          filter?</font></div>
                      <div><font size="-1"><br>
                        </font></div>
                      <div><font size="-1">Thank you in advance! </font></div>
                      <div><font size="-1"><br>
                        </font></div>
                      <div><font size="-1"><br>
                        </font></div>
                    </div>
                  </div>
                  <font size="-1"><br>
                    _____________________________________<br>
                    Powered by <a moz-do-not-send="true"
                      href="http://www.kitware.com" rel="noreferrer"
                      target="_blank">www.kitware.com</a><br>
                  </font>
                  <font size="-1"><br>
                    Visit other Kitware open-source projects at<br>
                  </font>
                  <font size="-1"><a moz-do-not-send="true"
                      href="http://www.kitware.com/opensource/opensource.html"
                      rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                  </font>
                  <font size="-1"><br>
                    Kitware offers ITK Training Courses, for more
                    information visit:<br>
                  </font>
                  <font size="-1"><a moz-do-not-send="true"
                      href="http://www.kitware.com/products/protraining.php"
                      rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
                  </font>
                  <font size="-1"><br>
                    Please keep messages on-topic and check the ITK FAQ
                    at:<br>
                  </font>
                  <font size="-1"><a moz-do-not-send="true"
                      href="http://www.itk.org/Wiki/ITK_FAQ"
                      rel="noreferrer" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
                  </font>
                  <font size="-1"><br>
                    Follow this link to subscribe/unsubscribe:<br>
                  </font>
                  <font size="-1"><a moz-do-not-send="true"
                      href="http://public.kitware.com/mailman/listinfo/insight-users"
                      rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
                  </font>
                  <font size="-1"><br>
                  </font></blockquote>
              </div>
              <font size="-1"><br>
              </font></div>
            <font size="-1"><br>
              _____________________________________<br>
              Powered by <a moz-do-not-send="true"
                href="http://www.kitware.com" rel="noreferrer"
                target="_blank">www.kitware.com</a><br>
            </font>
            <font size="-1"><br>
              Visit other Kitware open-source projects at<br>
            </font>
            <font size="-1"><a moz-do-not-send="true"
                href="http://www.kitware.com/opensource/opensource.html"
                rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
            </font>
            <font size="-1"><br>
              Kitware offers ITK Training Courses, for more information
              visit:<br>
            </font>
            <font size="-1"><a moz-do-not-send="true"
                href="http://www.kitware.com/products/protraining.php"
                rel="noreferrer" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
            </font>
            <font size="-1"><br>
              Please keep messages on-topic and check the ITK FAQ at:<br>
            </font>
            <font size="-1"><a moz-do-not-send="true"
                href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer"
                target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
            </font>
            <font size="-1"><br>
              Follow this link to subscribe/unsubscribe:<br>
            </font>
            <font size="-1"><a moz-do-not-send="true"
                href="http://public.kitware.com/mailman/listinfo/insight-users"
                rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
            </font>
            <font size="-1"><br>
            </font></blockquote>
        </div>
        <font size="-1"><br>
        </font></div>
      <font size="-1"><br>
      </font>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <font size="-1"><br>
      </font>
      <pre wrap=""><font size="-1">_____________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Kitware offers ITK Training Courses, for more information visit:
<a class="moz-txt-link-freetext" href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a>

Please keep messages on-topic and check the ITK FAQ at:
<a class="moz-txt-link-freetext" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a>
</font></pre>
    </blockquote>
    <br>
  </body>
</html>