online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
# trace generated using paraview version 5.10.1 #import paraview #paraview.compatibility.major = 5 #paraview.compatibility.minor = 10 #### import the simple module from the paraview from paraview.simple import * #### disable automatic camera reset on 'Show' paraview.simple._DisableFirstRenderCameraReset() # load plugin LoadPlugin('C:/Program Files/ParaView 5.10.1-Windows-Python3.9-msvc2017-AMD64/bin/paraview-5.10/plugins/TopologyToolKit/TopologyToolKit.dll', remote=False, ns=globals()) # create a new 'STL Reader' terrainstl = STLReader(registrationName='terrain.stl', FileNames=['C:/work/paraview Projs/terrain pipeline for pvpython/public/terrain.stl']) # get active view renderView1 = GetActiveViewOrCreate('RenderView') # show data in view terrainstlDisplay = Show(terrainstl, renderView1, 'GeometryRepresentation') # trace defaults for the display properties. terrainstlDisplay.Representation = 'Surface' terrainstlDisplay.ColorArrayName = [None, ''] terrainstlDisplay.SelectTCoordArray = 'None' terrainstlDisplay.SelectNormalArray = 'None' terrainstlDisplay.SelectTangentArray = 'None' terrainstlDisplay.OSPRayScaleFunction = 'PiecewiseFunction' terrainstlDisplay.SelectOrientationVectors = 'None' terrainstlDisplay.ScaleFactor = 0.2 terrainstlDisplay.SelectScaleArray = 'None' terrainstlDisplay.GlyphType = 'Arrow' terrainstlDisplay.GlyphTableIndexArray = 'None' terrainstlDisplay.GaussianRadius = 0.01 terrainstlDisplay.SetScaleArray = [None, ''] terrainstlDisplay.ScaleTransferFunction = 'PiecewiseFunction' terrainstlDisplay.OpacityArray = [None, ''] terrainstlDisplay.OpacityTransferFunction = 'PiecewiseFunction' terrainstlDisplay.DataAxesGrid = 'GridAxesRepresentation' terrainstlDisplay.PolarAxes = 'PolarAxesRepresentation' # reset view to fit data renderView1.ResetCamera(False) # get the material library materialLibrary1 = GetMaterialLibrary() # update the view to ensure updated data information renderView1.Update() # create a new 'TTK GeometrySmoother' tTKGeometrySmoother1 = TTKGeometrySmoother(registrationName='TTKGeometrySmoother1', Input=terrainstl) tTKGeometrySmoother1.InputMaskField = [None, ''] # Properties modified on tTKGeometrySmoother1 tTKGeometrySmoother1.IterationNumber = 3 tTKGeometrySmoother1.InputMaskField = ['POINTS', ''] # show data in view tTKGeometrySmoother1Display = Show(tTKGeometrySmoother1, renderView1, 'GeometryRepresentation') # trace defaults for the display properties. tTKGeometrySmoother1Display.Representation = 'Surface' tTKGeometrySmoother1Display.ColorArrayName = [None, ''] tTKGeometrySmoother1Display.SelectTCoordArray = 'None' tTKGeometrySmoother1Display.SelectNormalArray = 'None' tTKGeometrySmoother1Display.SelectTangentArray = 'None' tTKGeometrySmoother1Display.OSPRayScaleFunction = 'PiecewiseFunction' tTKGeometrySmoother1Display.SelectOrientationVectors = 'None' tTKGeometrySmoother1Display.ScaleFactor = 0.19362616539001465 tTKGeometrySmoother1Display.SelectScaleArray = 'None' tTKGeometrySmoother1Display.GlyphType = 'Arrow' tTKGeometrySmoother1Display.GlyphTableIndexArray = 'None' tTKGeometrySmoother1Display.GaussianRadius = 0.009681308269500732 tTKGeometrySmoother1Display.SetScaleArray = [None, ''] tTKGeometrySmoother1Display.ScaleTransferFunction = 'PiecewiseFunction' tTKGeometrySmoother1Display.OpacityArray = [None, ''] tTKGeometrySmoother1Display.OpacityTransferFunction = 'PiecewiseFunction' tTKGeometrySmoother1Display.DataAxesGrid = 'GridAxesRepresentation' tTKGeometrySmoother1Display.PolarAxes = 'PolarAxesRepresentation' # hide data in view Hide(terrainstl, renderView1) # update the view to ensure updated data information renderView1.Update() # create a new 'Elevation' elevation1 = Elevation(registrationName='Elevation1', Input=tTKGeometrySmoother1) elevation1.LowPoint = [0.7328042387962341, 0.6944444179534912, 10.2809419631958] elevation1.HighPoint = [4102.29638671875, 1854.2105712890625, 497.332763671875] # Properties modified on elevation1 elevation1.ScalarRange = [0.0, 100.0] # show data in view elevation1Display = Show(elevation1, renderView1, 'GeometryRepresentation') # get color transfer function/color map for 'Elevation' elevationLUT = GetColorTransferFunction('Elevation') # trace defaults for the display properties. elevation1Display.Representation = 'Surface' elevation1Display.ColorArrayName = ['POINTS', 'Elevation'] elevation1Display.LookupTable = elevationLUT elevation1Display.SelectTCoordArray = 'None' elevation1Display.SelectNormalArray = 'None' elevation1Display.SelectTangentArray = 'None' elevation1Display.OSPRayScaleArray = 'Elevation' elevation1Display.OSPRayScaleFunction = 'PiecewiseFunction' elevation1Display.SelectOrientationVectors = 'None' elevation1Display.ScaleFactor = 410.1563582479954 elevation1Display.SelectScaleArray = 'Elevation' elevation1Display.GlyphType = 'Arrow' elevation1Display.GlyphTableIndexArray = 'Elevation' elevation1Display.GaussianRadius = 20.50781791239977 elevation1Display.SetScaleArray = ['POINTS', 'Elevation'] elevation1Display.ScaleTransferFunction = 'PiecewiseFunction' elevation1Display.OpacityArray = ['POINTS', 'Elevation'] elevation1Display.OpacityTransferFunction = 'PiecewiseFunction' elevation1Display.DataAxesGrid = 'GridAxesRepresentation' elevation1Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' elevation1Display.ScaleTransferFunction.Points = [0.3206784725189209, 0.0, 0.5, 0.0, 99.12332153320312, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' elevation1Display.OpacityTransferFunction.Points = [0.3206784725189209, 0.0, 0.5, 0.0, 99.12332153320312, 1.0, 0.5, 0.0] # hide data in view Hide(tTKGeometrySmoother1, renderView1) # show color bar/color legend elevation1Display.SetScalarBarVisibility(renderView1, True) # update the view to ensure updated data information renderView1.Update() # get opacity transfer function/opacity map for 'Elevation' elevationPWF = GetOpacityTransferFunction('Elevation') # Properties modified on elevation1 elevation1.LowPoint = [2051.514595478773, 927.452507853508, 10.2809419631958] elevation1.HighPoint = [2051.514595478773, 927.452507853508, 497.332763671875] # update the view to ensure updated data information renderView1.Update() # Rescale transfer function elevationLUT.RescaleTransferFunction(0.0, 100.0) # Rescale transfer function elevationPWF.RescaleTransferFunction(0.0, 100.0) # get layout layout1 = GetLayout() # split cell layout1.SplitHorizontal(0, 0.5) # set active view SetActiveView(None) # create a new 'TTK PersistenceCurve' tTKPersistenceCurve1 = TTKPersistenceCurve(registrationName='TTKPersistenceCurve1', Input=elevation1) tTKPersistenceCurve1.ScalarField = ['POINTS', 'Elevation'] tTKPersistenceCurve1.InputOffsetField = ['POINTS', 'Elevation'] # Create a new 'Line Chart View' lineChartView1 = CreateView('XYChartView') # show data in view tTKPersistenceCurve1Display = Show(tTKPersistenceCurve1, lineChartView1, 'XYChartRepresentation') # trace defaults for the display properties. tTKPersistenceCurve1Display.AttributeType = 'Row Data' tTKPersistenceCurve1Display.XArrayName = 'Number Of Pairs (minimum-saddle pairs)' tTKPersistenceCurve1Display.SeriesVisibility = ['Number Of Pairs (minimum-saddle pairs)', 'Persistence (minimum-saddle pairs)'] tTKPersistenceCurve1Display.SeriesLabel = ['Number Of Pairs (minimum-saddle pairs)', 'Number Of Pairs (minimum-saddle pairs)', 'Persistence (minimum-saddle pairs)', 'Persistence (minimum-saddle pairs)'] tTKPersistenceCurve1Display.SeriesColor = ['Number Of Pairs (minimum-saddle pairs)', '0', '0', '0', 'Persistence (minimum-saddle pairs)', '0.8899977111467154', '0.10000762951094835', '0.1100022888532845'] tTKPersistenceCurve1Display.SeriesPlotCorner = ['Number Of Pairs (minimum-saddle pairs)', '0', 'Persistence (minimum-saddle pairs)', '0'] tTKPersistenceCurve1Display.SeriesLabelPrefix = '' tTKPersistenceCurve1Display.SeriesLineStyle = ['Number Of Pairs (minimum-saddle pairs)', '1', 'Persistence (minimum-saddle pairs)', '1'] tTKPersistenceCurve1Display.SeriesLineThickness = ['Number Of Pairs (minimum-saddle pairs)', '2', 'Persistence (minimum-saddle pairs)', '2'] tTKPersistenceCurve1Display.SeriesMarkerStyle = ['Number Of Pairs (minimum-saddle pairs)', '0', 'Persistence (minimum-saddle pairs)', '0'] tTKPersistenceCurve1Display.SeriesMarkerSize = ['Number Of Pairs (minimum-saddle pairs)', '4', 'Persistence (minimum-saddle pairs)', '4'] # add view to a layout so it's visible in UI AssignViewToLayout(view=lineChartView1, layout=layout1, hint=2) # show data in view tTKPersistenceCurve1Display_1 = Show(OutputPort(tTKPersistenceCurve1, 1), lineChartView1, 'XYChartRepresentation') # trace defaults for the display properties. tTKPersistenceCurve1Display_1.AttributeType = 'Row Data' tTKPersistenceCurve1Display_1.SeriesLabelPrefix = '' # show data in view tTKPersistenceCurve1Display_2 = Show(OutputPort(tTKPersistenceCurve1, 2), lineChartView1, 'XYChartRepresentation') # trace defaults for the display properties. tTKPersistenceCurve1Display_2.AttributeType = 'Row Data' tTKPersistenceCurve1Display_2.XArrayName = 'Number Of Pairs (maximum-saddle pairs)' tTKPersistenceCurve1Display_2.SeriesVisibility = ['Number Of Pairs (maximum-saddle pairs)', 'Persistence (maximum-saddle pairs)'] tTKPersistenceCurve1Display_2.SeriesLabel = ['Number Of Pairs (maximum-saddle pairs)', 'Number Of Pairs (maximum-saddle pairs)', 'Persistence (maximum-saddle pairs)', 'Persistence (maximum-saddle pairs)'] tTKPersistenceCurve1Display_2.SeriesColor = ['Number Of Pairs (maximum-saddle pairs)', '0', '0', '0', 'Persistence (maximum-saddle pairs)', '0.89', '0.1', '0.11'] tTKPersistenceCurve1Display_2.SeriesPlotCorner = ['Number Of Pairs (maximum-saddle pairs)', '0', 'Persistence (maximum-saddle pairs)', '0'] tTKPersistenceCurve1Display_2.SeriesLabelPrefix = '' tTKPersistenceCurve1Display_2.SeriesLineStyle = ['Number Of Pairs (maximum-saddle pairs)', '1', 'Persistence (maximum-saddle pairs)', '1'] tTKPersistenceCurve1Display_2.SeriesLineThickness = ['Number Of Pairs (maximum-saddle pairs)', '2', 'Persistence (maximum-saddle pairs)', '2'] tTKPersistenceCurve1Display_2.SeriesMarkerStyle = ['Number Of Pairs (maximum-saddle pairs)', '0', 'Persistence (maximum-saddle pairs)', '0'] tTKPersistenceCurve1Display_2.SeriesMarkerSize = ['Number Of Pairs (maximum-saddle pairs)', '4', 'Persistence (maximum-saddle pairs)', '4'] # show data in view tTKPersistenceCurve1Display_3 = Show(OutputPort(tTKPersistenceCurve1, 3), lineChartView1, 'XYChartRepresentation') # trace defaults for the display properties. tTKPersistenceCurve1Display_3.AttributeType = 'Row Data' tTKPersistenceCurve1Display_3.XArrayName = 'Number Of Pairs (all pairs)' tTKPersistenceCurve1Display_3.SeriesVisibility = ['Number Of Pairs (all pairs)', 'Persistence (all pairs)'] tTKPersistenceCurve1Display_3.SeriesLabel = ['Number Of Pairs (all pairs)', 'Number Of Pairs (all pairs)', 'Persistence (all pairs)', 'Persistence (all pairs)'] tTKPersistenceCurve1Display_3.SeriesColor = ['Number Of Pairs (all pairs)', '0', '0', '0', 'Persistence (all pairs)', '0.89', '0.1', '0.11'] tTKPersistenceCurve1Display_3.SeriesPlotCorner = ['Number Of Pairs (all pairs)', '0', 'Persistence (all pairs)', '0'] tTKPersistenceCurve1Display_3.SeriesLabelPrefix = '' tTKPersistenceCurve1Display_3.SeriesLineStyle = ['Number Of Pairs (all pairs)', '1', 'Persistence (all pairs)', '1'] tTKPersistenceCurve1Display_3.SeriesLineThickness = ['Number Of Pairs (all pairs)', '2', 'Persistence (all pairs)', '2'] tTKPersistenceCurve1Display_3.SeriesMarkerStyle = ['Number Of Pairs (all pairs)', '0', 'Persistence (all pairs)', '0'] tTKPersistenceCurve1Display_3.SeriesMarkerSize = ['Number Of Pairs (all pairs)', '4', 'Persistence (all pairs)', '4'] # update the view to ensure updated data information lineChartView1.Update() # set active source SetActiveSource(tTKPersistenceCurve1) # Properties modified on tTKPersistenceCurve1Display_3 tTKPersistenceCurve1Display_3.UseIndexForXAxis = 0 # Properties modified on tTKPersistenceCurve1Display_3 tTKPersistenceCurve1Display_3.XArrayName = 'Persistence (all pairs)' # Properties modified on tTKPersistenceCurve1Display_3 tTKPersistenceCurve1Display_3.SeriesVisibility = ['Number Of Pairs (all pairs)'] # hide data in view Hide(tTKPersistenceCurve1, lineChartView1) # hide data in view Hide(OutputPort(tTKPersistenceCurve1, 1), lineChartView1) # hide data in view Hide(OutputPort(tTKPersistenceCurve1, 2), lineChartView1) # Properties modified on lineChartView1 lineChartView1.LeftAxisLogScale = 1 # Properties modified on lineChartView1 lineChartView1.LeftAxisUseCustomRange = 1 # Properties modified on lineChartView1 lineChartView1.LeftAxisUseCustomRange = 0 # Properties modified on lineChartView1 lineChartView1.LeftAxisUseCustomRange = 1 # Properties modified on lineChartView1 lineChartView1.LeftAxisTitle = 'Number of Pairs' # Properties modified on lineChartView1 lineChartView1.BottomAxisTitle = 'Persistance' # Properties modified on lineChartView1 lineChartView1.BottomAxisLogScale = 1 # Properties modified on lineChartView1 lineChartView1.BottomAxisUseCustomRange = 1 # split cell layout1.SplitVertical(2, 0.5) # set active view SetActiveView(None) # Create a new 'Render View' renderView2 = CreateView('RenderView') renderView2.AxesGrid = 'GridAxes3DActor' renderView2.StereoType = 'Crystal Eyes' renderView2.CameraFocalDisk = 1.0 renderView2.BackEnd = 'OSPRay raycaster' renderView2.OSPRayMaterialLibrary = materialLibrary1 # assign view to a particular cell in the layout AssignViewToLayout(view=renderView2, layout=layout1, hint=6) # set active source SetActiveSource(elevation1) # create a new 'TTK PersistenceDiagram' tTKPersistenceDiagram1 = TTKPersistenceDiagram(registrationName='TTKPersistenceDiagram1', Input=elevation1) tTKPersistenceDiagram1.ScalarField = ['POINTS', 'Elevation'] tTKPersistenceDiagram1.InputOffsetField = ['POINTS', 'Elevation'] # show data in view tTKPersistenceDiagram1Display = Show(tTKPersistenceDiagram1, renderView2, 'UnstructuredGridRepresentation') # trace defaults for the display properties. tTKPersistenceDiagram1Display.Representation = 'Surface' tTKPersistenceDiagram1Display.ColorArrayName = [None, ''] tTKPersistenceDiagram1Display.SelectTCoordArray = 'None' tTKPersistenceDiagram1Display.SelectNormalArray = 'None' tTKPersistenceDiagram1Display.SelectTangentArray = 'None' tTKPersistenceDiagram1Display.OSPRayScaleArray = 'Coordinates' tTKPersistenceDiagram1Display.OSPRayScaleFunction = 'PiecewiseFunction' tTKPersistenceDiagram1Display.SelectOrientationVectors = 'Coordinates' tTKPersistenceDiagram1Display.ScaleFactor = 10.0 tTKPersistenceDiagram1Display.SelectScaleArray = 'Coordinates' tTKPersistenceDiagram1Display.GlyphType = 'Arrow' tTKPersistenceDiagram1Display.GlyphTableIndexArray = 'Coordinates' tTKPersistenceDiagram1Display.GaussianRadius = 0.5 tTKPersistenceDiagram1Display.SetScaleArray = ['POINTS', 'Coordinates'] tTKPersistenceDiagram1Display.ScaleTransferFunction = 'PiecewiseFunction' tTKPersistenceDiagram1Display.OpacityArray = ['POINTS', 'Coordinates'] tTKPersistenceDiagram1Display.OpacityTransferFunction = 'PiecewiseFunction' tTKPersistenceDiagram1Display.DataAxesGrid = 'GridAxesRepresentation' tTKPersistenceDiagram1Display.PolarAxes = 'PolarAxesRepresentation' tTKPersistenceDiagram1Display.ScalarOpacityUnitDistance = 28.732468942394977 tTKPersistenceDiagram1Display.OpacityArrayName = ['POINTS', 'Coordinates'] # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKPersistenceDiagram1Display.ScaleTransferFunction.Points = [-0.9782790541648865, 0.0, 0.5, 0.0, 0.9579825401306152, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKPersistenceDiagram1Display.OpacityTransferFunction.Points = [-0.9782790541648865, 0.0, 0.5, 0.0, 0.9579825401306152, 1.0, 0.5, 0.0] # reset view to fit data renderView2.ResetCamera(False) #changing interaction mode based on data extents renderView2.InteractionMode = '2D' renderView2.CameraPosition = [40.55738830566406, 50.0, 10000.0] renderView2.CameraFocalPoint = [40.55738830566406, 50.0, 0.0] # update the view to ensure updated data information renderView2.Update() # Properties modified on renderView2.AxesGrid renderView2.AxesGrid.Visibility = 1 # Properties modified on renderView2.AxesGrid renderView2.AxesGrid.XTitle = 'Birth' renderView2.AxesGrid.YTitle = 'Death' # create a new 'Threshold' threshold1 = Threshold(registrationName='Threshold1', Input=tTKPersistenceDiagram1) threshold1.Scalars = ['POINTS', 'CriticalType'] threshold1.UpperThreshold = 3.0 # Properties modified on threshold1 threshold1.Scalars = ['CELLS', 'PairIdentifier'] threshold1.LowerThreshold = -1.0 threshold1.UpperThreshold = -0.1 # show data in view threshold1Display = Show(threshold1, renderView2, 'UnstructuredGridRepresentation') # trace defaults for the display properties. threshold1Display.Representation = 'Surface' threshold1Display.ColorArrayName = [None, ''] threshold1Display.SelectTCoordArray = 'None' threshold1Display.SelectNormalArray = 'None' threshold1Display.SelectTangentArray = 'None' threshold1Display.OSPRayScaleArray = 'Coordinates' threshold1Display.OSPRayScaleFunction = 'PiecewiseFunction' threshold1Display.SelectOrientationVectors = 'Coordinates' threshold1Display.ScaleFactor = 8.111477661132813 threshold1Display.SelectScaleArray = 'Coordinates' threshold1Display.GlyphType = 'Arrow' threshold1Display.GlyphTableIndexArray = 'Coordinates' threshold1Display.GaussianRadius = 0.40557388305664066 threshold1Display.SetScaleArray = ['POINTS', 'Coordinates'] threshold1Display.ScaleTransferFunction = 'PiecewiseFunction' threshold1Display.OpacityArray = ['POINTS', 'Coordinates'] threshold1Display.OpacityTransferFunction = 'PiecewiseFunction' threshold1Display.DataAxesGrid = 'GridAxesRepresentation' threshold1Display.PolarAxes = 'PolarAxesRepresentation' threshold1Display.ScalarOpacityUnitDistance = 114.71361719260416 threshold1Display.OpacityArrayName = ['POINTS', 'Coordinates'] # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' threshold1Display.ScaleTransferFunction.Points = [0.7552358508110046, 0.0, 0.5, 0.0, 0.8329824805259705, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' threshold1Display.OpacityTransferFunction.Points = [0.7552358508110046, 0.0, 0.5, 0.0, 0.8329824805259705, 1.0, 0.5, 0.0] # hide data in view Hide(tTKPersistenceDiagram1, renderView2) # update the view to ensure updated data information renderView2.Update() # create a new 'Extract Surface' extractSurface1 = ExtractSurface(registrationName='ExtractSurface1', Input=threshold1) # show data in view extractSurface1Display = Show(extractSurface1, renderView2, 'GeometryRepresentation') # trace defaults for the display properties. extractSurface1Display.Representation = 'Surface' extractSurface1Display.ColorArrayName = [None, ''] extractSurface1Display.SelectTCoordArray = 'None' extractSurface1Display.SelectNormalArray = 'None' extractSurface1Display.SelectTangentArray = 'None' extractSurface1Display.OSPRayScaleArray = 'Coordinates' extractSurface1Display.OSPRayScaleFunction = 'PiecewiseFunction' extractSurface1Display.SelectOrientationVectors = 'Coordinates' extractSurface1Display.ScaleFactor = 8.111477661132813 extractSurface1Display.SelectScaleArray = 'Coordinates' extractSurface1Display.GlyphType = 'Arrow' extractSurface1Display.GlyphTableIndexArray = 'Coordinates' extractSurface1Display.GaussianRadius = 0.40557388305664066 extractSurface1Display.SetScaleArray = ['POINTS', 'Coordinates'] extractSurface1Display.ScaleTransferFunction = 'PiecewiseFunction' extractSurface1Display.OpacityArray = ['POINTS', 'Coordinates'] extractSurface1Display.OpacityTransferFunction = 'PiecewiseFunction' extractSurface1Display.DataAxesGrid = 'GridAxesRepresentation' extractSurface1Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' extractSurface1Display.ScaleTransferFunction.Points = [0.7552358508110046, 0.0, 0.5, 0.0, 0.8329824805259705, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' extractSurface1Display.OpacityTransferFunction.Points = [0.7552358508110046, 0.0, 0.5, 0.0, 0.8329824805259705, 1.0, 0.5, 0.0] # hide data in view Hide(threshold1, renderView2) # update the view to ensure updated data information renderView2.Update() # create a new 'Tube' tube1 = Tube(registrationName='Tube1', Input=extractSurface1) tube1.Scalars = ['POINTS', 'CriticalType'] tube1.Vectors = ['POINTS', 'Coordinates'] tube1.Radius = 0.8111477661132813 # show data in view tube1Display = Show(tube1, renderView2, 'GeometryRepresentation') # trace defaults for the display properties. tube1Display.Representation = 'Surface' tube1Display.ColorArrayName = [None, ''] tube1Display.SelectTCoordArray = 'None' tube1Display.SelectNormalArray = 'TubeNormals' tube1Display.SelectTangentArray = 'None' tube1Display.OSPRayScaleArray = 'Coordinates' tube1Display.OSPRayScaleFunction = 'PiecewiseFunction' tube1Display.SelectOrientationVectors = 'Coordinates' tube1Display.ScaleFactor = 8.210822814702988 tube1Display.SelectScaleArray = 'Coordinates' tube1Display.GlyphType = 'Arrow' tube1Display.GlyphTableIndexArray = 'Coordinates' tube1Display.GaussianRadius = 0.4105411407351494 tube1Display.SetScaleArray = ['POINTS', 'Coordinates'] tube1Display.ScaleTransferFunction = 'PiecewiseFunction' tube1Display.OpacityArray = ['POINTS', 'Coordinates'] tube1Display.OpacityTransferFunction = 'PiecewiseFunction' tube1Display.DataAxesGrid = 'GridAxesRepresentation' tube1Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tube1Display.ScaleTransferFunction.Points = [0.7552358508110046, 0.0, 0.5, 0.0, 0.8329824805259705, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tube1Display.OpacityTransferFunction.Points = [0.7552358508110046, 0.0, 0.5, 0.0, 0.8329824805259705, 1.0, 0.5, 0.0] # hide data in view Hide(extractSurface1, renderView2) # update the view to ensure updated data information renderView2.Update() # set active source SetActiveSource(tTKPersistenceDiagram1) # create a new 'Threshold' threshold2 = Threshold(registrationName='Threshold2', Input=tTKPersistenceDiagram1) threshold2.Scalars = ['POINTS', 'CriticalType'] threshold2.UpperThreshold = 3.0 # Properties modified on threshold2 threshold2.Scalars = ['CELLS', 'PairIdentifier'] threshold2.LowerThreshold = -0.1 threshold2.UpperThreshold = 88.0 # show data in view threshold2Display = Show(threshold2, renderView2, 'UnstructuredGridRepresentation') # trace defaults for the display properties. threshold2Display.Representation = 'Surface' threshold2Display.ColorArrayName = [None, ''] threshold2Display.SelectTCoordArray = 'None' threshold2Display.SelectNormalArray = 'None' threshold2Display.SelectTangentArray = 'None' threshold2Display.OSPRayScaleArray = 'Coordinates' threshold2Display.OSPRayScaleFunction = 'PiecewiseFunction' threshold2Display.SelectOrientationVectors = 'Coordinates' threshold2Display.ScaleFactor = 10.0 threshold2Display.SelectScaleArray = 'Coordinates' threshold2Display.GlyphType = 'Arrow' threshold2Display.GlyphTableIndexArray = 'Coordinates' threshold2Display.GaussianRadius = 0.5 threshold2Display.SetScaleArray = ['POINTS', 'Coordinates'] threshold2Display.ScaleTransferFunction = 'PiecewiseFunction' threshold2Display.OpacityArray = ['POINTS', 'Coordinates'] threshold2Display.OpacityTransferFunction = 'PiecewiseFunction' threshold2Display.DataAxesGrid = 'GridAxesRepresentation' threshold2Display.PolarAxes = 'PolarAxesRepresentation' threshold2Display.ScalarOpacityUnitDistance = 28.839680640692272 threshold2Display.OpacityArrayName = ['POINTS', 'Coordinates'] # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' threshold2Display.ScaleTransferFunction.Points = [-0.9782790541648865, 0.0, 0.5, 0.0, 0.9579825401306152, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' threshold2Display.OpacityTransferFunction.Points = [-0.9782790541648865, 0.0, 0.5, 0.0, 0.9579825401306152, 1.0, 0.5, 0.0] # hide data in view Hide(tTKPersistenceDiagram1, renderView2) # update the view to ensure updated data information renderView2.Update() # rename source object RenameSource('PersistancePairs', threshold2) # create a new 'Threshold' threshold2_1 = Threshold(registrationName='Threshold2', Input=threshold2) threshold2_1.Scalars = ['POINTS', 'CriticalType'] threshold2_1.UpperThreshold = 3.0 # Properties modified on threshold2_1 threshold2_1.Scalars = ['CELLS', 'Persistence'] threshold2_1.LowerThreshold = 10.0 threshold2_1.UpperThreshold = 100.0 # show data in view threshold2_1Display = Show(threshold2_1, renderView2, 'UnstructuredGridRepresentation') # trace defaults for the display properties. threshold2_1Display.Representation = 'Surface' threshold2_1Display.ColorArrayName = [None, ''] threshold2_1Display.SelectTCoordArray = 'None' threshold2_1Display.SelectNormalArray = 'None' threshold2_1Display.SelectTangentArray = 'None' threshold2_1Display.OSPRayScaleArray = 'Coordinates' threshold2_1Display.OSPRayScaleFunction = 'PiecewiseFunction' threshold2_1Display.SelectOrientationVectors = 'Coordinates' threshold2_1Display.ScaleFactor = 10.0 threshold2_1Display.SelectScaleArray = 'Coordinates' threshold2_1Display.GlyphType = 'Arrow' threshold2_1Display.GlyphTableIndexArray = 'Coordinates' threshold2_1Display.GaussianRadius = 0.5 threshold2_1Display.SetScaleArray = ['POINTS', 'Coordinates'] threshold2_1Display.ScaleTransferFunction = 'PiecewiseFunction' threshold2_1Display.OpacityArray = ['POINTS', 'Coordinates'] threshold2_1Display.OpacityTransferFunction = 'PiecewiseFunction' threshold2_1Display.DataAxesGrid = 'GridAxesRepresentation' threshold2_1Display.PolarAxes = 'PolarAxesRepresentation' threshold2_1Display.ScalarOpacityUnitDistance = 83.0863658089141 threshold2_1Display.OpacityArrayName = ['POINTS', 'Coordinates'] # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' threshold2_1Display.ScaleTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' threshold2_1Display.OpacityTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # hide data in view Hide(threshold2, renderView2) # update the view to ensure updated data information renderView2.Update() # set active source SetActiveSource(threshold2) # Properties modified on threshold2 threshold2.UpperThreshold = 100.0 # update the view to ensure updated data information renderView2.Update() # set active source SetActiveSource(threshold2_1) # rename source object RenameSource('PersistanceThreshold', threshold2_1) # create a new 'TTK IcospheresFromPoints' tTKIcospheresFromPoints1 = TTKIcospheresFromPoints(registrationName='TTKIcospheresFromPoints1', Input=threshold2_1) # show data in view tTKIcospheresFromPoints1Display = Show(tTKIcospheresFromPoints1, renderView2, 'GeometryRepresentation') # trace defaults for the display properties. tTKIcospheresFromPoints1Display.Representation = 'Surface' tTKIcospheresFromPoints1Display.ColorArrayName = [None, ''] tTKIcospheresFromPoints1Display.SelectTCoordArray = 'None' tTKIcospheresFromPoints1Display.SelectNormalArray = 'Normals' tTKIcospheresFromPoints1Display.SelectTangentArray = 'None' tTKIcospheresFromPoints1Display.OSPRayScaleArray = 'Coordinates' tTKIcospheresFromPoints1Display.OSPRayScaleFunction = 'PiecewiseFunction' tTKIcospheresFromPoints1Display.SelectOrientationVectors = 'Coordinates' tTKIcospheresFromPoints1Display.ScaleFactor = 10.200000000000001 tTKIcospheresFromPoints1Display.SelectScaleArray = 'Coordinates' tTKIcospheresFromPoints1Display.GlyphType = 'Arrow' tTKIcospheresFromPoints1Display.GlyphTableIndexArray = 'Coordinates' tTKIcospheresFromPoints1Display.GaussianRadius = 0.51 tTKIcospheresFromPoints1Display.SetScaleArray = ['POINTS', 'Coordinates'] tTKIcospheresFromPoints1Display.ScaleTransferFunction = 'PiecewiseFunction' tTKIcospheresFromPoints1Display.OpacityArray = ['POINTS', 'Coordinates'] tTKIcospheresFromPoints1Display.OpacityTransferFunction = 'PiecewiseFunction' tTKIcospheresFromPoints1Display.DataAxesGrid = 'GridAxesRepresentation' tTKIcospheresFromPoints1Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKIcospheresFromPoints1Display.ScaleTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKIcospheresFromPoints1Display.OpacityTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # update the view to ensure updated data information renderView2.Update() # Properties modified on tTKIcospheresFromPoints1 tTKIcospheresFromPoints1.Radius = 2.0 # update the view to ensure updated data information renderView2.Update() # set scalar coloring ColorBy(tTKIcospheresFromPoints1Display, ('POINTS', 'CriticalType')) # rescale color and/or opacity maps used to include current data range tTKIcospheresFromPoints1Display.RescaleTransferFunctionToDataRange(True, False) # show color bar/color legend tTKIcospheresFromPoints1Display.SetScalarBarVisibility(renderView2, True) # get color transfer function/color map for 'CriticalType' criticalTypeLUT = GetColorTransferFunction('CriticalType') criticalTypeLUT.RGBPoints = [0.0, 0.231373, 0.298039, 0.752941, 1.5, 0.865003, 0.865003, 0.865003, 3.0, 0.705882, 0.0156863, 0.14902] criticalTypeLUT.ScalarRangeInitialized = 1.0 # get opacity transfer function/opacity map for 'CriticalType' criticalTypePWF = GetOpacityTransferFunction('CriticalType') criticalTypePWF.Points = [0.0, 0.0, 0.5, 0.0, 3.0, 1.0, 0.5, 0.0] criticalTypePWF.ScalarRangeInitialized = 1 # set active source SetActiveSource(threshold2) # set active source SetActiveSource(threshold2_1) # create a new 'Extract Surface' extractSurface2 = ExtractSurface(registrationName='ExtractSurface2', Input=threshold2_1) # show data in view extractSurface2Display = Show(extractSurface2, renderView2, 'GeometryRepresentation') # trace defaults for the display properties. extractSurface2Display.Representation = 'Surface' extractSurface2Display.ColorArrayName = [None, ''] extractSurface2Display.SelectTCoordArray = 'None' extractSurface2Display.SelectNormalArray = 'None' extractSurface2Display.SelectTangentArray = 'None' extractSurface2Display.OSPRayScaleArray = 'Coordinates' extractSurface2Display.OSPRayScaleFunction = 'PiecewiseFunction' extractSurface2Display.SelectOrientationVectors = 'Coordinates' extractSurface2Display.ScaleFactor = 10.0 extractSurface2Display.SelectScaleArray = 'Coordinates' extractSurface2Display.GlyphType = 'Arrow' extractSurface2Display.GlyphTableIndexArray = 'Coordinates' extractSurface2Display.GaussianRadius = 0.5 extractSurface2Display.SetScaleArray = ['POINTS', 'Coordinates'] extractSurface2Display.ScaleTransferFunction = 'PiecewiseFunction' extractSurface2Display.OpacityArray = ['POINTS', 'Coordinates'] extractSurface2Display.OpacityTransferFunction = 'PiecewiseFunction' extractSurface2Display.DataAxesGrid = 'GridAxesRepresentation' extractSurface2Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' extractSurface2Display.ScaleTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' extractSurface2Display.OpacityTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # hide data in view Hide(threshold2_1, renderView2) # update the view to ensure updated data information renderView2.Update() # create a new 'Tube' tube2 = Tube(registrationName='Tube2', Input=extractSurface2) tube2.Scalars = ['POINTS', 'CriticalType'] tube2.Vectors = ['POINTS', 'Coordinates'] # show data in view tube2Display = Show(tube2, renderView2, 'GeometryRepresentation') # trace defaults for the display properties. tube2Display.Representation = 'Surface' tube2Display.ColorArrayName = [None, ''] tube2Display.SelectTCoordArray = 'None' tube2Display.SelectNormalArray = 'TubeNormals' tube2Display.SelectTangentArray = 'None' tube2Display.OSPRayScaleArray = 'Coordinates' tube2Display.OSPRayScaleFunction = 'PiecewiseFunction' tube2Display.SelectOrientationVectors = 'Coordinates' tube2Display.ScaleFactor = 10.0 tube2Display.SelectScaleArray = 'Coordinates' tube2Display.GlyphType = 'Arrow' tube2Display.GlyphTableIndexArray = 'Coordinates' tube2Display.GaussianRadius = 0.5 tube2Display.SetScaleArray = ['POINTS', 'Coordinates'] tube2Display.ScaleTransferFunction = 'PiecewiseFunction' tube2Display.OpacityArray = ['POINTS', 'Coordinates'] tube2Display.OpacityTransferFunction = 'PiecewiseFunction' tube2Display.DataAxesGrid = 'GridAxesRepresentation' tube2Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tube2Display.ScaleTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tube2Display.OpacityTransferFunction.Points = [-0.8737168312072754, 0.0, 0.5, 0.0, 0.7552358508110046, 1.0, 0.5, 0.0] # hide data in view Hide(extractSurface2, renderView2) # update the view to ensure updated data information renderView2.Update() # Properties modified on tube2 tube2.Radius = 0.75 # update the view to ensure updated data information renderView2.Update() # set active view SetActiveView(renderView1) # set active source SetActiveSource(elevation1) # create a new 'TTK TopologicalSimplification' tTKTopologicalSimplification1 = TTKTopologicalSimplification(registrationName='TTKTopologicalSimplification1', Domain=elevation1, Constraints=threshold2_1) tTKTopologicalSimplification1.ScalarField = ['POINTS', 'Elevation'] tTKTopologicalSimplification1.InputOffsetField = ['POINTS', 'Elevation'] tTKTopologicalSimplification1.VertexIdentifierField = ['POINTS', 'CriticalType'] # show data in view tTKTopologicalSimplification1Display = Show(tTKTopologicalSimplification1, renderView1, 'GeometryRepresentation') # trace defaults for the display properties. tTKTopologicalSimplification1Display.Representation = 'Surface' tTKTopologicalSimplification1Display.ColorArrayName = ['POINTS', 'Elevation'] tTKTopologicalSimplification1Display.LookupTable = elevationLUT tTKTopologicalSimplification1Display.SelectTCoordArray = 'None' tTKTopologicalSimplification1Display.SelectNormalArray = 'None' tTKTopologicalSimplification1Display.SelectTangentArray = 'None' tTKTopologicalSimplification1Display.OSPRayScaleArray = 'Elevation' tTKTopologicalSimplification1Display.OSPRayScaleFunction = 'PiecewiseFunction' tTKTopologicalSimplification1Display.SelectOrientationVectors = 'None' tTKTopologicalSimplification1Display.ScaleFactor = 0.19362616539001465 tTKTopologicalSimplification1Display.SelectScaleArray = 'Elevation' tTKTopologicalSimplification1Display.GlyphType = 'Arrow' tTKTopologicalSimplification1Display.GlyphTableIndexArray = 'Elevation' tTKTopologicalSimplification1Display.GaussianRadius = 0.009681308269500732 tTKTopologicalSimplification1Display.SetScaleArray = ['POINTS', 'Elevation'] tTKTopologicalSimplification1Display.ScaleTransferFunction = 'PiecewiseFunction' tTKTopologicalSimplification1Display.OpacityArray = ['POINTS', 'Elevation'] tTKTopologicalSimplification1Display.OpacityTransferFunction = 'PiecewiseFunction' tTKTopologicalSimplification1Display.DataAxesGrid = 'GridAxesRepresentation' tTKTopologicalSimplification1Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKTopologicalSimplification1Display.ScaleTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKTopologicalSimplification1Display.OpacityTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # hide data in view Hide(elevation1, renderView1) # show color bar/color legend tTKTopologicalSimplification1Display.SetScalarBarVisibility(renderView1, True) # update the view to ensure updated data information renderView1.Update() # create a new 'TTK ScalarFieldCriticalPoints' tTKScalarFieldCriticalPoints1 = TTKScalarFieldCriticalPoints(registrationName='TTKScalarFieldCriticalPoints1', Input=tTKTopologicalSimplification1) tTKScalarFieldCriticalPoints1.ScalarField = ['POINTS', 'Elevation'] tTKScalarFieldCriticalPoints1.InputOffsetField = ['POINTS', 'Elevation'] # show data in view tTKScalarFieldCriticalPoints1Display = Show(tTKScalarFieldCriticalPoints1, renderView1, 'GeometryRepresentation') # trace defaults for the display properties. tTKScalarFieldCriticalPoints1Display.Representation = 'Surface' tTKScalarFieldCriticalPoints1Display.ColorArrayName = ['POINTS', 'Elevation'] tTKScalarFieldCriticalPoints1Display.LookupTable = elevationLUT tTKScalarFieldCriticalPoints1Display.SelectTCoordArray = 'None' tTKScalarFieldCriticalPoints1Display.SelectNormalArray = 'None' tTKScalarFieldCriticalPoints1Display.SelectTangentArray = 'None' tTKScalarFieldCriticalPoints1Display.OSPRayScaleArray = 'CriticalType' tTKScalarFieldCriticalPoints1Display.OSPRayScaleFunction = 'PiecewiseFunction' tTKScalarFieldCriticalPoints1Display.SelectOrientationVectors = 'None' tTKScalarFieldCriticalPoints1Display.ScaleFactor = 0.19248365163803102 tTKScalarFieldCriticalPoints1Display.SelectScaleArray = 'CriticalType' tTKScalarFieldCriticalPoints1Display.GlyphType = 'Arrow' tTKScalarFieldCriticalPoints1Display.GlyphTableIndexArray = 'CriticalType' tTKScalarFieldCriticalPoints1Display.GaussianRadius = 0.00962418258190155 tTKScalarFieldCriticalPoints1Display.SetScaleArray = ['POINTS', 'CriticalType'] tTKScalarFieldCriticalPoints1Display.ScaleTransferFunction = 'PiecewiseFunction' tTKScalarFieldCriticalPoints1Display.OpacityArray = ['POINTS', 'CriticalType'] tTKScalarFieldCriticalPoints1Display.OpacityTransferFunction = 'PiecewiseFunction' tTKScalarFieldCriticalPoints1Display.DataAxesGrid = 'GridAxesRepresentation' tTKScalarFieldCriticalPoints1Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKScalarFieldCriticalPoints1Display.ScaleTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 3.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKScalarFieldCriticalPoints1Display.OpacityTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 3.0, 1.0, 0.5, 0.0] # show color bar/color legend tTKScalarFieldCriticalPoints1Display.SetScalarBarVisibility(renderView1, True) # update the view to ensure updated data information renderView1.Update() # create a new 'TTK IcospheresFromPoints' tTKIcospheresFromPoints2 = TTKIcospheresFromPoints(registrationName='TTKIcospheresFromPoints2', Input=tTKScalarFieldCriticalPoints1) # show data in view tTKIcospheresFromPoints2Display = Show(tTKIcospheresFromPoints2, renderView1, 'GeometryRepresentation') # trace defaults for the display properties. tTKIcospheresFromPoints2Display.Representation = 'Surface' tTKIcospheresFromPoints2Display.ColorArrayName = ['POINTS', 'Elevation'] tTKIcospheresFromPoints2Display.LookupTable = elevationLUT tTKIcospheresFromPoints2Display.SelectTCoordArray = 'None' tTKIcospheresFromPoints2Display.SelectNormalArray = 'Normals' tTKIcospheresFromPoints2Display.SelectTangentArray = 'None' tTKIcospheresFromPoints2Display.OSPRayScaleArray = 'CriticalType' tTKIcospheresFromPoints2Display.OSPRayScaleFunction = 'PiecewiseFunction' tTKIcospheresFromPoints2Display.SelectOrientationVectors = 'None' tTKIcospheresFromPoints2Display.ScaleFactor = 0.3924836397171021 tTKIcospheresFromPoints2Display.SelectScaleArray = 'CriticalType' tTKIcospheresFromPoints2Display.GlyphType = 'Arrow' tTKIcospheresFromPoints2Display.GlyphTableIndexArray = 'CriticalType' tTKIcospheresFromPoints2Display.GaussianRadius = 0.019624181985855103 tTKIcospheresFromPoints2Display.SetScaleArray = ['POINTS', 'CriticalType'] tTKIcospheresFromPoints2Display.ScaleTransferFunction = 'PiecewiseFunction' tTKIcospheresFromPoints2Display.OpacityArray = ['POINTS', 'CriticalType'] tTKIcospheresFromPoints2Display.OpacityTransferFunction = 'PiecewiseFunction' tTKIcospheresFromPoints2Display.DataAxesGrid = 'GridAxesRepresentation' tTKIcospheresFromPoints2Display.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKIcospheresFromPoints2Display.ScaleTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 3.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKIcospheresFromPoints2Display.OpacityTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 3.0, 1.0, 0.5, 0.0] # show color bar/color legend tTKIcospheresFromPoints2Display.SetScalarBarVisibility(renderView1, True) # update the view to ensure updated data information renderView1.Update() # Properties modified on tTKIcospheresFromPoints2 tTKIcospheresFromPoints2.Radius = 0.0025 # update the view to ensure updated data information renderView1.Update() # Properties modified on tTKIcospheresFromPoints2 tTKIcospheresFromPoints2.Radius = 0.025 # update the view to ensure updated data information renderView1.Update() # set scalar coloring ColorBy(tTKIcospheresFromPoints2Display, ('POINTS', 'CriticalType')) # Hide the scalar bar for this color map if no visible data is colored by it. HideScalarBarIfNotNeeded(elevationLUT, renderView1) # rescale color and/or opacity maps used to include current data range tTKIcospheresFromPoints2Display.RescaleTransferFunctionToDataRange(True, False) # show color bar/color legend tTKIcospheresFromPoints2Display.SetScalarBarVisibility(renderView1, True) # split cell layout1.SplitVertical(1, 0.5) # set active view SetActiveView(None) # Create a new 'Render View' renderView3 = CreateView('RenderView') renderView3.AxesGrid = 'GridAxes3DActor' renderView3.StereoType = 'Crystal Eyes' renderView3.CameraFocalDisk = 1.0 renderView3.BackEnd = 'OSPRay raycaster' renderView3.OSPRayMaterialLibrary = materialLibrary1 # assign view to a particular cell in the layout AssignViewToLayout(view=renderView3, layout=layout1, hint=4) # set active source SetActiveSource(tTKTopologicalSimplification1) # show data in view tTKTopologicalSimplification1Display_1 = Show(tTKTopologicalSimplification1, renderView3, 'GeometryRepresentation') # trace defaults for the display properties. tTKTopologicalSimplification1Display_1.Representation = 'Surface' tTKTopologicalSimplification1Display_1.ColorArrayName = ['POINTS', 'Elevation'] tTKTopologicalSimplification1Display_1.LookupTable = elevationLUT tTKTopologicalSimplification1Display_1.SelectTCoordArray = 'None' tTKTopologicalSimplification1Display_1.SelectNormalArray = 'None' tTKTopologicalSimplification1Display_1.SelectTangentArray = 'None' tTKTopologicalSimplification1Display_1.OSPRayScaleArray = 'Elevation' tTKTopologicalSimplification1Display_1.OSPRayScaleFunction = 'PiecewiseFunction' tTKTopologicalSimplification1Display_1.SelectOrientationVectors = 'None' tTKTopologicalSimplification1Display_1.ScaleFactor = 0.19362616539001465 tTKTopologicalSimplification1Display_1.SelectScaleArray = 'Elevation' tTKTopologicalSimplification1Display_1.GlyphType = 'Arrow' tTKTopologicalSimplification1Display_1.GlyphTableIndexArray = 'Elevation' tTKTopologicalSimplification1Display_1.GaussianRadius = 0.009681308269500732 tTKTopologicalSimplification1Display_1.SetScaleArray = ['POINTS', 'Elevation'] tTKTopologicalSimplification1Display_1.ScaleTransferFunction = 'PiecewiseFunction' tTKTopologicalSimplification1Display_1.OpacityArray = ['POINTS', 'Elevation'] tTKTopologicalSimplification1Display_1.OpacityTransferFunction = 'PiecewiseFunction' tTKTopologicalSimplification1Display_1.DataAxesGrid = 'GridAxesRepresentation' tTKTopologicalSimplification1Display_1.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKTopologicalSimplification1Display_1.ScaleTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKTopologicalSimplification1Display_1.OpacityTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # show color bar/color legend tTKTopologicalSimplification1Display_1.SetScalarBarVisibility(renderView3, True) # reset view to fit data renderView3.ResetCamera(False) # set active source SetActiveSource(tTKTopologicalSimplification1) # link cameras in two views AddCameraLink(renderView3, renderView1, 'CameraLink0') # set active view SetActiveView(renderView1) # set active view SetActiveView(renderView3) # create a new 'TTK Merge and Contour Tree (FTM)' tTKMergeandContourTreeFTM1 = TTKMergeandContourTreeFTM(registrationName='TTKMergeandContourTreeFTM1', Input=tTKTopologicalSimplification1) tTKMergeandContourTreeFTM1.ScalarField = ['POINTS', 'Elevation'] tTKMergeandContourTreeFTM1.InputOffsetField = ['POINTS', 'Elevation'] # show data in view tTKMergeandContourTreeFTM1Display = Show(tTKMergeandContourTreeFTM1, renderView3, 'UnstructuredGridRepresentation') # trace defaults for the display properties. tTKMergeandContourTreeFTM1Display.Representation = 'Surface' tTKMergeandContourTreeFTM1Display.ColorArrayName = ['POINTS', 'CriticalType'] tTKMergeandContourTreeFTM1Display.LookupTable = criticalTypeLUT tTKMergeandContourTreeFTM1Display.SelectTCoordArray = 'None' tTKMergeandContourTreeFTM1Display.SelectNormalArray = 'None' tTKMergeandContourTreeFTM1Display.SelectTangentArray = 'None' tTKMergeandContourTreeFTM1Display.OSPRayScaleArray = 'CriticalType' tTKMergeandContourTreeFTM1Display.OSPRayScaleFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display.SelectOrientationVectors = 'None' tTKMergeandContourTreeFTM1Display.ScaleFactor = 0.19248365163803102 tTKMergeandContourTreeFTM1Display.SelectScaleArray = 'CriticalType' tTKMergeandContourTreeFTM1Display.GlyphType = 'Arrow' tTKMergeandContourTreeFTM1Display.GlyphTableIndexArray = 'CriticalType' tTKMergeandContourTreeFTM1Display.GaussianRadius = 0.00962418258190155 tTKMergeandContourTreeFTM1Display.SetScaleArray = ['POINTS', 'CriticalType'] tTKMergeandContourTreeFTM1Display.ScaleTransferFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display.OpacityArray = ['POINTS', 'CriticalType'] tTKMergeandContourTreeFTM1Display.OpacityTransferFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display.DataAxesGrid = 'GridAxesRepresentation' tTKMergeandContourTreeFTM1Display.PolarAxes = 'PolarAxesRepresentation' tTKMergeandContourTreeFTM1Display.ScalarOpacityFunction = criticalTypePWF tTKMergeandContourTreeFTM1Display.ScalarOpacityUnitDistance = 2.6534888406982566 tTKMergeandContourTreeFTM1Display.OpacityArrayName = ['POINTS', 'CriticalType'] # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKMergeandContourTreeFTM1Display.ScaleTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 3.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKMergeandContourTreeFTM1Display.OpacityTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 3.0, 1.0, 0.5, 0.0] # hide data in view Hide(tTKTopologicalSimplification1, renderView3) # show color bar/color legend tTKMergeandContourTreeFTM1Display.SetScalarBarVisibility(renderView3, True) # show data in view tTKMergeandContourTreeFTM1Display_1 = Show(OutputPort(tTKMergeandContourTreeFTM1, 1), renderView3, 'UnstructuredGridRepresentation') # get color transfer function/color map for 'SegmentationId' segmentationIdLUT = GetColorTransferFunction('SegmentationId') segmentationIdLUT.RGBPoints = [0.0, 0.231373, 0.298039, 0.752941, 2.0, 0.865003, 0.865003, 0.865003, 4.0, 0.705882, 0.0156863, 0.14902] segmentationIdLUT.ScalarRangeInitialized = 1.0 # get opacity transfer function/opacity map for 'SegmentationId' segmentationIdPWF = GetOpacityTransferFunction('SegmentationId') segmentationIdPWF.Points = [0.0, 0.0, 0.5, 0.0, 4.0, 1.0, 0.5, 0.0] segmentationIdPWF.ScalarRangeInitialized = 1 # trace defaults for the display properties. tTKMergeandContourTreeFTM1Display_1.Representation = 'Surface' tTKMergeandContourTreeFTM1Display_1.ColorArrayName = ['CELLS', 'SegmentationId'] tTKMergeandContourTreeFTM1Display_1.LookupTable = segmentationIdLUT tTKMergeandContourTreeFTM1Display_1.SelectTCoordArray = 'None' tTKMergeandContourTreeFTM1Display_1.SelectNormalArray = 'None' tTKMergeandContourTreeFTM1Display_1.SelectTangentArray = 'None' tTKMergeandContourTreeFTM1Display_1.OSPRayScaleArray = 'Scalar' tTKMergeandContourTreeFTM1Display_1.OSPRayScaleFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display_1.SelectOrientationVectors = 'None' tTKMergeandContourTreeFTM1Display_1.ScaleFactor = 0.19248365163803102 tTKMergeandContourTreeFTM1Display_1.SelectScaleArray = 'SegmentationId' tTKMergeandContourTreeFTM1Display_1.GlyphType = 'Arrow' tTKMergeandContourTreeFTM1Display_1.GlyphTableIndexArray = 'SegmentationId' tTKMergeandContourTreeFTM1Display_1.GaussianRadius = 0.00962418258190155 tTKMergeandContourTreeFTM1Display_1.SetScaleArray = ['POINTS', 'Scalar'] tTKMergeandContourTreeFTM1Display_1.ScaleTransferFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display_1.OpacityArray = ['POINTS', 'Scalar'] tTKMergeandContourTreeFTM1Display_1.OpacityTransferFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display_1.DataAxesGrid = 'GridAxesRepresentation' tTKMergeandContourTreeFTM1Display_1.PolarAxes = 'PolarAxesRepresentation' tTKMergeandContourTreeFTM1Display_1.ScalarOpacityFunction = segmentationIdPWF tTKMergeandContourTreeFTM1Display_1.ScalarOpacityUnitDistance = 1.5517696876703193 tTKMergeandContourTreeFTM1Display_1.OpacityArrayName = ['CELLS', 'SegmentationId'] # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKMergeandContourTreeFTM1Display_1.ScaleTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKMergeandContourTreeFTM1Display_1.OpacityTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 100.0, 1.0, 0.5, 0.0] # hide data in view Hide(tTKTopologicalSimplification1, renderView3) # show color bar/color legend tTKMergeandContourTreeFTM1Display_1.SetScalarBarVisibility(renderView3, True) # show data in view tTKMergeandContourTreeFTM1Display_2 = Show(OutputPort(tTKMergeandContourTreeFTM1, 2), renderView3, 'GeometryRepresentation') # trace defaults for the display properties. tTKMergeandContourTreeFTM1Display_2.Representation = 'Surface' tTKMergeandContourTreeFTM1Display_2.ColorArrayName = ['POINTS', 'SegmentationId'] tTKMergeandContourTreeFTM1Display_2.LookupTable = segmentationIdLUT tTKMergeandContourTreeFTM1Display_2.SelectTCoordArray = 'None' tTKMergeandContourTreeFTM1Display_2.SelectNormalArray = 'None' tTKMergeandContourTreeFTM1Display_2.SelectTangentArray = 'None' tTKMergeandContourTreeFTM1Display_2.OSPRayScaleArray = 'SegmentationId' tTKMergeandContourTreeFTM1Display_2.OSPRayScaleFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display_2.SelectOrientationVectors = 'None' tTKMergeandContourTreeFTM1Display_2.ScaleFactor = 0.19362616539001465 tTKMergeandContourTreeFTM1Display_2.SelectScaleArray = 'SegmentationId' tTKMergeandContourTreeFTM1Display_2.GlyphType = 'Arrow' tTKMergeandContourTreeFTM1Display_2.GlyphTableIndexArray = 'SegmentationId' tTKMergeandContourTreeFTM1Display_2.GaussianRadius = 0.009681308269500732 tTKMergeandContourTreeFTM1Display_2.SetScaleArray = ['POINTS', 'SegmentationId'] tTKMergeandContourTreeFTM1Display_2.ScaleTransferFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display_2.OpacityArray = ['POINTS', 'SegmentationId'] tTKMergeandContourTreeFTM1Display_2.OpacityTransferFunction = 'PiecewiseFunction' tTKMergeandContourTreeFTM1Display_2.DataAxesGrid = 'GridAxesRepresentation' tTKMergeandContourTreeFTM1Display_2.PolarAxes = 'PolarAxesRepresentation' # init the 'PiecewiseFunction' selected for 'ScaleTransferFunction' tTKMergeandContourTreeFTM1Display_2.ScaleTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 4.0, 1.0, 0.5, 0.0] # init the 'PiecewiseFunction' selected for 'OpacityTransferFunction' tTKMergeandContourTreeFTM1Display_2.OpacityTransferFunction.Points = [0.0, 0.0, 0.5, 0.0, 4.0, 1.0, 0.5, 0.0] # hide data in view Hide(tTKTopologicalSimplification1, renderView3) # show color bar/color legend tTKMergeandContourTreeFTM1Display_2.SetScalarBarVisibility(renderView3, True) # update the view to ensure updated data information renderView3.Update() # hide data in view Hide(OutputPort(tTKMergeandContourTreeFTM1, 1), renderView3) # hide data in view Hide(tTKMergeandContourTreeFTM1, renderView3) # hide data in view Hide(tTKMergeandContourTreeFTM1, renderView3) # set active source SetActiveSource(tTKMergeandContourTreeFTM1) # show data in view tTKMergeandContourTreeFTM1Display = Show(tTKMergeandContourTreeFTM1, renderView3, 'UnstructuredGridRepresentation') # show color bar/color legend tTKMergeandContourTreeFTM1Display.SetScalarBarVisibility(renderView3, True) # show data in view tTKMergeandContourTreeFTM1Display = Show(tTKMergeandContourTreeFTM1, renderView3, 'UnstructuredGridRepresentation') # show color bar/color legend tTKMergeandContourTreeFTM1Display.SetScalarBarVisibility(renderView3, True) # hide data in view Hide(tTKMergeandContourTreeFTM1, renderView3) # show data in view tTKMergeandContourTreeFTM1Display = Show(tTKMergeandContourTreeFTM1, renderView3, 'UnstructuredGridRepresentation') # show color bar/color legend tTKMergeandContourTreeFTM1Display.SetScalarBarVisibility(renderView3, True) # save data SaveData('C:/work/paraview Projs/terrain pipeline for pvpython/terrain.pvd', proxy=tTKMergeandContourTreeFTM1, PointDataArrays=['CriticalType', 'NodeId', 'RegionSize', 'RegionSpan', 'Scalar', 'VertexId']) # export view ExportView('C:/work/paraview Projs/terrain pipeline for pvpython/terrain.gltf', view=renderView3, InlineData=1, SaveNormal=1, SaveBatchId=1) # export view ExportView('C:/work/paraview Projs/terrain pipeline for pvpython/terrain.svg', view=renderView3) # export view ExportView('C:/work/paraview Projs/terrain pipeline for pvpython/terrain.vtkjs', view=renderView3, ParaViewGlanceHTML='')

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue