[Paraview-developers] gradient filters
Andy Bauer
andy.bauer at kitware.com
Fri May 27 13:21:06 EDT 2011
I also forgot about the Compute Derivatives filter in ParaView which
computes both scalar/single component and vector/3 component derivatives of
point data outputting to cell data.
Another problem with these filters is that they only compute one gradient at
a time (the Compute Derivatives can do 1 scalar and one vector) which can be
wasteful if more than a single field gradient is desired. I'm trying to
decide if it's better to modify vtkGradientFilter's API to allow gradients
of multiple fields to be computed or to add yet another gradient filter to
the mix (which could probably be hidden in ParaView's GUI). Before I commit
anything I'll submit it to gerrit for more review but I thought I'd try to
get some more feedback before starting on this.
Thanks,
Andy
ps. Ken, for one image data that I tested the vtkGradientFilter took 42
seconds to compute while the vtkImageGradient took 14.5 seconds to complete.
On Thu, May 19, 2011 at 2:36 PM, Moreland, Kenneth <kmorel at sandia.gov>wrote:
> I originally wrote the vtkGradientFilter (the underlying filter for
> Gradient of Unstructured DataSet). It has always worked on any vtkDataSet,
> but the original implementation always went through the vtkDataSet::GetCell
> interface to compute the gradients and so was far less efficient than it
> could have been. Because of this, the XML wrapper for the filter limited
> the input to point data to use the more efficient vtkImageGradient filter on
> image data.
>
> Since that time, others have contributed to vtkGradientFilter. There is
> now a more efficient implementation for structured grids of all kinds, so it
> now makes more sense to use this filter for all gradient operations. Before
> doing that, however, you should compare the speed and result of
> vtkGradientFilter with vtkImageGradient.
>
> On a slightly different topic, there are at least two other filters that
> compute gradients in slightly different ways: vtkCellDerivatives and
> vtkDataSetGradient. At one point I was motivated to consolidate all of
> these filters into a single filter, but I never finished.
>
> -Ken
>
> **** Kenneth Moreland
> *** Sandia National Laboratories
> ***********
> *** *** *** email: kmorel at sandia.gov
> ** *** ** phone: (505) 844-8919
> *** web: http://www.cs.unm.edu/~kmorel
>
> From: Andy Bauer <andy.bauer at kitware.com>
> Date: Thu, 19 May 2011 14:08:55 -0400
> To: <paraview-developers at paraview.org>
> Subject: [Paraview-developers] gradient filters
>
> I'm looking at the 2 gradient filters available in the ParaView GUI and
> trying to improve their functionality. I see that the "Gradient of
> Unstructured DataSet" filter only works with vtkPointSets in ParaView but in
> general can handle vtkImages and vtkRectilinearGrids as well. The Gradient
> filter only works on image data. This means that there is on gradient
> filter for rectilinear grids and that any multiblock data set with mixed
> data set types can't be used with the gradient filter either. Because of
> this I'm wondering why the Gradient of Unstructured DataSet filter was
> limited to just vtkPointSets. Obviously performance is an issue. On an
> image data with 100 million cells, 1000 by 1000 by 100 whole extent, it took
> 14.5 seconds to create the image data with the wavelet source and run the
> Gradient filter. Using the Gradient of Unstructured DataSet filter instead
> it took 41.9 seconds.
>
> The Gradient of Unstructured DataSet does have more functionality (operates
> on arrays with more than a single component, can calculate vorticity,...)
> but I'd like to look into getting a better interface to gradients and am
> trying to encourage input on that process.
>
> Thanks,
> Andy
>
> _______________________________________________ Paraview-developers mailing
> list Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20110527/d73997fe/attachment.htm>
More information about the Paraview-developers
mailing list