[ITK-users] Get Z (mm) on a mha volume

Dženan Zukić dzenanz at gmail.com
Thu Mar 30 11:31:48 EDT 2017


Hi Matias,

in order to get "Z" value of a specific slice, you need to get it from tag
Image Position (Patient) (0020,0032).

If you read it into a 3D volume you can get "Z" value by using
image->TransformIndexToPhysicalPoint
<https://itk.org/Doxygen/html/classitk_1_1ImageBase.html#ab003313ba1a078d89a832dc0a35d2efa>
by
providing e.g. index [0,0,slice]. Caveat: the 3D reader assumes equidistant
spacing between slices, by examining distance between slices 0 and 1. In
case of non-constant Z spacing this method will likely produce wrong result.

Regards

On Thu, Mar 30, 2017 at 9:29 AM, Matias <matimontg at gmail.com> wrote:

> Hi,
>
> How can I get the Z value of a specific slice in a volume I read from a
> Dicom Directory?
>
> Thank you,
>
> Matias.
>
>
>
> --
> View this message in context: http://itk-users.7.n7.nabble.
> com/Get-Z-mm-on-a-mha-volume-tp38051.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170330/75edafdd/attachment.html>


More information about the Insight-users mailing list