Newer
Older
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# state file generated using paraview version 5.7.0
# ----------------------------------------------------------------
# setup views used in the visualization
# ----------------------------------------------------------------
# trace generated using paraview version 5.7.0
#
# To ensure correct image size when batch processing, please search
# for and uncomment the line `# renderView*.ViewSize = [*,*]`
#### import the simple module from the paraview
from paraview.simple import *
#### disable automatic camera reset on 'Show'
paraview.simple._DisableFirstRenderCameraReset()
# Create a new 'Render View'
renderView1 = CreateView('RenderView')
renderView1.ViewSize = [964, 795]
renderView1.AxesGrid = 'GridAxes3DActor'
renderView1.CenterOfRotation = [20.0, 25.25, 19.999999225139618]
renderView1.StereoType = 'Crystal Eyes'
renderView1.CameraPosition = [19.716196756133453, -140.19818563854574, 19.725993950408547]
renderView1.CameraFocalPoint = [19.716196756133453, 4.1990335064686235, 19.725993950408554]
renderView1.CameraViewUp = [0.0, 0.0, 1.0]
renderView1.CameraFocalDisk = 1.0
renderView1.CameraParallelScale = 37.37275037457204
renderView1.Background = [0.32, 0.34, 0.43]
SetActiveView(None)
# ----------------------------------------------------------------
# setup view layouts
# ----------------------------------------------------------------
# create new layout object 'Layout #1'
layout1 = CreateLayout(name='Layout #1')
layout1.AssignView(0, renderView1)
# ----------------------------------------------------------------
# restore active view
SetActiveView(renderView1)
# ----------------------------------------------------------------
# ----------------------------------------------------------------
# setup the data processing pipelines
# ----------------------------------------------------------------
# create a new 'Legacy VTK Reader'
phaseDiagramvtk = LegacyVTKReader(FileNames=['/home/klaus/Desktop/DUNE/dune-microstructure/Matlab-Programs/PhaseDiagram.vtk'])
# create a new 'Legacy VTK Reader'
phaseDiagramvtk_1 = LegacyVTKReader(FileNames=['/home/klaus/Desktop/DUNE/dune-microstructure/Matlab-Programs/PhaseDiagram.vtk'])
# create a new 'Legacy VTK Reader'
phaseDiagramvtk_2 = LegacyVTKReader(FileNames=['/home/klaus/Desktop/DUNE/dune-microstructure/Matlab-Programs/PhaseDiagram.vtk'])
# create a new 'Legacy VTK Reader'
legacyVTKReader1 = LegacyVTKReader(FileNames=['/home/klaus/Desktop/DUNE/dune-microstructure/Matlab-Programs/wind.vtk'])
# create a new 'Transform'
transform1 = Transform(Input=phaseDiagramvtk_2)
transform1.Transform = 'Transform'
# init the 'Transform' selected for 'Transform'
transform1.Transform.Scale = [1.0, 1.0, 40.0]
# create a new 'Legacy VTK Reader'
phaseDiagramvtk_3 = LegacyVTKReader(FileNames=['/home/klaus/Desktop/DUNE/dune-microstructure/Matlab-Programs/PhaseDiagram.vtk'])
# create a new 'Legacy VTK Reader'
phaseDiagramvtk_4 = LegacyVTKReader(FileNames=['/home/klaus/Desktop/DUNE/dune-microstructure/Matlab-Programs/PhaseDiagram.vtk'])
# ----------------------------------------------------------------
# setup the visualization in view 'renderView1'
# ----------------------------------------------------------------
# show data from transform1
transform1Display = Show(transform1, renderView1)
# get color transfer function/color map for 'type'
typeLUT = GetColorTransferFunction('type')
typeLUT.RGBPoints = [0.0, 0.0, 0.0, 1.0, 0.0, 0.17254901960784313, 0.043137254901960784, 0.9215686274509803, 0.0, 0.785929, 0.247056, 0.295477, 0.0, 0.17254901960784313, 0.043137254901960784, 0.9215686274509803, 0.5332077132980828, 0.41568627450980394, 0.00392156862745098, 0.9686274509803922, 0.8393082088494452, 0.48627450980392156, 0.0, 0.9725490196078431, 1.5502514522630406, 1.0, 0.5215686274509804, 0.9607843137254902, 2.4093082613015326, 1.0, 0.043137254901960784, 0.5529411764705883, 3.140000104904175, 1.0, 0.0, 0.01568627450980392]
typeLUT.ColorSpace = 'Lab'
typeLUT.NanColor = [0.0, 1.0, 0.0]
typeLUT.NumberOfTableValues = 593
typeLUT.ScalarRangeInitialized = 1.0
# get opacity transfer function/opacity map for 'type'
typePWF = GetOpacityTransferFunction('type')
typePWF.Points = [0.0, 1.0, 0.5, 0.0, 1.0269182920455933, 0.36764705181121826, 0.5, 0.0, 1.6292452668398216, 0.08088235557079315, 0.5, 0.0, 2.3500630855560303, 0.3602941334247589, 0.5, 0.0, 2.804276943206787, 0.6176470518112183, 0.5, 0.0, 3.140000104904175, 1.0, 0.5, 0.0]
typePWF.ScalarRangeInitialized = 1
# trace defaults for the display properties.
transform1Display.Representation = 'Points'
transform1Display.ColorArrayName = ['POINTS', 'type']
transform1Display.LookupTable = typeLUT
transform1Display.OSPRayScaleArray = 'type'
transform1Display.OSPRayScaleFunction = 'PiecewiseFunction'
transform1Display.SelectOrientationVectors = 'None'
transform1Display.ScaleFactor = 4.95
transform1Display.SelectScaleArray = 'type'
transform1Display.GlyphType = 'Arrow'
transform1Display.GlyphTableIndexArray = 'type'
transform1Display.GaussianRadius = 0.2475
transform1Display.SetScaleArray = ['POINTS', 'type']
transform1Display.ScaleTransferFunction = 'PiecewiseFunction'
transform1Display.OpacityArray = ['POINTS', 'type']
transform1Display.OpacityTransferFunction = 'PiecewiseFunction'
transform1Display.DataAxesGrid = 'GridAxesRepresentation'
transform1Display.PolarAxes = 'PolarAxesRepresentation'
transform1Display.ScalarOpacityFunction = typePWF
transform1Display.ScalarOpacityUnitDistance = 0.7474550074914409
# init the 'PiecewiseFunction' selected for 'OSPRayScaleFunction'
transform1Display.OSPRayScaleFunction.Points = [1.0, 0.8602941036224365, 0.5, 0.0, 1.213836476688135, 0.625, 0.5, 0.0, 1.3616352081298828, 0.6691176295280457, 0.5, 0.0, 1.6666333299996667, 0.8676470518112183, 0.5, 0.0, 1.7358490228652954, 0.6911764740943909, 0.5, 0.0, 2.0, 0.8014705777168274, 0.5, 0.0]
# init the 'PiecewiseFunction' selected for 'ScaleTransferFunction'
transform1Display.ScaleTransferFunction.Points = [0.0, 0.8602941036224365, 0.5, 0.0, 0.6714465592330834, 0.625, 0.5, 0.0, 1.1355345914648751, 0.6691176295280457, 0.5, 0.0, 2.093228726131573, 0.8676470518112183, 0.5, 0.0, 2.310566008990662, 0.6911764740943909, 0.5, 0.0, 3.140000104904175, 0.8014705777168274, 0.5, 0.0]
# init the 'PiecewiseFunction' selected for 'OpacityTransferFunction'
transform1Display.OpacityTransferFunction.Points = [0.0, 0.8602941036224365, 0.5, 0.0, 0.6714465592330834, 0.625, 0.5, 0.0, 1.1355345914648751, 0.6691176295280457, 0.5, 0.0, 2.093228726131573, 0.8676470518112183, 0.5, 0.0, 2.310566008990662, 0.6911764740943909, 0.5, 0.0, 3.140000104904175, 0.8014705777168274, 0.5, 0.0]
# setup the color legend parameters for each legend in this view
# get color legend/bar for typeLUT in view renderView1
typeLUTColorBar = GetScalarBar(typeLUT, renderView1)
typeLUTColorBar.Position = [0.8796680497925311, 0.01509433962264151]
typeLUTColorBar.Title = 'type'
typeLUTColorBar.ComponentTitle = ''
# set color bar visibility
typeLUTColorBar.Visibility = 1
# show color legend
transform1Display.SetScalarBarVisibility(renderView1, True)
# ----------------------------------------------------------------
# setup color maps and opacity mapes used in the visualization
# note: the Get..() functions create a new object, if needed
# ----------------------------------------------------------------
# ----------------------------------------------------------------
# finally, restore active source
SetActiveSource(phaseDiagramvtk_2)
# ----------------------------------------------------------------