[Insight-developers] gdcmIO eCT z-spacing patch

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Mar 22 11:27:33 EDT 2010


Henning,

On Mon, Mar 22, 2010 at 4:20 PM, Henning Meyer <tutmann at gmail.com> wrote:
> Hello All,
>
> I encountered problems with handling Toshiba eCT via gdcmIO, due to
> failure in reading z-spacing.
> I wrote a patch for InsightToolkit-3.16.0 which works for me.
> Its basically looking for ImagePositionPatient-Tags inside the
> PerFrameFunctionalSequence and also checking that the spacing is
> continuous.
>
> I'm still unsure whether or not it's ITKs fault. Because there also
> seems to be some code doing something similar in gdcm:
>
> ./Source/MediaStorageAndFileFormat/gdcmImageHelper.cxx : 159
> bool ComputeZSpacingFromIPP(const DataSet &ds, double &zspacing)
>
> ./Source/MediaStorageAndFileFormat/gdcmIPPSorter.cxx

Neat ! You are using GDCM 2.x :)

> Even though these two seems to be a bit redundant as well (double and
> different definition of ZTolerance: gdcmImageHelper.cxx:246, and
> dcmIPPSorter.cxx:30).
>
> I'd be happy if we could work this out and patch the right package.
> Maybe I should repost this in the gdcm-list as well....

I am hijacking this thread to gdcm-dev...

Could you confirm that gdcminfo is failing to report the proper
z-spacing on your Enhanced CT/MR Image Storage file ?

If so, we have a couple of pathway:
- Either send me the dataset
- Send me the output of gdcmdump (at least the Per Frame SQ section).

Thanks !
-- 
Mathieu


More information about the Insight-developers mailing list