<div dir="ltr">Matt,<div><br></div><div>I guess there should be migration report for this fix?</div><div><br></div><div>Arnaud</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 18, 2014 at 8:36 AM, Arnaud Gelas <span dir="ltr"><<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Matt,<div><br></div><div>This is indeed the observed and, based on your answer, expected behaviour.</div><div>Thank you very much for the confirmation (that's exactly what I needed!).</div><div><br></div><div>To avoid confusion in future, I am going to modify the corresponding example on github and on the wiki!</div><div><br></div><div>Best,</div><div>Arnaud</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 17, 2014 at 5:42 PM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Do to this fix [1], if the writer is re-using the GDCMImageIO, the<br>
writer should apply the inverse rescale / slope intercept like the<br>
reader applied the rescale / slope intercept when reading. This was a<br>
long-standing bug that I fixed in 4.6.0. Arnaud, if the manual<br>
inverse rescale / slope operation is removed, does the correct output<br>
result?<br>
<br>
Thanks,<br>
Matt<br>
<br>
[1] <a href="https://github.com/Kitware/ITK/commit/847ec2b79ac2cedaab6714678c0677793aa23a1e" target="_blank">https://github.com/Kitware/ITK/commit/847ec2b79ac2cedaab6714678c0677793aa23a1e</a><br>
<div><div><br>
On Wed, Sep 17, 2014 at 10:41 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> wrote:<br>
> I wrote this example many years ago…<br>
> 1) If the input has a non-trivial slope/intercept, the reader applies<br>
> the slope/intercept to the raw data.<br>
> 2) Rather than setting the slope/intercept in the output dicom, I<br>
> apply the inverse of of the slope intercept to the resampled data<br>
> before writing. The output dicom should not have the origin<br>
> slope/intercept tags.<br>
><br>
> I'll try to verify this with Slicer, but I may be out of touch for 2 weeks…<br>
><br>
> Bill<br>
><br>
><br>
> On Wed, Sep 17, 2014 at 10:15 AM, Arnaud Gelas <<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@gmail.com</a>> wrote:<br>
>> Hi Nick,<br>
>><br>
>> I can confirm that with the example I get a difference of -1024 (+/- 1) in<br>
>> between the input and the output, using the ShiftScaleImage part...<br>
>> While without this part of code the difference is (+/-1)<br>
>><br>
>> I would like to make sure this is the expected behaviour!?<br>
>><br>
>> On Wed, Sep 17, 2014 at 3:35 PM, Nick Patterson <<a href="mailto:pattersonnp.work@gmail.com" target="_blank">pattersonnp.work@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> OK, I will wait to hear the outcome of your run with the original example<br>
>>> then.<br>
>>><br>
>>> Cheers, Nick.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> On 17 Sep 2014, at 14:34, Arnaud Gelas <<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@gmail.com</a>> wrote:<br>
>>><br>
>>> Nick,<br>
>>><br>
>>> I can't roll back to previous ITK version, important patches on<br>
>>> itkGDCMImageIO were very recently merged...<br>
>>><br>
>>><br>
>>> <a href="https://github.com/Kitware/ITK/commits/master/Modules/IO/GDCM/src/itkGDCMImageIO.cxx" target="_blank">https://github.com/Kitware/ITK/commits/master/Modules/IO/GDCM/src/itkGDCMImageIO.cxx</a><br>
>>><br>
>>> e.g.<br>
>>><br>
>>><br>
>>> <a href="https://github.com/Kitware/ITK/commit/33a7e7162fc040f6c7346af5fc1ec15a80834273" target="_blank">https://github.com/Kitware/ITK/commit/33a7e7162fc040f6c7346af5fc1ec15a80834273</a><br>
>>><br>
>>> <a href="https://github.com/Kitware/ITK/commit/2f86b89df192aa80793b2d7f09624a2e4a74ec3c" target="_blank">https://github.com/Kitware/ITK/commit/2f86b89df192aa80793b2d7f09624a2e4a74ec3c</a><br>
>>><br>
>>><br>
>>> Arnaud<br>
>>><br>
>>> On Wed, Sep 17, 2014 at 3:29 PM, Nick Patterson<br>
>>> <<a href="mailto:pattersonnp.work@gmail.com" target="_blank">pattersonnp.work@gmail.com</a>> wrote:<br>
>>>><br>
>>>> I should also mention Arnauld that I use ITK4.5.2. I have had many<br>
>>>> issues with using ITK 4.6 with the latest GDCM from git, so rolled back to<br>
>>>> ITK4.5.2.<br>
>>>> Nick.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> On 17 Sep 2014, at 14:32, Arnaud Gelas <<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi Matias,<br>
>>>><br>
>>>> I guess you are referring to<br>
>>>><br>
>>>><br>
>>>> <a href="https://github.com/Kitware/ITK/commit/847ec2b79ac2cedaab6714678c0677793aa23a1e" target="_blank">https://github.com/Kitware/ITK/commit/847ec2b79ac2cedaab6714678c0677793aa23a1e</a><br>
>>>><br>
>>>> $ git tag --contains 847ec2b79ac2cedaab6714678c0677793aa23a1e<br>
>>>> v4.6.0<br>
>>>><br>
>>>> I use the release branch of ITK<br>
>>>><br>
>>>> ---<br>
>>>><br>
>>>> Matt,<br>
>>>><br>
>>>> Can you comment on this, please?<br>
>>>><br>
>>>> Thanks<br>
>>>> Arnaud<br>
>>>><br>
>>>> On Sep 17, 2014, at 3:21 PM, Matias Montroull <<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>><br>
>>>> wrote:<br>
>>>><br>
>>>> I had an issue with the resampledicom example once (all my pixel values<br>
>>>> were recalculated by adding rescaleintercept) and then downloaded the latest<br>
>>>> ITK release (4.6) and worked fine.<br>
>>>><br>
>>>> The issue was with the GDCMIO class I beleive but was fixed somehow in<br>
>>>> the 4.6 version.<br>
>>>><br>
>>>> On Wed, Sep 17, 2014 at 10:02 AM, Arnaud Gelas <<a href="mailto:arnaudgelas@gmail.com" target="_blank">arnaudgelas@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi all,<br>
>>>>><br>
>>>>> I have been looking at the following wiki example:<br>
>>>>><br>
>>>>> <a href="http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM" target="_blank">http://www.itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM</a><br>
>>>>><br>
>>>>> It seems to me that the section to rescale the image is not valid<br>
>>>>> anymore with latest ITK version (?)<br>
>>>>><br>
>>>>><br>
>>>>> <a href="https://github.com/InsightSoftwareConsortium/ITKWikiExamples/blob/master/DICOM/ResampleDICOM.cxx#L314-L333" target="_blank">https://github.com/InsightSoftwareConsortium/ITKWikiExamples/blob/master/DICOM/ResampleDICOM.cxx#L314-L333</a><br>
>>>>><br>
>>>>> Can anyone confirm?<br>
>>>>><br>
>>>>> Is this code validated? are output images compared to input ones in the<br>
>>>>> corresponding test?<br>
>>>>><br>
>>>>> Thanks<br>
>>>>> Arnaud<br>
>>>>><br>
>>>>> _____________________________________<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/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/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_FAQ</a><br>
>>>>><br>
>>>>> Follow this link to subscribe/unsubscribe:<br>
>>>>> <a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
>>>>><br>
>>>><br>
>>>><br>
>>>> _____________________________________<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/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/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_FAQ</a><br>
>>>><br>
>>>> Follow this link to subscribe/unsubscribe:<br>
>>>> <a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>><br>
>><br>
>> _____________________________________<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/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/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_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Unpaid intern in BillsBasement at noware dot com<br>
> _____________________________________<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/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/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_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>