[Paraview-developers] Volume rendering, ColorArrayName and python

Jérôme jerome.velut at gmail.com
Thu May 12 09:06:21 EDT 2011


Hi,

I filled a bug entry concerning volume rendering (
http://public.kitware.com/Bug/view.php?id=12180) and I wish I could provide
a python script that reproduces the bug. However, I went into a simple seg
fault, without any additional error message (git-master). I tracked what
would cause the crash by using python trace and commenting out the line one
by one. The pipeline is a simple Wavelet source -> Volume rendering and
python trace outputs the following script :

#### simple volume rendering from Trace
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

Wavelet2 = Wavelet()

RenderView1 = GetRenderView()
DataRepresentation2 = Show()
DataRepresentation2.ScalarOpacityUnitDistance = 1.7320508075688779
DataRepresentation2.Representation = 'Outline'
DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]

a1_RTData_PVLookupTable = GetLookupTableForArray( "RTData", 1,
NanColor=[1.0, 0.0, 0.0], RGBPoints=[37.35310363769531, 0.0, 0.0, 0.0,
276.8288269042969, 1.0, 1.0, 1.0], VectorMode='Magnitude', ColorSpace='RGB',
ScalarRangeInitialized=1.0 )

a1_RTData_PiecewiseFunction = CreatePiecewiseFunction(
Points=[37.35310363769531, 0.0, 276.8288269042969, 1.0] )

RenderView1.CameraClippingRange = [46.35209125603439, 92.97512386351]

DataRepresentation2.Representation = 'Volume'
DataRepresentation2.ScalarOpacityFunction = a1_RTData_PiecewiseFunction
DataRepresentation2.ColorArrayName = 'RTData'
DataRepresentation2.LookupTable = a1_RTData_PVLookupTable

Render()
##########################################################

It turns out that commenting the line
   DataRepresentation2.ColorArrayName = 'RTData'
effectively throws the segfault.
To confirm the fact, I simply entered the following command in the python
shell:
Wavelet()
rep = Show()
rep.Representation = 'Volume'

And it crashed. entering rep.ColorArrayName='RTData' before asking for
Volume representation is the solution.
Furthermore, the step-by-step bug tracking showed me that the Lookup table
bug (#12180) is reproducible when I comment out both ScalarOpacityFunction
and LookupTable variable initialisation.

So, well... I don't know: Do I have to fill another bug entry on mantis
focusing on Python, linked to the previous report ? Or is it better to add a
note to the already reported bug ? I guess there was a "VTK default scalar
name" bug reported months ago. it seems to be related to...

Jerome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20110512/b7565094/attachment.htm>


More information about the Paraview-developers mailing list