Commit a9db3e2e authored by Dan Lipsa's avatar Dan Lipsa
Browse files

fix bug14192: ProbeFilter can't probe an Image with more than 2^31 cells

This bug affects how a point/cell id is computed from ijk structured
coordinates. The Ijk coordinates are passed as ints, so the computation
is performed using int arithmetics which overflows. The solution is to
perform the computation using vtkIdType arithmetic.

Change-Id: If3778b548c8269b759f820f66f9e57a6d9659abe
parent 3e98c7c0
......@@ -257,7 +257,7 @@ protected:
static vtkIdType GetLinearIndex(
const int i, const int j, const int k, const int N1, const int N2 )
return( (k*N2+j)*N1+i );
return( (static_cast<vtkIdType>(k)*N2+j)*N1+i );
// Description:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment