Back to index

salome-paravis  6.5.0
Functions | Variables
demo9 Namespace Reference

Functions

def demo9

Variables

tuple testdir = os.getenv("TESTDIR")
tuple pvdata = os.getenv("PVDATA")

Function Documentation

def demo9.demo9 (   fname,
  impth 
)
This method demonstrates the Threshold filter.

Definition at line 26 of file demo9.py.

00026 
00027 def demo9(fname, impth):
00028     """This method demonstrates the Threshold filter."""
00029 
00030     reader = ExodusIIReader(FileName=fname)
00031     v=GetActiveView()
00032     Show(reader, view=v)
00033     dp1 = GetDisplayProperties(reader)
00034     dp1.Representation = 'Wireframe'
00035     camera = GetActiveCamera()
00036     camera.Elevation(-60)
00037     thresholdFilter = Threshold(reader)
00038     thresholdFilter.Scalars
00039     ##['POINTS', 'GlobalNodeId']
00040 
00041     thresholdFilter.Scalars = 'Temp'
00042     Show(thresholdFilter)
00043     thresholdFilter.ThresholdRange
00044     ##[0.0, 0.0]
00045     thresholdFilter.ThresholdRange = [398.55,913.15]
00046     Render()
00047     WriteImage(filename = (impth + "thresholdFilter_1.png"), view=v, Magnification=2)
00048 
00049     dp2 = GetDisplayProperties(thresholdFilter)
00050     thresholdFilter.PointData[:]
00051     ##[Array: GlobalNodeId, Array: PedigreeNodeId, Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2]
00052 
00053     temp = thresholdFilter.PointData[2]
00054     temp.GetRange()
00055     ##(400.46258544921875, 846.694091796875)
00056 
00057     dp2.LookupTable = MakeBlueToRedLT(400.4625,846.6909)
00058     dp2.ColorAttributeType = 'POINT_DATA'
00059     dp2.ColorArrayName = 'Temp'
00060     Render()
00061     WriteImage(filename = (impth + "thresholdFilter_2.png"), view=v, Magnification=2)
00062     
00063     #Set the lower threshold to 500
00064     thresholdFilter.ThresholdRange[0] = 500
00065     Render()
00066     WriteImage(filename = (impth + "thresholdFilter_3.png"), view=v, Magnification=2)
00067     
00068     dp1.LookupTable = MakeBlueToRedLT(400.462, 84609)
00069     dp1.ColorAttributeType = 'POINT_DATA'
00070     dp1.ColorArrayName = 'Temp'
00071     Render()
00072     WriteImage(filename = (impth + "thresholdFilter_4.png"), view=v, Magnification=2)

Here is the call graph for this function:


Variable Documentation

tuple demo9.pvdata = os.getenv("PVDATA")

Definition at line 74 of file demo9.py.

tuple demo9.testdir = os.getenv("TESTDIR")

Definition at line 73 of file demo9.py.