[vtkusers] Failure running SplineDrivenImageSlicer from Insight Journal example.
sgfallows at gmail.com
Mon Aug 13 07:59:37 EDT 2012
I am trying to run the test programs for the SplineDrivenImageSlicer from
I have compiled the code, however when I run the testFrenetSerretFrame
it fails with this error:
vtkStreamingDemandDrivenPipeline (00C85DD0): Input for connection index 0
on input port index 0 for algorithm vtkFrenetSerretFrame(00C816E8) is NULL,
but a vtkPolyData is required.
when frenetSerretFilter->Update( ); is called to process the data.
The vtkFrenetSerretFrame class is derived from vtkPolyDataAlgorithm.
Here is the code:
int main(int argc, char** argv )
// Generate a circle:
vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New( );
vtkSmartPointer<vtkCellArray> line =
line->InsertNextCell( 360 );
for( int i = 0; i < 360; i++)
ptId = points->InsertNextPoint( cos( i*2*vtkMath::DoublePi()/360.0
), sin( i*2*vtkMath::DoublePi()/360.0 ), 0 );
line->InsertCellPoint( ptId );
vtkSmartPointer<vtkPolyData> circle =
circle->SetLines( line );
circle->SetPoints( points );
// tested object
frenetSerretFilter = vtkSmartPointer<vtkFrenetSerretFrame>::New( );
vtkDataObject *da = static_cast<vtkDataObject *>(circle);
frenetSerretFilter->SetInput( circle );
I am using VTK 5.8 on Win7. I have tried VTK 5.6.1 with the same result. I
am new to VTK, so maybe
the problem is obvious. I assumed this was a working example. I think the
line and circle items are
being constructed correctly - but I am still poring over the fairly large
number of members/classes
in each. It is very hard to look at the debugger information and know if
all the 0's and ???'s indicate
a problem or not.
Any suggestions as to what may be wrong here?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers