[Insight-users] Re: incorrect z-spacing in GDCM reading
Mathieu Malaterre
mathieu.malaterre at kitware.com
Wed May 11 16:44:47 EDT 2005
Hxsham
What are you reporting is rather scary. Could you tell us which version
of ITK are you using ? Also on which example did you base your code ?
The fact is that this is tested nightly:
$ ctest -R itkGDCMSeriesReadImageWrite -V
This create three new files in Testing/Temporary/. Then all you need to
check is that 'Image Position Patient' is correct:
$ for i in `ls Testing/Temporary/*.dcm`; do
./bin/DicomImageReadPrintTags $i; done | grep "Image Position"
Image Position Patient = -112\ -21.688\ 126.894
Image Position Patient = -112\-20.2729\ 127.641
Image Position Patient = -112\-18.8578\ 128.388
Which looks good to me...
HTH,
Mathieu
Hxsham Fire wrote:
> George and Mathieu,
>
> This looks very similar to the problem I was having
> with ITK...
> The dicom series reader was reading the slices fine,
> and the volume had correct spacing... however after I
> write the series using the dicom series writer and try
> to read it back again, for further modification is
> when the z spacing fails, and the slices are compacted
> in the z direction, and it is most noticable if I try
> to rotate that image... also I noticed that all the
> slices have the same z coordinate of the origin in the
> series written by the dicom writer (that is field
> 0020|0030) in the dicom directory, and it is the
> values of the last slice in the original series that
> is written on all the slices in the output series.
>
> Hxsham
>
> ----------------------------------------------------
> ----------------------------------------------------
>
> George,
>
> Your code looks fine. The algorithm for
> finding the z spacing is kind
> of tricky. So I am wondering if:
>
> 1. Your images might not have proper 'Image Position
> Patient' / 'Image
> Orientation Patient'
>
> 2. If they have, maybe gdcm is not able to parse the
> string properly.
>
> Could it be possible that you send me at least two
> images from this
> dataset ?
>
> If not, you'll have to turn the code to be more
> verbose in particular
> when entering the function:
>
>
> gdcm::SerieHelper::ImagePositionPatientOrdering
>
> Thanks,
> Mathieu
>
>
>
>
> Yahoo! Mail
> Stay connected, organized, and protected. Take the tour:
> http://tour.mail.yahoo.com/mailtour.html
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list