[vtkusers]ask how to read DICOM(again)

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Oct 9 08:12:25 EDT 2007


On 10/8/07, Noecker, Angela M. <noeckera at ccf.org> wrote:
> Mathieu,
>
> Could you explain exactly which fields in the DICOM header
> vtkDICOMImageReader uses to parse the files?

I guess you could grep the source to get the complete list. But this
does not mean that the tag are actually used correctly, which seems to
be your issue here.

>  I haven't dug into the
> source code yet, but it seems clear that it accesses the following:
>
> 0020, 0032 Image Position (Patient)
> 0020, 0037 Image Orientation (Patient)

Correct.

> Other than that it's not clear.  It seems that when reading images from
> a folder that contains multiple image series, the class looks for 0020,
> 000E Series Instance UID to determine which images to include in the
> volume it opens.  Is that correct?

I do not know. One way to test would be to put two slices with
different Series Instance UID in the same directory and try it out.

> I'm currently having issues with z spacing of a DICOM dataset.  How does
> vtkDICOMImageReader acquire the dataspacing using "GetDataSpacing"?  For
> the specific dataset giving me trouble this class gives me a z spacing
> of 6 although when I view the dataset using other software the z spacing
> should clearly be 2.  The DICOM header value 0018, 0050 Slice Thickness
> is 1.9999981.  There are 51 images in the set and the z value of the
> DICOM header identifier 0020, 0032 Image Position (Patient) varies by 2
> for each consecutive slice except the last one which varies by 6.  If I
> remove the last image from the set I still get the same spacing problem.

Looking at your file, I can see that Spacing Between Slices
(0018,0088) is 0. And indeed Slice Thickness (0018,0050) is 2.0. Thus
the vtkDICOM reader is doing the right thing in NOT reporting that the
spacing is 2.0. You should reread Part 3 of the DICOM standard (MR
object) and you'll see that the correct tag should be Spacing Between
Slices (Slice Thickness is a completely different information).

> Can you help?

Go get whoever gave you those DICOM files and check why the Spacing
Between Slices is 0. If the distance in between two consecutive DICOM
image is different from the value indicated in 0018,0088 then your
vendor is lying when it says that he is producing DICOM files.

Other than that I believe we have a correct (=robust) way of computing
spacing in GDCM. Either get ITK to read your DICOM or get the official
VTK bridge shipped in the gdcm tarball:

http://www.creatis.insa-lyon.fr/Public/Gdcm/


HTH
-- 
Mathieu



More information about the vtkusers mailing list