[vtk-developers] A vtkDataSampler and image interpolation
Will Schroeder
will.schroeder at kitware.com
Tue Jul 5 05:49:54 EDT 2011
David-
What's the relationship of this vtkDataSampler class to the vtkProbeFilter?
W
On Mon, Jul 4, 2011 at 1:23 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi All,
>
> I've written some new interpolation classes for VTK, both for images
> and for other data sets. One thing that I want to ensure is that the
> abstract interface is something that people will be satisfied with.
> I use the same ScalarMode constants as vtkMapper, but there might
> be a better way of selecting arrays that I am not aware of:
>
> class vtkDataSampler : public vtkObject
> {
> // set the data to interpolate (does not establish pipeline connection)
> void SetInput(vtkDataObject *);
>
> // update any internal state variables prior to commencing interpolation
> void Update();
>
> // get an interpolated value, return "false" if out of bounds
> bool GetSample(const double point[3], double *value);
>
> // get an interpolated value (meant for use by wrapper languages)
> double GetSample(double x, double y, double z, int component);
>
> // set the scalar mode (same as vtkMapper scalar modes)
> void SetScalarMode(int mode);
> void SetScalarModeToDefault();
> void SetScalarModeToUsePointData();
> void SetScalarModeToUseCellData();
> void SetScalarModeToUsePointFieldData();
> void SetScalarModeToUseCellFieldData();
>
> // set the array, if chosen scalar mode is field data
> void SetArrayName(const char *name);
>
> void SetTolerance(double);
> void SetLocator(vtkLocator *locator);
> };
>
> The changes are on gerrit, if people want to see the full implementation:
> http://review.source.kitware.com/2004
>
> - David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
--
William J. Schroeder, PhD
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
(518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110705/7493e91a/attachment.html>
More information about the vtk-developers
mailing list