(self, filename)
return mesh_points
Method to parse the file `filename`. It returns a matrix
        with all the coordinates.

        :param string filename: name of the input file.

        :return: mesh_points: it is a `n_points`-by-3 matrix
            containing the coordinates of the points of the mesh
        :rtype: numpy.ndarray

        .. todo::

            - specify when it works
Method to parse the file `filename`. It returns a matrix
        with all the coordinates.
Method to parse the file filename . It returns a matrix with all the coordinates .
def parse(self, filename):
        """
        Method to parse the file `filename`. It returns a matrix
        with all the coordinates.

        :param string filename: name of the input file.

        :return: mesh_points: it is a `n_points`-by-3 matrix
            containing the coordinates of the points of the mesh
        :rtype: numpy.ndarray

        .. todo::

            - specify when it works
        """
        self._check_filename_type(filename)
        self._check_extension(filename)

        self.infile = filename

        reader = vtk.vtkDataSetReader()
        reader.SetFileName(self.infile)
        reader.ReadAllVectorsOn()
        reader.ReadAllScalarsOn()
        reader.Update()
        data = reader.GetOutput()

        n_points = data.GetNumberOfPoints()
        mesh_points = np.zeros([n_points, 3])

        for i in range(n_points):
            mesh_points[i][0], mesh_points[i][1], mesh_points[i][
                2] = data.GetPoint(i)

        return mesh_points
def parse ( self , filename ) : self . _check_filename_type ( filename ) self . _check_extension ( filename ) self . infile = filename reader = vtk . vtkDataSetReader ( ) reader . SetFileName ( self . infile ) reader . ReadAllVectorsOn ( ) reader . ReadAllScalarsOn ( ) reader . Update ( ) data = reader . GetOutput ( ) n_points = data . GetNumberOfPoints ( ) mesh_points = np . zeros ( [ n_points , 3 ] ) for i in range ( n_points ) : mesh_points [ i ] [ 0 ] , mesh_points [ i ] [ 1 ] , mesh_points [ i ] [ 2 ] = data . GetPoint ( i ) return mesh_points