[Paraview] help with pvpython commands

Anton Shterenlikht mexas at bristol.ac.uk
Thu Mar 14 08:20:49 EDT 2013


I'm trying to follow this example:

Example 2

In the second example the python script reads a raw binary file with 3Dimensional data and creates a contour at the values 0.1 and -0.1. A Colour bar is also provided.

from paraview.servermanager import *
Connect()
reader=sources.ImageReader(FilePrefix="phi-120000")
reader.DataByteOrder=1
reader.DataExtent[1]=511
reader.DataExtent[3]=1023
reader.DataExtent[5]=511
reader.DataScalarType=10
view=CreateRenderView()
view.Background=[0.3249412, 0.34902, 0.427451]
rep=CreateRepresentation(reader,view)
rep.Representation=3
rep.ColorAttributeType=0
cont1=filters.Contour(Input=reader)
cont1.ComputeScalars=1
cont1.ComputeNormals=0
cont1.ContourValues=[-0.1,0.1]
cont1.SelectInputScalars="ImageFile"
rep2=CreateRepresentation(cont1,view)
rep2.ColorArrayName="ImageFile"
rep2.SelectionColor=[1,0,1]
rep2.ColorAttributeType=0
lt=rendering.PVLookupTable()
lt.RGBPoints=[-0.1,0.1381,0.2411,0.7091,0.1,0.6728,0.1408,0.1266]
lt.ColorSpace=3
rep2.LookupTable=lt
sb=rendering.ScalarBarWidgetRepresentation()
sb.Position=[0.80,0.15]
sb.Title="ImageFile"
sb.Enabled=1
sb.LookupTable=lt
view.Representations.append(sb)
view.StillRender()
view.ResetCamera()
view.StillRender()
view.WriteImage("PHI-result.png","vtkPNGWriter")

from 
http://www.hector.ac.uk/support/documentation/userguide/tools.php#paraview

Where and how can I get help on each of these functions?

I can do e.g. help(ImageReader) in pvpython, but
that doesn't help much. I'm not even sure what's
sources.ImageReader.

Where shall I start?

Thanks

Anton


More information about the ParaView mailing list