MantisBT - VTK
View Issue Details
0011550VTK(No Category)public2010-12-01 13:112012-12-12 12:18
David Doria 
David Gobbi 
normalminoralways
closedfixed 
 
5.10.0 
0011550: vtkImageData::FindCell ignores tolerance
vtkImageData::FindCell ignores the tolerance parameter. Because of this, there is no way to ensure that FindCell will return a cell when given a point that lies on the boundary of the data set.
The following code returns -1 when it should return cell 0.

#include <vtkSmartPointer.h>
#include <vtkImageData.h>

int main(int, char *[])
{
 int dims[3] = {1,2,3};
 double spacing[3] = {1.0, 1.0, 1.0};
 vtkSmartPointer<vtkImageData> image =
   vtkSmartPointer<vtkImageData>::New();
 image->SetDimensions(dims);
 image->SetSpacing(spacing);

 double p[3] = {1.0,1.0,1.0};
 int subId;
 double pcoords[3] = {0,0,0};
 double weights[8];
 int index = image->FindCell(p, NULL, 0, 10.0, subId, pcoords, weights);
 std::cout << "index: " << index << std::endl;

 return EXIT_SUCCESS;
}
No tags attached.
Issue History
2010-12-01 13:11David DoriaNew Issue
2010-12-01 13:17David GobbiAssigned To => David Gobbi
2010-12-01 13:17David GobbiStatusbacklog => tabled
2010-12-13 23:27David GobbiNote Added: 0023947
2010-12-13 23:27David GobbiStatustabled => @80@
2010-12-13 23:27David GobbiResolutionopen => fixed
2012-12-12 12:18David GobbiStatuscustomer review => closed
2012-12-12 12:18David GobbiFixed in Version => 5.10.0

Notes
(0023947)
David Gobbi   
2010-12-13 23:27   
Tolerance checks added on Dec 13, 2010,
commit 01c23323e43d616eec971b2417bda5c0c3e7bcd7