# 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 = [5.5, 5.5, 5.5]
renderView1.StereoType = 'Crystal Eyes'
renderView1.CameraPosition = [-1.9013843868480158, -13.320979633549339, 35.98066109404487]
renderView1.CameraFocalPoint = [1.538094468601466, -4.574729188366619, 21.81606919426716]
renderView1.CameraViewUp = [0.05745797827794325, -0.8556355497369458, -0.5143796134748793]
renderView1.CameraFocalDisk = 1.0
renderView1.CameraParallelScale = 7.794228634059948
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'
windvtk = LegacyVTKReader(FileNames=['/home/klaus/Desktop/DUNE/dune-microstructure/Matlab-Programs/wind.vtk'])

# ----------------------------------------------------------------
# setup the visualization in view 'renderView1'
# ----------------------------------------------------------------

# show data from windvtk
windvtkDisplay = Show(windvtk, renderView1)

# get color transfer function/color map for 'type'
typeLUT = GetColorTransferFunction('type')
typeLUT.RGBPoints = [1.0, 0.0, 0.0, 1.0, 1.0, 0.17254901960784313, 0.043137254901960784, 0.9215686274509803, 1.0, 0.785929, 0.247056, 0.295477, 1.0, 0.17254901960784313, 0.043137254901960784, 0.9215686274509803, 1.1698113679885864, 0.41568627450980394, 0.00392156862745098, 0.9686274509803922, 1.2672955989837646, 0.48627450980392156, 0.0, 0.9725490196078431, 1.4937106370925903, 1.0, 0.058823529411764705, 0.984313725490196, 1.7672955989837646, 1.0, 0.043137254901960784, 0.5529411764705883, 2.0, 1.0, 0.0, 0.01568627450980392]
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 = [1.0, 1.0, 0.5, 0.0, 1.2830188274383545, 1.0, 0.5, 0.0, 1.4654088020324707, 1.0, 0.5, 0.0, 1.6289308071136475, 1.0, 0.5, 0.0, 1.7987420558929443, 0.9926470518112183, 0.5, 0.0, 2.0, 1.0, 0.5, 0.0]
typePWF.ScalarRangeInitialized = 1

# trace defaults for the display properties.
windvtkDisplay.Representation = 'Points'
windvtkDisplay.ColorArrayName = ['POINTS', 'type']
windvtkDisplay.LookupTable = typeLUT
windvtkDisplay.PointSize = 3.0
windvtkDisplay.OSPRayScaleArray = 'type'
windvtkDisplay.OSPRayScaleFunction = 'PiecewiseFunction'
windvtkDisplay.SelectOrientationVectors = 'None'
windvtkDisplay.ScaleFactor = 0.9
windvtkDisplay.SelectScaleArray = 'type'
windvtkDisplay.GlyphType = 'Arrow'
windvtkDisplay.GlyphTableIndexArray = 'type'
windvtkDisplay.GaussianRadius = 0.045
windvtkDisplay.SetScaleArray = ['POINTS', 'type']
windvtkDisplay.ScaleTransferFunction = 'PiecewiseFunction'
windvtkDisplay.OpacityArray = ['POINTS', 'type']
windvtkDisplay.OpacityTransferFunction = 'PiecewiseFunction'
windvtkDisplay.DataAxesGrid = 'GridAxesRepresentation'
windvtkDisplay.PolarAxes = 'PolarAxesRepresentation'
windvtkDisplay.ScalarOpacityFunction = typePWF
windvtkDisplay.ScalarOpacityUnitDistance = 0.08660254037844385

# init the 'PiecewiseFunction' selected for 'OSPRayScaleFunction'
windvtkDisplay.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'
windvtkDisplay.ScaleTransferFunction.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 'OpacityTransferFunction'
windvtkDisplay.OpacityTransferFunction.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]

# 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
windvtkDisplay.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(windvtk)
# ----------------------------------------------------------------