David-<div><br></div><div>What's the relationship of this vtkDataSampler class to the vtkProbeFilter?</div><div><br></div><div>W<br><br><div class="gmail_quote">On Mon, Jul 4, 2011 at 1:23 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi All,<br>
<br>
I've written some new interpolation classes for VTK, both for images<br>
and for other data sets.  One thing that I want to ensure is that the<br>
abstract interface is something that people will be satisfied with.<br>
I use the same ScalarMode constants as vtkMapper, but there might<br>
be a better way of selecting arrays that I am not aware of:<br>
<br>
class vtkDataSampler : public vtkObject<br>
{<br>
  // set the data to interpolate (does not establish pipeline connection)<br>
  void SetInput(vtkDataObject *);<br>
<br>
  // update any internal state variables prior to commencing interpolation<br>
  void Update();<br>
<br>
  // get an interpolated value, return "false" if out of bounds<br>
  bool GetSample(const double point[3], double *value);<br>
<br>
  // get an interpolated value (meant for use by wrapper languages)<br>
  double GetSample(double x, double y, double z, int component);<br>
<br>
  // set the scalar mode (same as vtkMapper scalar modes)<br>
  void SetScalarMode(int mode);<br>
  void SetScalarModeToDefault();<br>
  void SetScalarModeToUsePointData();<br>
  void SetScalarModeToUseCellData();<br>
  void SetScalarModeToUsePointFieldData();<br>
  void SetScalarModeToUseCellFieldData();<br>
<br>
  // set the array, if chosen scalar mode is field data<br>
  void SetArrayName(const char *name);<br>
<br>
  void SetTolerance(double);<br>
  void SetLocator(vtkLocator *locator);<br>
};<br>
<br>
The changes are on gerrit, if people want to see the full implementation:<br>
<a href="http://review.source.kitware.com/2004" target="_blank">http://review.source.kitware.com/2004</a><br>
<br>
 - David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>William J. Schroeder, PhD<br>Kitware, Inc.<br>28 Corporate Drive<br>Clifton Park, NY 12065<br><a href="mailto:will.schroeder@kitware.com">will.schroeder@kitware.com</a><br>

<a href="http://www.kitware.com">http://www.kitware.com</a><br>(518) 881-4902<br>
</div>