I omitted that line before because I was getting the following error. Readding it gives this error:<br><div class="gmail_quote">Traceback (most recent call last):<br> File "/home/user/DNS/volume.py", line 40, in <module><br>
DataRepresentation2.ColorArrayName = 'volume_scalars'<br>
File "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 212, in __setattr__<br> setter(self, value)<br> File "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 2267, in setProperty<br>
return self.SetPropertyWithName(propName, value)<br> File "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 267, in SetPropertyWithName<br>
prop.SetData(arg)<br> File "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 695, in SetData<br> raise ValueError("Could not locate array %s in the input." % arr)<br>
ValueError: Could not locate array volume_scalars in the input.<br><font color="#888888"><br>Jesus</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">On Mon, Aug 29, 2011 at 3:53 PM, Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Try adding:<br>
<br>
DataRepresentation2.ColorArrayName = 'volume_scalars'<br>
<br>
Utkarsh<br>
<div><div></div><div><br>
On Wed, Aug 24, 2011 at 7:02 PM, Jesus Pulido <<a href="mailto:jpulido@ucdavis.edu" target="_blank">jpulido@ucdavis.edu</a>> wrote:<br>
> I am trying to volume render an unstructured grid of points using pvbatch<br>
> but I am getting an error:<br>
><br>
> ERROR: In<br>
> /home/user/Programs/ParaView-3.11.1-git/ParaView/VTK/VolumeRendering/vtkUnstructuredGridVolumeRayCastMapper.cxx,<br>
> line 211<br>
> vtkUnstructuredGridVolumeRayCastMapper (0x2473a40): Can't use the ray cast<br>
> mapper without scalars!<br>
><br>
> When trying to use Bunyk Ray casting<br>
><br>
> and<br>
><br>
> ERROR: In<br>
> /home/user/Programs/ParaView-3.11.1-git/ParaView/VTK/VolumeRendering/vtkOpenGLProjectedTetrahedraMapper.cxx,<br>
> line 237<br>
> vtkOpenGLProjectedTetrahedraMapper (0x2ab3190): Can't use projected<br>
> tetrahedra without scalars!<br>
><br>
> When trying to use Projected tetra.<br>
><br>
> I am using the "latest" git version as of today. I also tried with PV3.10.1<br>
> 64bit linux binary and I am having the same error with pvbatch.<br>
><br>
><br>
> Here is the script that I am using in pvbatch. I generated this script with<br>
> the help from using python trace within paraview (where the rendering<br>
> works). I think it tries to reference the data under<br>
><br>
> Threshold1.Scalars = ['POINTS', 'volume_scalars']<br>
><br>
> but even if I comment this line out of my script I obtain the same error as<br>
> above so somehow it's not able to reference the scalar points.<br>
> --------<br>
> try: paraview.simple<br>
> except: from paraview.simple import *<br>
> paraview.simple._DisableFirstRenderCameraReset()<br>
><br>
> wavelet_ = XMLImageDataReader( FileName=['/home/wavelet.vti'] )<br>
><br>
> wavelet_.CellArrayStatus = []<br>
> wavelet_.PointArrayStatus = ['volume_scalars']<br>
><br>
> RenderView4 = GetRenderView()<br>
> RenderView4.CameraViewUp = [0.0, 0.0, 1.0]<br>
> RenderView4.CameraPosition = [-725.7466298125642, 127.5, 127.5]<br>
> RenderView4.CameraFocalPoint = [127.5, 127.5, 127.5]<br>
> RenderView4.CameraClippingRange = [590.9891635144385, 1185.4328292597527]<br>
> RenderView4.Background = [0.0, 0.0, 0.0]<br>
> RenderView4.CenterAxesVisibility = 0<br>
> RenderView4.OrientationAxesVisibility = 0<br>
> RenderView4.ViewSize = [800, 600]<br>
><br>
> SetActiveSource(wavelet_)<br>
> Threshold1 = Threshold()<br>
><br>
> a1_volume_scalars_PVLookupTable = GetLookupTableForArray( "volume_scalars",<br>
> 1, RGBPoints=[1.9, 0.0, 1.0, 0.0, 1.95, 1.4972662149337713e-07, 1.0,<br>
> 0.0014876325368879406, 2.0, 0.0, 0.996078431372549, 0.0, 2.05,<br>
> 1.6337586200641548e-07, 1.0, 0.0015525676008689975, 2.1,<br>
> 1.2838779441233928e-07, 1.0, 0.0013859544585118407] )<br>
> a1_volume_scalars_PiecewiseFunction = CreatePiecewiseFunction()<br>
> a1_volume_scalars_PiecewiseFunction.Points = [1.9, 0.1, 1.95, 0.5, 2.0, 1.0,<br>
> 2.05, 0.5, 2.1, 0.1]<br>
><br>
> Threshold1 = GetActiveSource()<br>
> Threshold1.Scalars = ['POINTS', 'volume_scalars']<br>
> Threshold1.ThresholdRange = [1.9, 2.1]<br>
><br>
> DataRepresentation2 = Show()<br>
> DataRepresentation2 = GetDisplayProperties(Threshold1)<br>
> DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]<br>
> DataRepresentation2.SelectMapper = 'Fixed point'<br>
> DataRepresentation2.ScalarOpacityFunction =<br>
> a1_volume_scalars_PiecewiseFunction<br>
> DataRepresentation2.ScalarOpacityUnitDistance = 7.74209043877865<br>
> DataRepresentation2.LookupTable = a1_volume_scalars_PVLookupTable<br>
> DataRepresentation2.Representation = 'Volume'<br>
> DataRepresentation2.SelectMapper = 'Bunyk ray cast'<br>
><br>
> Render()<br>
><br>
> -----<br>
><br>
><br>
> Jesus<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the ParaView Wiki at:<br>
> <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
><br>
><br>
</blockquote></div><br>
</div></div></div><br>