[vtkusers] Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Ismail Elkhrachy I.Elkhrachy at tu-bs.de
Wed Dec 6 11:35:47 EST 2006


Dear friends,
I have a point cloud(x, y,z) that represents an object surface. After I 
use surface reconstruct filter (vtkSurfaceReconstructionFilter) , and as 
Amy told me how to get all the generated surface coordinate. It is 
working ok, Thanks again to Amy!!.

But the output  coordinates pt[0], pt[1], pt[2]) are not in the same 
coordinates system of original point cloud(x, y,z)polyDat1, Do you know 
how to get them in the same old coordinate system.
For example The bounds for the original input (x, y,z) data coordinates 
is :

X_min = 1.037000,    X_max =2.401000
Y_min = 2.508000  ,  Y_max =4.061000
Z_min = -19.063601 , Z_zmax =-18.101999
But for the output for the pt[0], pt[1], pt[2]) is:
X_min =0.000000,  X_max =55.000000
Y_min =0.000000 ,  Y_max= 62.000000
Z_min =0.000000,  Z_zmax= 38.941410 Ma code is:
vtkSurfaceReconstructionFilter *surf = 
vtkSurfaceReconstructionFilter::New();

surf->SetInput(polyData1);
surf->SetSampleSpacing(0.026);
surf->GetReleaseDataFlag();
surf->Update();

vtkContourFilter *cf=vtkContourFilter::New();
cf->SetInput(surf->GetOutput());
cf->SetValue (0, 0.0 );
cf->Update();

vtkPoints *points = cf->GetOutput()->GetPoints();
int numPts = points->GetNumberOfPoints();
int i;
double pt[3];

for (i = 0; i < numPts; i++)
{
 points->GetPoint(i, pt);
 printf("point %d: %f %f %f\n", i, pt[0], pt[1], pt[2]);
}

I am using vtk 5.0.0 under MS Visual C++ 6.0, windows xp professional.

Any suggestion will be appreciated. Thank you in advance.
Ismail

-- 
M.Sc. Ismail Elkhrachy
PhD student

Institut für Geodäsie und Photogrammetrie
Technische Universität Braunschweig
Gaußstr. 22   
38106 Braunschweig 
Germany

Mob.           : 0049 0163 3623486
Tel.           : 0049 0531 3917497
Fax            : 0049 0531 3917499
E-mail         : I.Elkhrachy at tu-bs.de, I.Elkhrachy at yahoo.com





More information about the vtkusers mailing list