Hi Everyone,

      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, inputPtr1->GetSpacing()[0] gives -1.

const SpacePrecisionType coordinateTol
        = this->m_CoordinateTolerance * inputPtr1->GetSpacing()[0]; // use 
first dimension spacing
        
      if ( 
!inputPtr1->GetOrigin().GetVnlVector().is_equal(inputPtrN->GetOrigin().GetVnlVector(),
 coordinateTol) ||
           
!inputPtr1->GetSpacing().GetVnlVector().is_equal(inputPtrN->GetSpacing().GetVnlVector(),
 coordinateTol) ||
           
!inputPtr1->GetDirection().GetVnlMatrix().as_ref().is_equal(inputPtrN->GetDirection().GetVnlMatrix(),
 this->m_DirectionTolerance) )
        {
        std::ostringstream originString, spacingString, directionString;
        if ( 
!inputPtr1->GetOrigin().GetVnlVector().is_equal(inputPtrN->GetOrigin().GetVnlVector(),
 coordinateTol) )
          {
          originString.setf( std::ios::scientific );
          originString.precision( 7 );
          originString << "InputImage Origin: " << inputPtr1->GetOrigin()
                       << ", InputImage" << it.GetName() << " Origin: " << 
inputPtrN->GetOrigin() << std::endl;
          originString << "\tTolerance: " << coordinateTol << std::endl;
          }
        

………….


Regards,
  Seun.
_______________________________________________
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://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://public.kitware.com/mailman/listinfo/insight-developers

Reply via email to