[Paraview] gradient filter dumps core

Moreland, Kenneth kmorel at sandia.gov
Wed Apr 2 11:47:10 EDT 2008


Levent,

I think I tracked down the problem.  It appears that the Gradient and Gradient Magnitude filters pay no attention to the Select Input Scalars parameter.  I'm dumfounded about why no one else has run into this problem.  I don't want to get into details about the issues, but you can read about them on the bug tracker.

  http://www.paraview.org/Bug/view.php?id=6706

Right now, the workarounds are kind of crummy.  Since the image gradient filters work on the active scalars, you can get around the problem by setting some active scalars in your file.  For example, if you wanted to take the gradient of the RT array in iter0.vti, you could achieve this by changing the Scalars parameter of the PointData tag to be RT:

  <PointData Scalars="RT">

Unfortunately, that means you need to change the file every time you want to change the variable you want to perform the gradient on.  You could also create a separate file for each variable, but I don't know if that is more cumbersome for you.

Another approach that would work OK if your data sizes are small enough is to convert the data to unstructured grids (via Clean to Grid) and run the unstructured gradient filter.  You could get the results back to the image data by using the Append Attributes filter.

-Ken

> -----Original Message-----
> From: Server Levent Yilmaz [mailto:leventyilmaz at gmail.com]
> Sent: Tuesday, April 01, 2008 11:25 AM
> To: Moreland, Kenneth
> Cc: paraview at paraview.org
> Subject: Re: [Paraview] gradient filter dumps core
>
> Thanks for you reply Ken.
>
> On Tue, Apr 1, 2008 at 10:46 AM, Moreland, Kenneth <kmorel at sandia.gov>
> wrote:
> >
> >  So far I have not been able to replicate this.  I have used both
> ParaView 3.2.1 and ParaView CVS with the Wavelet source.  Can you tell us
> more about your data?  Can you send an example?
>
> Sure. Please download this sample dataset from
> http://miyav.ath.cx/t_/imagedata.tgz (54KB). The package includes 3
> binary vti files, 1 legacy ascii vtk file, a time series pvd file and
> 2 text files of stack dump after crash. The image data consists of
> several 10^3 point data scalars.
>
> There are multiple ways to replicate the problem:
>
> Case1 - Open file iter0.vti; add Gradient Magnitude filter; Apply {pv
> shouldn't crash yet, but there is no meaningful output}; Delete
> Gradient Mag. filter; Delete iter0.vti {pv crashes with stack dump in
> error1.txt}
>
> Case2 - Open file steps.pvd; Play time steps; Add Gradient Filter;
> Apply {pv crashes with stack dump in error2.txt}
>
> Case3 - I can not replicate this consistently. But, with Case1 after
> Apply step, I sometimes get
>
> ERROR: In
> /home/levent/pkg/ParaView3.2.1/VTK/Imaging/vtkImageGradientMagnitude.cxx,
> line 255
> vtkImageGradientMagnitude (0x1afff70): Execute: input data type, 11,
> must match out ScalarType 10
>
> on the output window. Following this is identical to Case1.
>
> In Windows version, Case1 hangs paraview (busy wait), Case2 crashes
> with Qt error in my previous post. No stack dumps.
>
>
> hth
> Levent
>
> --
> Server Levent Yilmaz
> Mechanical Engineering
> University of Pittsburgh




More information about the ParaView mailing list