[ITK-users] Getting slice thickness of a CT image

Jon Haitz Legarreta jhlegarreta at vicomtech.org
Wed May 7 08:05:18 EDT 2014


Hi Pietro,
well, DICOM is composed of a set of 2D slices that compose a volume.

In principle, the slice thickness will be constant for all slices. There
are some other tags whose value changes from slice to slice.

Furthermore, the pointed example [1] takes a DICOM series (image dimension
is 3) as its input and creates a metadata dictionary for each slice, so you
may find there the way to get the information you need about a given slice.

If you need the value of a variable tag, you'll need to set which slice's
information you want; you don't need to know its file name, but I guess
you'll need to know how your slices are sorted so that the "3rd" slice is
the one you expect to be the "3rd".

I cannot answer about NRRD files, sorry.

[1] http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM




On 7 May 2014 13:34, Pietro Nardelli <pie.nardelli at gmail.com> wrote:

> Hi Jon,
>
> thanks a lot for your answer. I still have some doubt though. I tried to
> look at the examples you mentioned, but it seems to me that they are all
> for 2D images (dicom image extracted by a series?). How can I get the slice
> thickness of a specific slice, say the 3rd on for example, without the need
> to specify the name of that slice? Is it possible to do that? Or I need to
> know the name of the specific slice?
> Also, what if instead of a dicom I have a nrrd file. How may I get the
> slice thickness in this case?
>
> Many many thanks for your help,
> Pietro
>
>
> 2014-05-07 7:36 GMT+01:00 Jon Haitz Legarreta <jhlegarreta at vicomtech.org>:
>
> Hi Pietro,
>> you can have a look at this example [1].
>>
>> On the other hand, if you are dealing with at DICOM dataset, the tag that
>> stores the slice thickness information is 0018 | 0050 [2].
>>
>> In section 7.12.3 of the ITK SW Guide [3] you may find some additional
>> example about how to get the information of the DICOM tags. Basically, ITK
>> uses a library called GDCM to handle DICOM files, and by creating the
>> appropriate GDCM objects, you'll be able to retrieve the value of any DICOM
>> tag.
>>
>> HTH,
>> JON HAITZ
>>
>> [1] http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM
>> [2] http://medical.nema.org/Dicom/2011/11_06pu.pdf (page 22)
>> [3] http://www.itk.org/ItkSoftwareGuide.pdf
>>
>>
>> On 6 May 2014 18:47, Pietro Nardelli <pie.nardelli at gmail.com> wrote:
>>
>>> Hi guys,
>>>
>>> would you mind telling me if there a method to get the slice thickness
>>> of a CT dataset in ITK? I have been looking it up online, but I could not
>>> find a good explanation.
>>>
>>> Thank you very much for your help,
>>> Pietro
>>>
>>> _____________________________________
>>> 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://www.itk.org/mailman/listinfo/insight-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140507/b0e2b87d/attachment.html>


More information about the Insight-users mailing list