[vtkusers] vtkProbeFilter can't convert unstructuredgriddata to Imagedata

goldenrodxiao goldenrod at 263.net
Thu Apr 20 11:46:12 EDT 2006


Hi all,

Thank for you kindly reply. I try it again with call GetStructuredPointsOutput() on the probe filter,then i compile source code with VC, and no error and warning. But when I run this program,error message came out as below:
----------------------------------------------------------------------------
ERROR: In C:\martink\vtk42\VTK\Filtering\vtkImageToImageFilter.cxx, line 94
vtkImageClip (0x03388CB8): ExecuteInformation: Input is not set.
---------------------------------------------------------------------------

I am a newcomer about vtk.I work on this problem all day ,but I still couldn't find any solution. So I need your help to settle this problem. If The output of vtkProbeFilter is the same type as the sourcedata, how can I get the imagedata from polydata? 


My code as below:
___________________________________________________________________________
   ........
    vtkPolyData *profile=vtkPolyData::New();
	profile->SetPoints(points);
    vtkProbeFilter *probe=vtkProbeFilter::New();
    probe->SetInput(cube->GetOutput());
	probe->SetSource(profile);
    
	vtkStructuredPoints *sp=vtkStructuredPoints::New();
	sp=probe->GetStructuredPointsOutput();
	probe->Update();

    ......
    vtkVolumeRayCastMapper *volumeMapper=vtkVolumeRayCastMapper::New();
    volumeMapper->SetVolumeRayCastFunction(compositeFunction);
    volumeMapper->SetInput(sp);  
    vtkVolume *volume=vtkVolume::New();
    volume->SetMapper(volumeMapper);
    ......
_________________________________________________________________-
My test enviroment: windows2000,and Visual C++6 and Vtk4.2

	

======= 2006-04-20 00:59:29 =======

>The output of vtkProbeFilter is the same type as 
>the input.  First make sure that the data you're 
>using as input to vtkProbeFilter is of type 
>vtkImageData.  Then when you're getting the 
>output, call GetStructuredPointsOutput() on the 
>probe filter.  (vtkStructuredPoints is a subclass of vtkImageData.)
>
>- Amy
>
>At 12:49 PM 4/19/2006, goldenrodxiao wrote:
>>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
>>_______________________________________________
>>This is the private VTK discussion list.
>>Please keep messages on-topic. Check the FAQ at: 
>>http://www.vtk.org/Wiki/VTK_FAQ
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
>.

= = = = = = = = = = = = = = = = = = = =
			

				 
        goldenrodxiao
        goldenrod at 263.net
          2006-04-20



More information about the vtkusers mailing list