<div dir="ltr"><div><div><div><div>Hi paraview list,<br><br></div>First post here - hope I'm doing it right!<br><br></div>I've
been fighting with the python interface to generate images from several
views (rotated around) of a number of datasets. I'm stuck on the latter
point. The outline of my script is as follows:<br>
<br></div><div># Start pseudo-code<br></div><div># Load<br></div><div>RenderView1 = CreateRenderView()<br>results_pvtu = XMLPartitionedUnstructuredGridReader( ... )<br></div><div><br># Make two lookup tables and scalar bars<br>
</div><div>UpstrokeLookupTable = GetLookupTableForArray( "UpstrokeTimeMap_0_000000", ... )<br>UpstrokeBarRep = CreateScalarBar( ... )<br>UpstrokeBarRep.LookupTable = UpstrokeLookupTable<br>ApdLookupTable = GetLookupTableForArray( "Apd_90_0_Map_000000", ... )<br>
ApdBarRep = CreateScalarBar( ... )<br>ApdBarRep.LookupTable = ApdLookupTable<br></div><div><br># Threshold results first<br>Threshold1 = Threshold()<br>Show()<br>ResetCamera() # To get the zoom roughly right<br></div><div>
<br># Display first dataset<br>threshold_rep.ColorArrayName = 'UpstrokeTimeMap_0_000000'<br>threshold_rep.LookupTable = UpstrokeLookupTable<br>RenderView1.Representations.append(UpstrokeBarRep)<br><br></div><div>
# Rotate camera and save a series of images<br>
RenderView1.CameraViewUp = [...]<br>RenderView1.CameraClippingRange = [...]<br>RenderView1.CameraPosition = [...]<br>Render() <br>WriteImage(...)<br><br></div><div># Delete first scalar bar and change dataset<br></div><div>
Delete(RenderView1.Representations[1]) # 0 is the results, 1 is the scalar bar<br>threshold_rep.ColorArrayName = 'Apd_90_0_Map_000000'<br>threshold_rep.LookupTable = ApdLookupTable<br>RenderView1.Representations.append(ApdBarRep)<br>
<br># Rotate camera and save a series of images<br></div><div>RenderView1.CameraViewUp ... etc.<br><br></div><div># End pseudo-code<br></div><div><br></div><div>The
images from the first dataset ('UpstrokeTimeMap_0_000000') look normal,
but in the second set ('Apd_90_0_Map_000000') the colours are all weird
and jaggy with similarities to both datasets, a bit like it's trying to
display them both.<br>
<br></div><div>The python trace doesn't help as it generates similar code to the above.<br></div><div><br></div><div>I
was wondering if there might be a smarter way to do this. The
"representations and views" bit of the python guide looks promising but I
don't quite see how. <a href="http://www.paraview.org/Wiki/ParaView/Python_Scripting#Representations_and_Views" target="_blank">http://www.paraview.org/Wiki/ParaView/Python_Scripting#Representations_and_Views</a><br>
<br></div>Thanks for assistance.<br><br></div>Louie<br></div>