[vtkusers] vtkProbeFilter can't convert unstructuredgrid data to Imagedata
goldenrodxiao
goldenrod at 263.net
Wed Apr 19 12:49:40 EDT 2006
Hi all,
I just learned VTK by vtk user guide(4.2). I have read the charpter 6, it is said that vtkProbeFilter can resample an unstructuredGrid data into a regular image data. But when I follow the user guide and try it(sample the structuredgrid into image data, I found I couldn't get imagedata, I just get Dataset data. please help me.
By the way,I have a large number od point data(x,y,z),so I considered I can convert them into the image data, then carry on Raycasting method. can you give some suggestion about it?
Best Regards,
//my code below
fp=fopen("test1.vtk","r");
float x,y,z;
while(!feof(fp))
{
fscanf(fp,"%f%f%f\n",&x,&y,&z);
points->InsertNextPoint(x,y,z);
//cout<<x<<y<<z<<endl;
}
vtkCubeSource *cube=vtkCubeSource::New();
cube->SetCenter(0.0,0.0,0.0);
vtkPolyData *profile=vtkPolyData::New();
profile->SetPoints(points);
vtkProbeFilter *probe=vtkProbeFilter::New();
probe->SetInput(cube->GetOutput());
probe->SetSource(profile);
goldenrodxiao
goldenrod at 263.net
2006-04-20
More information about the vtkusers
mailing list