Hi Firas,
are you *really* sure the reader has completed correctly after the call to
update?
>From the error it sounds like the pointer returned by reader->GetOutput() is
>NULL,
which makes me think the reader must have not executed somehow.
Can you try adding a
cout<<reader->GetOutput()<<endl;
after the line
reader->Update();
and see if it outputs something else than 0?
Best regards
Luca
On Nov 9, 2010, at 6:29 PM, Firas Mualla wrote:
> Hi,
> I used the script vmtkcenterlines to generate a centerline and saved
> it to foo.vtp, the centerline was better than expected. The problem
> however arises when I try to smooth the skeleton in my C++ code:
>
> vtkXMLPolyDataReader * reader = vtkXMLPolyDataReader::New();
> reader->SetFileName("C:/Programme/vmtk 0.9.0/foo.vtp");
> reader->Update();//the file was read correctly
>
> vtkvmtkCenterlineSmoothing * smoother = vtkvmtkCenterlineSmoothing::New();
> smoother->SetInput(reader->GetOutput());
> smoother->SetSmoothingFactor(0.1);
> smoother->Update();//at this point I get the error
>
> ERROR: In ..\..\VTKSource\Filtering\vtkDemandDrivenPipeline.cxx, line 803
> vtkStreamingDemandDrivenPipeline (0AC4F1B0): Input for connection
> index 0 on input port index 0 for algorithm
> vtkvmtkCenterlineSmoothing(0AC3A3C8) is NULL, but a vtkPolyData is
> required.
>
> vtk version 5.4.2
> vmtk version 0.9
> all libraries were built in debug (no debug and release mix)
>
> with many thanks
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video Whitepaper
> David G. Thomson, author of the best-selling book "Blueprint to a
> Billion" shares his insights and actions to help propel your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> vmtk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/vmtk-users
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
vmtk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vmtk-users