[vtkusers] Having problems inputting data into vtkTransformFilter

Steve Boyd boyd at biomed.ee.ethz.ch
Thu Jun 21 10:05:22 EDT 2001


Hello all,

When I use vtkTransformFilter on my unstructured grid data (using line
#1 in the skeleton code below) I get an error saying:
Error Code 1: 'vtkPointSet' is not a base type for type 'vtkDataSet'

I can use line #2 instead, and the error I then get is:
vtkTransformFilter: Abstract filters require input to be set before
output can be retrieved.

It seems to me that I should be using line #1 below as
vtkTransformFilter should accept a '*vtkPointSet' as input (in this case
its vtkunstructured grid data).  Since that didn't work, I tried line #2
instead but then apparently no data was being input to the filter.  I
know that I can successfully read the .vtk file with vtkDataSetReader. 
Can anybody point out my mistake, or tell me what I should to do apply a
transformation to my unstructured grid data?

My visualization pipeline is:

  vtkDataSetReader *voi = vtkDataSetReader::New();
    voi->SetFileName(myfile);
  vtkTransform *mytrans = vtkTransform::New();
    mytrans->RotateX(90);
  vtkTransformFilter *transfilt = vtkTransformFilter::New();
    transfilt->SetTransform(mytrans);
#1  transfilt->SetInput(voi->GetOutput());
#2  transfilt->SetInput(voi->GetPolyDataOutput());
  vtkWarpVector *warp = vtkWarpVector::New();
    warp->SetInput(transfilt->GetOutput());
    warp->SetScaleFactor(2.0);
    warp->Update();

Thanks for any help,

Steve





More information about the vtkusers mailing list