Regarding what I previously sent, I can now just check Threshold1.PointData.GetNumberOfArrays()
for each timestep to see if a valid output is produced, if it is then I can apply the settings and everything works fine. Thanks for your help! Jesus On Tue, Aug 30, 2011 at 7:25 AM, Utkarsh Ayachit < [email protected]> wrote: > You're getting that error because more likely than not, your threshold > range is such that no data is getting passed through. Ensure that the > the Threshold1.ThresholdRange is set to a valid range so that at > least some cells are passed through. > > Utaksrh > > On Mon, Aug 29, 2011 at 8:27 PM, Jesus Pulido <[email protected]> wrote: > > I omitted that line before because I was getting the following error. > > Readding it gives this error: > > Traceback (most recent call last): > > File "/home/user/DNS/volume.py", line 40, in <module> > > DataRepresentation2.ColorArrayName = 'volume_scalars' > > File > > > "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", > > line 212, in __setattr__ > > setter(self, value) > > File > > > "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", > > line 2267, in setProperty > > return self.SetPropertyWithName(propName, value) > > File > > > "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", > > line 267, in SetPropertyWithName > > prop.SetData(arg) > > File > > > "/home/user/Programs/ParaView-3.11.1-git/bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", > > line 695, in SetData > > raise ValueError("Could not locate array %s in the input." % arr) > > ValueError: Could not locate array volume_scalars in the input. > > > > Jesus > > > > On Mon, Aug 29, 2011 at 3:53 PM, Utkarsh Ayachit > > <[email protected]> wrote: > >> > >> Try adding: > >> > >> DataRepresentation2.ColorArrayName = 'volume_scalars' > >> > >> Utkarsh > >> > >> On Wed, Aug 24, 2011 at 7:02 PM, Jesus Pulido <[email protected]> > 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 > >> > > >> > > > > > > > > > _______________________________________________ > > 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 > > > > >
_______________________________________________ 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
