[vtkusers] Failure running SplineDrivenImageSlicer from Insight Journal example.

Steve Fallows 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 =
vtkSmartPointer<vtkCellArray>::New( );
    line->InsertNextCell( 360 );
    vtkIdType ptId;
    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 =
vtkSmartPointer<vtkPolyData>::New( );
    circle->SetLines( line );
    circle->SetPoints( points );
    circle->PrintSelf(cout, *(vtkIndent::New()));

    // tested object
    vtkSmartPointer<vtkFrenetSerretFrame> frenetSerretFilter;
    frenetSerretFilter = vtkSmartPointer<vtkFrenetSerretFrame>::New( );

    vtkDataObject *da = static_cast<vtkDataObject *>(circle);
    frenetSerretFilter->SetInput( circle );
    frenetSerretFilter->Update( );
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...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120813/568acb08/attachment.htm>

More information about the vtkusers mailing list