[Paraview] Fwd:
Yu Yu
jtxqhao at gmail.com
Thu Nov 28 05:33:23 EST 2013
Hi,
I have this object in ParaViewWeb,
[image: Inline image 2]
I attempted to use the following codes to set the ScalarOpacityFunction,
myLK = simple._GetLUTReaderInstance()
srcObj = simple.GetActiveSource()
myarray = srcObj.PointData.GetArray('scalars')
mylut = myLK.GetLUT(myarray,'Brewer Diverging Spectral (11)')
rep.LookupTable = mylut
sofPoints =[0.0, 0.0, 0.3, 0.5, 0.6, 0.8, 1.0, 1.0, 1.0]
sof = simple.CreatePiecewiseFunction()
sof.Points = sofPoints
rep.LookupTable.EnableOpacityMapping = 1
rep.LookupTable.ScalarOpacityFunction = sof
simple.Render()
And the above codes produce this in ParaViewWeb:
[image: Inline image 3]
This is how it show in ParaView, which is what I try to achieve:
[image: Inline image 4]
Can I know where have I done wrong ? Thanks for any help.
Best Regards,
Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20131128/9f263cc5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 46955 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20131128/9f263cc5/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 63884 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20131128/9f263cc5/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 33455 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20131128/9f263cc5/attachment-0005.png>
More information about the ParaView
mailing list