[ITK] DICOM read-write intensity rescaling problems still present in ITK 4.5.2

Matt McCormick matt.mccormick at kitware.com
Thu Jun 19 12:44:12 EDT 2014


Hi Mikael,

The rescaling should occur here [1].  If you run your code in a
debugger, does it execute as expected?

Thanks,
Matt

[1] http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/IO/GDCM/src/itkGDCMImageIO.cxx;h=e1b194934bbc6ffb7dd492448bcf9f9a70153d5a;hb=HEAD#l997

On Thu, Jun 19, 2014 at 6:00 AM, Eriksson, Mikael
<mikael.k.eriksson at philips.com> wrote:
> Hi all,
>
>
>
> I’m using ITK 4.5.2, and recently noticed that in my work with DICOM-images,
> the intensities are rescaled even without any processing taking place
> between the read/write operations. I found this old thread from November
> 2007, http://www.itk.org/pipermail/insight-users/2007-November/024327.html,
> which does a good job explaining the cause and a workaround. The cause is
> that when reading the image volume, rescale slope and intercept is used to
> convert the stored unsigned integers (assuming the “Pixel
> representation”-tag is 0) to real-world values, but then these real-world
> values are written into the new DICOM-series, while the rescale-parameters
> are copied, so on the next read the real-world values will be different.
>
>
>
> In the thread I posted, it says that a patch was added ahead of ITK 3.4 to
> correct the problem, but I’m using ITK 4.5.2 and still have the same issues.
> By using the workaround suggested by Eliana M. Vasquez Osorio,
>
>      WriterType::DictionaryArrayRawPointer dicts =
> dcmreader->GetMetaDataDictionaryArray();
>
>      WriterType::DictionaryArrayType::const_iterator itdict;
>
>      for( itdict = dicts->begin(); itdict != dicts->end(); itdict++ )
>
>      {
>
>          WriterType::DictionaryRawPointer dicti = *itdict;
>
>          //change 0028,1052,Rescale Intercept from -1000 to 0
>
>          itk::EncapsulateMetaData<std::string>( *dicti, "0028|1052", "0" );
>
>      }
>
> I get the end result I want, so the intensities stay the same by manually
> setting rescale intercept to 0 in the new written series. I added a line to
> set the slope to 1 as well just to be sure, but so far in the data I’ve been
> working with the rescale slope has been 1 as for Eliana.
>
>
>
> However, my question is: is this a good way to go about correcting this
> problem, and if it was corrected already in ITK 3.4, why then do I see the
> same behaviour with ITK 4.5?
>
>
>
> Best regards,
>
> Mikael
>
>
>
>
>
> ………………………………………………………………………………………….
>
> Mikael Eriksson
>
> R&D Physicist Trainee
>
> Philips Medical Systems MR Finland, Feasibility studies
>
> mikael.k.eriksson at philips.com
>
> ………………………………………………………………………………………….
>
>
>
>
> ________________________________
> The information contained in this message may be confidential and legally
> protected under applicable law. The message is intended solely for the
> addressee(s). If you are not the intended recipient, you are hereby notified
> that any use, forwarding, dissemination, or reproduction of this message is
> strictly prohibited and may be unlawful. If you are not the intended
> recipient, please contact the sender by return e-mail and destroy all copies
> of the original message.
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>



More information about the Community mailing list