Imaging/vtkImageReslice.cxx
int vtkIsIdentityMatrix(vtkMatrix4x4 *matrix)
{
  static double identity[16] = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1};
  int i,j;

  for (i = 0; i < 4; i++)
    {
    for (j = 0; j < 4; j++)
      {
      if (matrix->GetElement(i,j) != identity[4*i+j])
        {
        return 0;
        }
      }
    }
  return 1;
}
//----------------------------------------------------------------------------
// check a matrix to see whether it is the identity matrix
check a matrix to see whether it is the identity matrix
check a matrix to see whether it is the identity matrix
int vtkIsIdentityMatrix(vtkMatrix4x4 *matrix)
{
  static double identity[16] = {1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1};
  int i,j;
  for (i = 0; i < 4; i++)
    {
    for (j = 0; j < 4; j++)
      {
      if (matrix->GetElement(i,j) != identity[4*i+j])
        {
        return 0;
        }
      }
    }
  return 1;
}
int vtkIsIdentityMatrix ( vtkMatrix4x4 * matrix ) { static double identity [ 16 ] = { 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 } ; int i , j ; for ( i = 0 ; i < 4 ; i ++ ) { for ( j = 0 ; j < 4 ; j ++ ) { if ( matrix -> GetElement ( i , j ) != identity [ 4 * i + j ] ) { return 0 ; } } } return 1 ; }
check a matrix to see whether it is the identity matrix
check a matrix to see whether it is the identity matrix