<div dir="ltr">Hi Bill,<div><br></div><div>It appears the bug "Acquisition Matrix" is still not corrected when running with itk4.5_rc02.</div><div>Are you going to fix it in the new released itk ?</div><div><br></div>
<div>Many thanks !!</div><div><br></div><div>Yi-Yu </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Oct 18, 2013 at 8:24 PM, Constantine Zakkaroff <span dir="ltr"><<a href="mailto:mnkz@leeds.ac.uk" target="_blank">mnkz@leeds.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Bill,<br>
<br>
It appears the bug with slope and intercept being processed incorrectly still shows up in ITK 4.4.2.<br>
<br>
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?<br>
<br>
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:<br>
<br>
(0010,21C0) Pregnancy Status VR: US Length: 2 Value: 4<br>
(0018,0088) Spacing Between Slices VR: DS Length: 4 Value: 17.0<br>
(0018,1310) Acquisition Matrix VR: US Length: 8 Value: 0 144 144 0<br>
<br>
and saved file:<br>
<br>
(0010,21C0) Pregnancy Status VR: US Length: 2 Value: 52<br>
(0018,0088) Spacing Between Slices VR: DS Length: 2 Value: 1<br>
(0018,1310) Acquisition Matrix VR: US Length: 12 Value: 23600 13361 23604 13361 23604 48<br>
<br>
As suggested earlier, I use the same GDCMImageIO object for reading and writing.<br>
<br>
Many thanks,<br>
Constantine<br>
<br>
<br>
On 16/08/2013 19:13, Bill Lorensen wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Constantine,<br>
<br>
You found a bug in itk's dicom IO. I'll report it and prepare a patch to<br>
fix it for future users.<br>
<br>
As a workaround, which should work for ITK 3 and ITK4 and hopefully<br>
after I fix the bug:<br>
<br>
1) If you want to retain the input dicom entries, you should create a<br>
GDCMImageIO and use it for both the input and output.<br>
2) To work around the itk dicom bug, add these lines AFTER the stats filter:<br>
// Set rescale slope and intercept to 1 and 0<br>
imageReader0->Update();<br>
typedef itk::MetaDataDictionary DictionaryType;<br>
DictionaryType & dict =<br>
imageReader0->GetOutput()-><u></u>GetMetaDataDictionary();<br>
itk::EncapsulateMetaData<std::<u></u>string>( dict, "0028|1052", "0.0");<br>
itk::EncapsulateMetaData<std::<u></u>string>( dict, "0028|1053", "1.0");<br>
<br>
NOTE: You need to #include "itkMetaDataObject.h"<br>
<br>
I've attached the your program with all of these changes. Thanks for<br>
your patience,<br>
<br>
Bill<br>
<br>
</blockquote>
______________________________<u></u>_______<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/<u></u>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/<u></u>listinfo/insight-users</a><br>
</blockquote></div><br></div>