[Paraview] non-interactive viz on cluster
Kharche, Sanjay
S.R.Kharche at exeter.ac.uk
Fri Aug 14 04:24:22 EDT 2015
Hi David
Your suggestion of a loop within the python script did not work. I make 5k to 10k pngs,
and the process was killed at a few hundred.
Since my process is serial at the moment, my solution is that I take an input from a bash
script:
import system
i = system(argv[1])
(or something similar). And my python is for 1 i that is read in.
That gives me a consistent predictable (in terms of time it takes)
working of my visualisation.
cheers
Sanjay
________________________________
From: David E DeMarle <dave.demarle at kitware.com>
Sent: 13 August 2015 14:02
To: Kharche, Sanjay
Cc: paraview at paraview.org
Subject: Re: [Paraview] non-interactive viz on cluster
Does this not work?
try: paraview.simple
except: from paraview.simple import *
i = 0
paraview.simple._DisableFirstRenderCameraReset()
RenderView1 = GetRenderView()
my_2d0_vts = XMLStructuredGridReader( FileName=['file_%i.vts' % (i)] )
RenderView1.CenterAxesVisibility = 0
RenderView1.OrientationAxesVisibility = 0
my_2d0_vts.PointArrayStatus = ['Unnamed0']
DataRepresentation1 = Show()
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
RenderView1.CenterOfRotation = [78.0, 58.5, 0.0]
Transform1 = Transform( Transform="Transform" )
a1_Unnamed0_PVLookupTable = GetLookupTableForArray( "Unnamed0", 1, NanColor=[0.25, 0.0, 0.0], RGBPoints=[0.0, 0.23, 0.299, 0.754, 1.0, 0.7059953924945706, 0.01625293517428646, 0.1500022472819457], VectorMode='Magnitude', ColorSpace='Diverging', LockScalarRange=1 )
a1_Unnamed0_PiecewiseFunction = CreatePiecewiseFunction( Points=[-0.1, 0.0, 1.0, 1.0] )
ScalarBarWidgetRepresentation1 = CreateScalarBar( Title='Unnamed0', LabelFontSize=12, Enabled=1, LookupTable=a1_Unnamed0_PVLookupTable, TitleFontSize=12 )
GetRenderView().Representations.append(ScalarBarWidgetRepresentation1)
RenderView1.CameraPosition = [78.0, 58.5, 376.71107225273664]
RenderView1.CameraFocalPoint = [78.0, 58.5, 0.0]
RenderView1.CameraClippingRange = [372.94396153020926, 382.3617383365277]
RenderView1.CameraParallelScale = 97.5
DataRepresentation1.ColorArrayName = 'Unnamed0'
DataRepresentation1.LookupTable = a1_Unnamed0_PVLookupTable
Transform1.Transform = "Transform"
DataRepresentation2 = Show()
DataRepresentation2.ColorArrayName = 'Unnamed0'
DataRepresentation2.LookupTable = a1_Unnamed0_PVLookupTable
DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation1.Visibility = 0
Transform1.Transform.Scale = [1.0, -1.0, 0.0]
Text1 = Text()
RenderView1.CameraViewUp = [0.0, 1.0, 0.0]
RenderView1.CameraPosition = [78.0, -58.5, 376.71107225273664]
RenderView1.CameraFocalPoint = [78.0, -58.5, 0.0]
RenderView1.CenterOfRotation = [78.0, -58.5, 0.0]
RenderView1.CameraClippingRange = [372.94396153020926, 382.3617383365277]
Text1.Text = '2D macro re-entry'
DataRepresentation3 = Show()
DataRepresentation3.Color = [0.3333333333333333, 0.0, 0.4980392156862745]
WriteImage('reentry2d%06i.png' % (i))
Render()
for i in range(1,10,1):
my_2d0_vts.FileName=['file_%i.vts' % (i)]
Render()
WriteImage('reentry2d%06i.png' % (i))
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20150814/66c69865/attachment.html>
More information about the ParaView
mailing list