[ITK Community] Fwd: Problems with slice extraction from a 3D image for directions different from z

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 8 16:10:24 EST 2014


Hi Simon,

On Sat, Mar 8, 2014 at 3:56 PM, Simon Wimmer <wimmersimon at gmail.com> wrote:

>
> My direction matrix is simply the identity.
> So I would guess that in this case filter->SetDirectionCollapseToIndentity()
> and filter->SetDirectionCollapseToSubmatrix() should do the same?
>
>
It should...yes... I think.

mm, maybe we need to take a closer look at the way the Submatrix is being
composed:

https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkExtractImageFilter.hxx#L223

https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/Common/include/itkExtractImageFilter.hxx#L188




> Taking out  InPlaceOn() sounds reasonable.
>

OK


> Regarding the spacing issue my intuition would have been that the
> extraction of course destroys the information for the projection direction,
> but should preserve it for the other ones. Is that correct?
>

Yes, that's correct.

So, if the initial 3D image had spacing values

        1.7,  2.9,   3.1

in X, Y, Z respectively,


and you collapse Z,
you should end up with a 2D image with spacing values

         1.7,   2.9

in X and Y respectively.


  HTH


      Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140308/c721953f/attachment-0002.html>


More information about the Community mailing list