<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Fausto,<br>
      if you want to accomplish all the stuff entirely from the
      scipy/scikit side, I think you could use [1] and [2] (check the
      matching between documentation version and library version).<br>
      <br>
      HTH.<br>
      Best.<br>
      <br>
      Paolo<br>
      <br>
      [1]
<a class="moz-txt-link-freetext" href="http://docs.scipy.org/doc/scipy-0.16.0/reference/generated/scipy.ndimage.interpolation.rotate.html">http://docs.scipy.org/doc/scipy-0.16.0/reference/generated/scipy.ndimage.interpolation.rotate.html</a><br>
      [2]
<a class="moz-txt-link-freetext" href="http://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.rotate">http://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.rotate</a><br>
      <br>
      <br>
      <br>
      On 04/05/2016 20:40, fausto milletarì wrote:<br>
    </div>
    <blockquote
      cite="mid:6DA80880-E1D3-42EF-B32F-81020FF76C1B@gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      Hello, 
      <div class=""><br class="">
        <div class="">I thank you for you fast and accurate answer. This
          was exactly what I was looking for. Actually I don’t need to
          visualise the data but further process it in a common
          reference frame. I think that your answer solves the problem.
          I will look into the ResampleImageFilter (that so far I was
          using only to adjust the resolution of different volumes
          acquired with different scanners to a common one).</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <div class="">Thanks a lot!</div>
        <div class=""><br class="">
        </div>
        <div class="">Fausto Milletari<br class="">
          <div>
            <blockquote type="cite" class="">
              <div class="">On 04 May 2016, at 20:36, Lowekamp, Bradley
                (NIH/NLM/LHC) [C] <<a moz-do-not-send="true"
                  href="mailto:blowekamp@mail.nih.gov" class="">blowekamp@mail.nih.gov</a>>
                wrote:</div>
              <br class="Apple-interchange-newline">
              <div class="">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=windows-1252" class="">
                <div style="word-wrap: break-word; -webkit-nbsp-mode:
                  space; -webkit-line-break: after-white-space;"
                  class="">
                  Hello,
                  <div class=""><br class="">
                  </div>
                  <div class="">If I understand you correctly you want
                    to rotate the image and pad it for visualization
                    before exporting to numpy.</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">Have you looked into the
                    ResampleImageFilter? It accepts a transform, along
                    with output image geometry so that you can readily
                    manipulate the image for display. You also may want
                    to scale the image’s intensity with a
                    WindowLevelImageFilter for better visualization of
                    the range of interest.</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">HTH,</div>
                  <div class="">Brad</div>
                  <div class=""><br class="">
                    <div class="">
                      <blockquote type="cite" class="">
                        <div class="">On May 4, 2016, at 1:14 PM, fausto
                          milletarì <<a moz-do-not-send="true"
                            href="mailto:fausto.milletari@gmail.com"
                            class="">fausto.milletari@gmail.com</a>>
                          wrote:</div>
                        <br class="Apple-interchange-newline">
                        <div class="">
                          <div style="word-wrap: break-word;
                            -webkit-nbsp-mode: space;
                            -webkit-line-break: after-white-space;"
                            class="">
                            Hello everyone,
                            <div class=""><br class="">
                              <div class="">I have a probably naive
                                question about simpleITK. I find
                                simpleITK extremely useful to process
                                medical data such as MRI scans but I
                                would like also to enjoy being able to
                                convert my images in numpy format while
                                respecting the transformation of the
                                volume.</div>
                            </div>
                            <div class=""><br class="">
                            </div>
                            <div class="">In other words I would like to
                              get the MRI image in numpy rotated by the
                              correct amount around each axis with zero
                              padding for example.</div>
                            <div class=""><br class="">
                            </div>
                            <div class="">when i do simply <span
                                style="color: rgb(128, 128, 128);
                                font-style: italic; font-family: Menlo;
                                font-size: 9pt; background-color:
                                rgb(255, 255, 255);" class="">sitk.GetArrayFromImage(imgResampledCropped)</span>I
                              get back the raw data itself, but what I
                              would like to do is to have a numpy array
                              that contains the data “ready to
                              visualise” by simple slicing of the array
                              itself.</div>
                            <div class=""><br class="">
                            </div>
                            <div class="">Do you think this is doable?
                              Is there a standard way of doing it?</div>
                            <div class=""><br class="">
                            </div>
                            <div class=""><br class="">
                            </div>
                            <div class=""><br class="">
                            </div>
                            <div class="">Kind regards,</div>
                            <div class=""><br class="">
                            </div>
                            <div class="">Fausto</div>
                            <div class=""><br class="">
                            </div>
                          </div>
                          _____________________________________<br
                            class="">
                          Powered by <a moz-do-not-send="true"
                            href="http://www.kitware.com/" class="">www.kitware.com</a><br
                            class="">
                          <br class="">
                          Visit other Kitware open-source projects at<br
                            class="">
                          <a moz-do-not-send="true"
                            href="http://www.kitware.com/opensource/opensource.html"
                            class="">http://www.kitware.com/opensource/opensource.html</a><br
                            class="">
                          <br class="">
                          Kitware offers ITK Training Courses, for more
                          information visit:<br class="">
                          <a moz-do-not-send="true"
                            href="http://www.kitware.com/products/protraining.php"
                            class="">http://www.kitware.com/products/protraining.php</a><br
                            class="">
                          <br class="">
                          Please keep messages on-topic and check the
                          ITK FAQ at:<br class="">
                          <a moz-do-not-send="true"
                            href="http://www.itk.org/Wiki/ITK_FAQ"
                            class="">http://www.itk.org/Wiki/ITK_FAQ</a><br
                            class="">
                          <br class="">
                          Follow this link to subscribe/unsubscribe:<br
                            class="">
                          <a moz-do-not-send="true"
                            href="http://public.kitware.com/mailman/listinfo/insight-users"
                            class="">http://public.kitware.com/mailman/listinfo/insight-users</a><br
                            class="">
                        </div>
                      </blockquote>
                    </div>
                    <br class="">
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
          <br class="">
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_____________________________________
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>
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Community mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Community@itk.org">Community@itk.org</a>
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/community">http://public.kitware.com/mailman/listinfo/community</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>