File size: 1,133 Bytes
6baf440
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# import the simple module from the paraview
from paraview.simple import *

# create a new 'Wavelet'
wavelet1 = Wavelet()

# get active view
renderView1 = GetActiveViewOrCreate('RenderView')
renderView1.ViewSize = [400, 400]

# show data in view
wavelet1Display = Show(wavelet1, renderView1)

# reset view to fit data
renderView1.ResetCamera()

# create a new 'Contour'
contour1 = Contour(Input=wavelet1)
contour1.ContourBy = ['POINTS', 'RTData']
contour1.Isosurfaces = [97.222075, 157.09105, 216.96002500000003, 276.829]
contour1.ComputeScalars = 1
contour1.PointMergeMethod = 'Uniform Binning'

# get color transfer function/color map for 'RTData'
rTDataLUT = GetColorTransferFunction('RTData')

# show data in view
contour1Display = Show(contour1, renderView1)
# trace defaults for the display properties.
contour1Display.ColorArrayName = ['POINTS', 'RTData']
contour1Display.LookupTable = rTDataLUT

# save data
plyfilename = "PLYWriterData.ply"
SaveData(plyfilename,
        proxy=contour1, EnableColoring=1,
)

# # save screenshot
SaveScreenshot('write-ply-screenshot.png', renderView1)