[Insight-users] Dicom Series Read Series Write: change in intensity values

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Nov 26 16:44:29 EST 2007


Hi Matthias,

On Nov 26, 2007 8:37 PM, Matthias Schabel <mschabel at ucair.med.utah.edu> wrote:
> I may not fully understand this issue, so apologies in advance if I'm
> missing something, but if the support for rescaleSlope/
> rescaleIntercept was removed from the ITK GDCM in ITK 3.4, this change
> breaks my code in a way that makes it very difficult to fix...

Here is what happen in between ITK 3.2 and 3.4, ITK-GDCM was simply
passing all DICOM element from the reader to the writer. This is a bad
idea since ITK is also at the same time decompressing (applying the
rescale+slope) to the Stored Pixel. Therefore whenever you would
read-write-read-write the linear transform would be applied multiple
time... yup this is a bug indeed !

Now, to answer your question: I did not break any kind of backward
compatibility since -and it's been on my TODO list for a while- there
is no support for floating point image in ITK-GDCM.
So if you are using some kind of low-level script (at gdcm level), you
should still be able to use it. Simply completely by-pass any check
done at ITK-GDCM level (ie. do not pass the meta data dictionary from
reader to writer).

> In
> particular, I have code that performs pharmacokinetic modeling on
> dynamically acquired MRI data to generate quantitative maps of
> parameters (such as Ktrans, kep, Vp...) that take on floating point
> values in the approximate range of 0.0-2.0.

2.0 ? That's pretty high for Ktrans/kep/ve, isn't it :)

> These maps are then
> exported as DICOM, with appropriate rescale factors and offsets to
> minimize truncation error in conversion from float to short. Since the
> latest release of the ITK libraries appears to strip rescaleSlope and
> rescaleIntercept on DICOM write, I can no longer specify correct
> scaling to the visualization program I'm using (OsiriX). I don't
> understand the rationale behind this change - it makes it essentially
> impossible to deal with small floating point numbers in DICOM if you
> can't specify these scaling values...

Please send your custom script, and I'll help you get it to work again. Thanks.

>
> PS The crashing problem in OSX 10.5 appears to only occur with
> dynamically linked versions of the ITK libraries - static linkage
> works fine.

Great, thanks for the notice !

-- 
Mathieu


More information about the Insight-users mailing list