[Insight-users] Image Intensities Changed During DICOM Read-Write-Read in ITK 3.20 vs. ITK 4.4.1
Constantine Zakkaroff
mnkz at leeds.ac.uk
Mon Aug 12 11:46:28 EDT 2013
Thanks for your reply, Bill. I've tried setting the type to short, and
it didn't seem to change anything.
Many thanks,
Constantine
On 12/08/2013 15:18, Bill Lorensen wrote:
> DICOM data is often signed after the slope/intercept in applied. Try
> setting the type to short rather than unsigned short.
>
>
> On Mon, Aug 12, 2013 at 9:48 AM, Bradley Lowekamp
> <blowekamp at mail.nih.gov <mailto:blowekamp at mail.nih.gov>> wrote:
>
>
> Do you have the code to share so that it can be easily reproduced?
>
>
> Thanks,
> Brad
>
> On Aug 12, 2013, at 9:33 AM, Constantine Zakkaroff <mnkz at leeds.ac.uk
> <mailto:mnkz at leeds.ac.uk>> wrote:
>
> > Hello ALL,
> >
> > I'm wondering if anyone can explain what's going on with the
> changing image intensities in a read-write-read round-trip. I think
> it's a bug, but the issues.itk.org <http://issues.itk.org> is
> unresponsive at the moment. Another bug? ;)
> >
> > Anyhow, the strange thing is that the results for the round trip
> read-write-read test are very different for ITK 3.20 and ITK 4.4.1.
> >
> > I use to StatisticsImageFilter to examine the intensity values.
> Here's what happens, when I simply read a DICOM image, print stats,
> save the image and read it again, followed by printing the stats:
> >
> > ITK Version: 3.20
> > Stats for original file:
> > Min: 0, Max: 2474, Mean: 169.236, Sigma: 256.719, Variance:
> 65904.7, Sum: 1.40371e+007
> > Stats for saved file:
> > Min: 0, Max: 2471, Mean: 167.132, Sigma: 256.125, Variance:
> 65600.1, Sum: 1.38626e+007
> >
> > ITK Version: 4.4
> > Stats for original file:
> > Min: 0, Max: 2474, Mean: 169.236, Sigma: 256.719, Variance:
> 65904.7, Sum: 1.40371e+007
> > Stats for saved file:
> > Min: 0, Max: 7446, Mean: 509.114, Sigma: 772.59, Variance:
> 596895, Sum: 4.22279e+007
> >
> > In both cases the code is identical. Just compiled against
> different versions of ITK. The images are read and written as
> itk::Image<unsigned short, 3>, with no processing, no changes to any
> aspect of the images.
> >
> > So, ITK 3.20 introduces a small change, which I'm pretty sure
> shouldn't be there. But in ITK 4.4.1 the scale of intensities
> changes three-fold.
> >
> > I'd not be surprised by a change of this magnitude if I was
> photocopying those images, but not when using digital software and
> hardware. :^) Is there something I'm not understanding here?
> >
> > None of this happens with read(DICOM)-write(MHD)-read(MHD), where
> the original and round-trip values are identical:
> > Stats for saved file: file0.mhd
> > Min: 0, Max: 2474, Mean: 169.236, Sigma: 256.719, Variance:
> 65904.7, Sum: 1.40371e+007
> >
> > Many thanks,
> > Constantine
> >
> > _____________________________________
> > Powered by www.kitware.com <http://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
>
> _____________________________________
> Powered by www.kitware.com <http://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
>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
More information about the Insight-users
mailing list