Skip to content

Commit

Permalink
Merge topic 'BSplineTransformIndexDecrement'
Browse files Browse the repository at this point in the history
f27b680 BUG: Adjust index decrement in BSplineTransform
  • Loading branch information
thewtex authored and kwrobot committed May 25, 2016
2 parents f70b7cb + f27b680 commit 09c443d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modules/Core/Transform/include/itkBSplineTransform.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -474,11 +474,11 @@ BSplineTransform<TParametersValueType, NDimensions, VSplineOrder>
bool inside = true;
for( unsigned int j = 0; j < SpaceDimension; j++ )
{
ScalarType maxLimit = static_cast<ScalarType>( gridSize[j] ) - 0.5
const ScalarType maxLimit = static_cast<ScalarType>( gridSize[j] ) - 0.5
* static_cast<ScalarType>( SplineOrder - 1 ) - 1.0;
if(Math::AlmostEquals( index[j], maxLimit ))
if( Math::FloatAlmostEqual( index[j], maxLimit, 4 ) )
{
index[j] = Math::FloatAddULP( index[j], -6 );
index[j] = Math::FloatAddULP( maxLimit, -6 );
}
else if( index[j] >= maxLimit )
{
Expand Down

0 comments on commit 09c443d

Please sign in to comment.