@classmethod
    def readVTK(TensorMesh, fileName):
        # Import
        from vtk import vtkXMLRectilinearGridReader as vtrFileReader
        from vtk.util.numpy_support import vtk_to_numpy

        # Read the file
        vtrReader = vtrFileReader()
        vtrReader.SetFileName(fileName)
        vtrReader.Update()
        vtrGrid = vtrReader.GetOutput()
        # Sort information
        hx = np.abs(np.diff(vtk_to_numpy(vtrGrid.GetXCoordinates())))
        xR = vtk_to_numpy(vtrGrid.GetXCoordinates())[0]
        hy = np.abs(np.diff(vtk_to_numpy(vtrGrid.GetYCoordinates())))
        yR = vtk_to_numpy(vtrGrid.GetYCoordinates())[0]
        zD = np.diff(vtk_to_numpy(vtrGrid.GetZCoordinates()))
        # Check the direction of hz
        if np.all(zD < 0):
            hz = np.abs(zD[::-1])
            zR = vtk_to_numpy(vtrGrid.GetZCoordinates())[-1]
        else:
            hz = np.abs(zD)
            zR = vtk_to_numpy(vtrGrid.GetZCoordinates())[0]
        x0 = np.array([xR,yR,zR])

        # Make the SimPEG object
        tensMsh = TensorMesh([hx,hy,hz],x0)

        # Grap the models
        models = {}
        for i in np.arange(vtrGrid.GetCellData().GetNumberOfArrays()):
            modelName = vtrGrid.GetCellData().GetArrayName(i)
            if np.all(zD < 0):
                modFlip = vtk_to_numpy(vtrGrid.GetCellData().GetArray(i))
                tM = tensMsh.r(modFlip,'CC','CC','M')
                modArr = tensMsh.r(tM[:,:,::-1],'CC','CC','V')
            else:
                modArr = vtk_to_numpy(vtrGrid.GetCellData().GetArray(i))
            models[modelName] = modArr

        # Return the data
        return tensMsh, models
Check if the points given forms a clockwise polygon
dataset/ETHPy150Open simpeg/simpeg/SimPEG/Mesh/MeshIO.py/TensorMeshIO.readVTK--crossover with--dataset/ETHPy150Open estevaofon/angry-birds-python/pymunk-4.0.0/pymunk/util.py/is_clockwise