<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Everyone,<div class=""><br class=""></div><div class=""> I have an Anaylze 7.5 file with negative spacing in it and previously my unit test for this file passed in ITK 3.20.x which is now failing in ITK 4.9 (git master). I happen to have noticed there is a tolerance check in the file itkImageToImageFilter.hxx which in my opinion needs to be of absolute value. My question is, is the calculation of the tolerance deliberate? Note that for this file, <span style="font-family: Menlo; font-size: 11px;" class="">inputPtr1->GetSpacing()[</span><span style="font-family: Menlo; font-size: 11px; color: rgb(39, 42, 216);" class="">0</span><span style="font-family: Menlo; font-size: 11px;" class="">] gives -1.</span></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">const</span> SpacePrecisionType coordinateTol</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> = <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">this</span>->m_CoordinateTolerance * inputPtr1->GetSpacing()[<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>]; <span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">// use first dimension spacing</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""> </div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""> if ( !inputPtr1->GetOrigin().GetVnlVector().is_equal(inputPtrN->GetOrigin().GetVnlVector(), coordinateTol) ||</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""> !inputPtr1->GetSpacing().GetVnlVector().is_equal(inputPtrN->GetSpacing().GetVnlVector(), coordinateTol) ||</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);" class=""> !inputPtr1->GetDirection().GetVnlMatrix().as_ref().is_equal(inputPtrN->GetDirection().GetVnlMatrix(), this->m_DirectionTolerance) )</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> std::ostringstream originString, spacingString, directionString;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">if</span> ( !inputPtr1->GetOrigin().GetVnlVector().is_equal(inputPtrN->GetOrigin().GetVnlVector(), coordinateTol) )</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> originString.setf( std::ios::scientific );</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> originString.precision( <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">7</span> );</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> originString << <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"InputImage Origin: "</span> << inputPtr1->GetOrigin()</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> << <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">", InputImage"</span> << it.GetName() << <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">" Origin: "</span> << inputPtrN->GetOrigin() << std::endl;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> originString << <span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"\tTolerance: "</span> << coordinateTol << std::endl;</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> }</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""> </div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><font color="#bb2ca2" class=""><font face="Menlo" class=""><span style="font-size: 11px;" class="">………….</span></font></font></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Regards,</div><div class=""> Seun.</div></body></html>