(self, show_file=None)
Method to show a vtk file. If `show_file` is not given
        it shows `self.infile`.

        :param string show_file: the vtk filename you want to show.
Method to show a vtk file. If `show_file` is not given
        it shows `self.infile`.
Method to show a vtk file . If show_file is not given it shows self . infile .
def show(self, show_file=None):
        """
        Method to show a vtk file. If `show_file` is not given
        it shows `self.infile`.

        :param string show_file: the vtk filename you want to show.
        """
        if show_file is None:
            show_file = self.infile
        else:
            self._check_filename_type(show_file)

        # Read the source file.
        reader = vtk.vtkUnstructuredGridReader()
        reader.SetFileName(show_file)
        reader.Update()  # Needed because of GetScalarRange
        output = reader.GetOutput()
        scalar_range = output.GetScalarRange()

        # Create the mapper that corresponds the objects of the vtk file
        # into graphics elements
        mapper = vtk.vtkDataSetMapper()
        mapper.SetInputData(output)
        mapper.SetScalarRange(scalar_range)

        # Create the Actor
        actor = vtk.vtkActor()
        actor.SetMapper(mapper)

        # Create the Renderer
        renderer = vtk.vtkRenderer()
        renderer.AddActor(actor)
        # Set background color (white is 1, 1, 1)
        renderer.SetBackground(20, 20, 20)

        # Create the RendererWindow
        renderer_window = vtk.vtkRenderWindow()
        renderer_window.AddRenderer(renderer)

        # Create the RendererWindowInteractor and display the vtk_file
        interactor = vtk.vtkRenderWindowInteractor()
        interactor.SetRenderWindow(renderer_window)
        interactor.Initialize()
        interactor.Start()
def show ( self , show_file = None ) : if show_file is None : show_file = self . infile else : self . _check_filename_type ( show_file ) # Read the source file. reader = vtk . vtkUnstructuredGridReader ( ) reader . SetFileName ( show_file ) reader . Update ( ) # Needed because of GetScalarRange output = reader . GetOutput ( ) scalar_range = output . GetScalarRange ( ) # Create the mapper that corresponds the objects of the vtk file # into graphics elements mapper = vtk . vtkDataSetMapper ( ) mapper . SetInputData ( output ) mapper . SetScalarRange ( scalar_range ) # Create the Actor actor = vtk . vtkActor ( ) actor . SetMapper ( mapper ) # Create the Renderer renderer = vtk . vtkRenderer ( ) renderer . AddActor ( actor ) # Set background color (white is 1, 1, 1) renderer . SetBackground ( 20 , 20 , 20 ) # Create the RendererWindow renderer_window = vtk . vtkRenderWindow ( ) renderer_window . AddRenderer ( renderer ) # Create the RendererWindowInteractor and display the vtk_file interactor = vtk . vtkRenderWindowInteractor ( ) interactor . SetRenderWindow ( renderer_window ) interactor . Initialize ( ) interactor . Start ( )