[Paraview] Pvbatch: Volume rendering a thresholded unstructured grid
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Mon Aug 29 17:53:39 EDT 2011
Try adding:
DataRepresentation2.ColorArrayName = 'volume_scalars'
Utkarsh
On Wed, Aug 24, 2011 at 7:02 PM, Jesus Pulido <jpulido at ucdavis.edu> wrote:
> I am trying to volume render an unstructured grid of points using pvbatch
> but I am getting an error:
>
> ERROR: In
> /home/user/Programs/ParaView-3.11.1-git/ParaView/VTK/VolumeRendering/vtkUnstructuredGridVolumeRayCastMapper.cxx,
> line 211
> vtkUnstructuredGridVolumeRayCastMapper (0x2473a40): Can't use the ray cast
> mapper without scalars!
>
> When trying to use Bunyk Ray casting
>
> and
>
> ERROR: In
> /home/user/Programs/ParaView-3.11.1-git/ParaView/VTK/VolumeRendering/vtkOpenGLProjectedTetrahedraMapper.cxx,
> line 237
> vtkOpenGLProjectedTetrahedraMapper (0x2ab3190): Can't use projected
> tetrahedra without scalars!
>
> When trying to use Projected tetra.
>
> I am using the "latest" git version as of today. I also tried with PV3.10.1
> 64bit linux binary and I am having the same error with pvbatch.
>
>
> Here is the script that I am using in pvbatch. I generated this script with
> the help from using python trace within paraview (where the rendering
> works). I think it tries to reference the data under
>
> Threshold1.Scalars = ['POINTS', 'volume_scalars']
>
> but even if I comment this line out of my script I obtain the same error as
> above so somehow it's not able to reference the scalar points.
> --------
> try: paraview.simple
> except: from paraview.simple import *
> paraview.simple._DisableFirstRenderCameraReset()
>
> wavelet_ = XMLImageDataReader( FileName=['/home/wavelet.vti'] )
>
> wavelet_.CellArrayStatus = []
> wavelet_.PointArrayStatus = ['volume_scalars']
>
> RenderView4 = GetRenderView()
> RenderView4.CameraViewUp = [0.0, 0.0, 1.0]
> RenderView4.CameraPosition = [-725.7466298125642, 127.5, 127.5]
> RenderView4.CameraFocalPoint = [127.5, 127.5, 127.5]
> RenderView4.CameraClippingRange = [590.9891635144385, 1185.4328292597527]
> RenderView4.Background = [0.0, 0.0, 0.0]
> RenderView4.CenterAxesVisibility = 0
> RenderView4.OrientationAxesVisibility = 0
> RenderView4.ViewSize = [800, 600]
>
> SetActiveSource(wavelet_)
> Threshold1 = Threshold()
>
> a1_volume_scalars_PVLookupTable = GetLookupTableForArray( "volume_scalars",
> 1, RGBPoints=[1.9, 0.0, 1.0, 0.0, 1.95, 1.4972662149337713e-07, 1.0,
> 0.0014876325368879406, 2.0, 0.0, 0.996078431372549, 0.0, 2.05,
> 1.6337586200641548e-07, 1.0, 0.0015525676008689975, 2.1,
> 1.2838779441233928e-07, 1.0, 0.0013859544585118407] )
> a1_volume_scalars_PiecewiseFunction = CreatePiecewiseFunction()
> a1_volume_scalars_PiecewiseFunction.Points = [1.9, 0.1, 1.95, 0.5, 2.0, 1.0,
> 2.05, 0.5, 2.1, 0.1]
>
> Threshold1 = GetActiveSource()
> Threshold1.Scalars = ['POINTS', 'volume_scalars']
> Threshold1.ThresholdRange = [1.9, 2.1]
>
> DataRepresentation2 = Show()
> DataRepresentation2 = GetDisplayProperties(Threshold1)
> DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
> DataRepresentation2.SelectMapper = 'Fixed point'
> DataRepresentation2.ScalarOpacityFunction =
> a1_volume_scalars_PiecewiseFunction
> DataRepresentation2.ScalarOpacityUnitDistance = 7.74209043877865
> DataRepresentation2.LookupTable = a1_volume_scalars_PVLookupTable
> DataRepresentation2.Representation = 'Volume'
> DataRepresentation2.SelectMapper = 'Bunyk ray cast'
>
> Render()
>
> -----
>
>
> Jesus
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
More information about the ParaView
mailing list