[vtkusers] vtkImageData::FindCell

David Gobbi david.gobbi at gmail.com
Wed Dec 1 13:32:58 EST 2010


On Wed, Dec 1, 2010 at 11:13 AM, David Doria <daviddoria at gmail.com> wrote:

>
> Here you go:
> http://public.kitware.com/Bug/view.php?id=11550
>
> That'd be great, thanks.
>
> While you add it, can you add a FindCell(double[3]) convenience function?
>
> The interface is crazy if all you want is the cell id.
>
> int vtkImageData::FindCell(double p[3])
> {
>  int subId;
>  double pcoords[3] = {0,0,0};
>  double weights[8];
>  return image->FindCell(p, NULL, 0, epsilon, subId, pcoords, weights);
> }


The FindCell() method is part of the abstract interface for vtkDataSet,
so you shouldn't add a FindCell methods that only applies to a specific
kind of data set.

I'm not saying that that VTK's data interface is ideal.  It could definitely
stand some improvement.  But it has to be improved holistically.  So
any time you ask to add one specific method for one specific data set,
I'll always be on the "no" side.  If someone was to put forth a proposal
to globally improve VTK's data interface, I'd be much more amenable.

  David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101201/7d4da8a8/attachment.htm>


More information about the vtkusers mailing list