<div dir="ltr">Hi all,<div><br></div><div>as a follow up, I just checked the spacings in the original image and the extracted slice.</div><div><br></div><div>reader->GetOutput()->GetSpacing()</div><div>gives</div><div>
[0.747159, 0.747159, 6].</div><div><br></div><div>But</div><div>filter->GetOutput()->GetSpacing()</div><div>gives</div><div>[1, 1],</div><div>which explains the "loss of spacing information" I observed.</div>
<div>I guess if the spacing was preserved the <span style="font-size:12.727272033691406px;font-family:arial,sans-serif">filter-></span><span style="font-size:12.727272033691406px;font-family:arial,sans-serif">SetDirectionCollapseToIndentit</span><span style="font-size:12.727272033691406px;font-family:arial,sans-serif">y() setting would give me the desired slice images.</span></div>
<div>Any tips on how I could track down the problem here?</div><div><br></div><div><br></div><div>Simon</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-08 22:10 GMT+01:00 Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Simon,<div class="gmail_extra"><br><div class="gmail_quote"><div class="">On Sat, Mar 8, 2014 at 3:56 PM, Simon Wimmer <span dir="ltr"><<a href="mailto:wimmersimon@gmail.com" target="_blank">wimmersimon@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>My direction matrix is simply the identity.</div>

<div>So I would guess that in this case <span style="font-size:12.666666984558105px;font-family:arial,sans-serif">filter-></span><span style="font-size:12.666666984558105px;font-family:arial,sans-serif">SetDirectionCollapseToIndentit</span><span style="font-size:12.666666984558105px;font-family:arial,sans-serif">y() and </span><span style="font-size:12.666666984558105px;font-family:arial,sans-serif">filter-></span><span style="font-size:12.666666984558105px;font-family:arial,sans-serif">SetDirectionCollapseToSubmatrix</span><span style="font-size:12.666666984558105px;font-family:arial,sans-serif">() should do the same?</span></div>


<div><br></div></div></blockquote><div><br></div></div><div>It should...yes... I think.</div><div><br></div><div>mm, maybe we need to take a closer look at the way the Submatrix is being composed:</div><div><br></div><div>
<a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkExtractImageFilter.hxx#L223" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkExtractImageFilter.hxx#L223</a><br>

</div><div><br></div><div><a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkExtractImageFilter.hxx#L188" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkExtractImageFilter.hxx#L188</a><br>

</div><div class=""><div><br></div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div></div><div>Taking out <span style="font-family:arial,sans-serif;font-size:12.727272033691406px"> </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">InPlaceOn() sounds reasonable.</span></div>

</div></blockquote><div><br></div></div><div>OK</div><div class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr">
<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Regarding the spacing issue my intuition would have been that the extraction of course destroys the information for the projection direction,</span><br>

</div>
<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">but should preserve it for the other ones. Is that correct?</span></div></div></blockquote><div><br></div></div><div>Yes, that's correct.</div>

<div><br></div><div>So, if the initial 3D image had spacing values</div><div><br></div><div>        1.7,  2.9,   3.1</div><div><br></div><div>in X, Y, Z respectively,</div><div><br></div><div><br></div><div>and you collapse Z,</div>

<div>you should end up with a 2D image with spacing values</div><div><br></div><div>         1.7,   2.9</div><div><br></div><div>in X and Y respectively.</div><div><br></div><div><br></div><div>  HTH</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>
<br></div><div>      Luis</div><div> </div></font></span></div></div></div>
</blockquote></div><br></div>