[Insight-users] Image Intensities Changed During DICOM Read-Write-Read in ITK 3.20 vs. ITK 4.4.1
Yi-Yu Chou
yiyu.chou at gmail.com
Wed Dec 4 12:12:26 EST 2013
Hi Bill,
It appears the bug "Acquisition Matrix" is still not corrected when running
with itk4.5_rc02.
Are you going to fix it in the new released itk ?
Many thanks !!
Yi-Yu
On Fri, Oct 18, 2013 at 8:24 PM, Constantine Zakkaroff <mnkz at leeds.ac.uk>wrote:
> Hi Bill,
>
> It appears the bug with slope and intercept being processed incorrectly
> still shows up in ITK 4.4.2.
>
> Is there an explanation why in the original DICOM file rescale slope is
> 7.1, but in order to see the same image stats (min, max, etc.) it needs to
> be saved with the rescale slope value of 1.0?
>
> Also, I believe I mentioned it a while ago, but there wasn't much feedback
> on this: some tag values get unexpected values. For example, compare the
> following tag values in the original DICOM file:
>
> (0010,21C0) Pregnancy Status VR: US Length: 2 Value: 4
> (0018,0088) Spacing Between Slices VR: DS Length: 4 Value: 17.0
> (0018,1310) Acquisition Matrix VR: US Length: 8 Value: 0 144 144 0
>
> and saved file:
>
> (0010,21C0) Pregnancy Status VR: US Length: 2 Value: 52
> (0018,0088) Spacing Between Slices VR: DS Length: 2 Value: 1
> (0018,1310) Acquisition Matrix VR: US Length: 12 Value: 23600 13361 23604
> 13361 23604 48
>
> As suggested earlier, I use the same GDCMImageIO object for reading and
> writing.
>
> Many thanks,
> Constantine
>
>
> On 16/08/2013 19:13, Bill Lorensen wrote:
>
>> Constantine,
>>
>> You found a bug in itk's dicom IO. I'll report it and prepare a patch to
>> fix it for future users.
>>
>> As a workaround, which should work for ITK 3 and ITK4 and hopefully
>> after I fix the bug:
>>
>> 1) If you want to retain the input dicom entries, you should create a
>> GDCMImageIO and use it for both the input and output.
>> 2) To work around the itk dicom bug, add these lines AFTER the stats
>> filter:
>> // Set rescale slope and intercept to 1 and 0
>> imageReader0->Update();
>> typedef itk::MetaDataDictionary DictionaryType;
>> DictionaryType & dict =
>> imageReader0->GetOutput()->GetMetaDataDictionary();
>> itk::EncapsulateMetaData<std::string>( dict, "0028|1052", "0.0");
>> itk::EncapsulateMetaData<std::string>( dict, "0028|1053", "1.0");
>>
>> NOTE: You need to #include "itkMetaDataObject.h"
>>
>> I've attached the your program with all of these changes. Thanks for
>> your patience,
>>
>> Bill
>>
>> _____________________________________
> Powered by 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131204/7c823f46/attachment.htm>
More information about the Insight-users
mailing list