[vtkusers] Segmentation fault
elena bresciani
elena.bresciani87 at gmail.com
Mon Apr 7 11:32:03 EDT 2014
yes
2014-04-07 17:18 GMT+02:00 Bill Lorensen <bill.lorensen at gmail.com>:
> Have you applied
> reader->Update();
>
> before you request the reader's output?
>
>
> On Mon, Apr 7, 2014 at 11:00 AM, elena bresciani
> <elena.bresciani87 at gmail.com> wrote:
> > Hello everybody!
> >
> > I need your help with a segmentation fault error.
> > Using gdb I understood where it is generated but I don't know how to
> modify
> > the code to make it run.
> >
> > Here's the portion of the code that I'm talking about:
> >
> >
> > vtkSmartPointer<vtkPolyData> polydata = reader->GetOutput();
> > (the reader is a vtkXMLPolyDataReader)
> >
> > vtkFloatArray *PointNormalArray = vtkFloatArray::SafeDownCast(
> > polydata->GetPointData()->GetNormals() ) ;
> >
> > for(vtkIdType i = 0; i < PointNormalArray->GetNumberOfTuples(); i++)
> {....}
> >
> > everytime I call GetNumberOfTuples I have this error so I think the
> problem
> > is on PointNormalArray.
> >
> > Can somebody help me?
> >
> > Thanks in advance
> >
> > Elena
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140407/ea12473d/attachment.html>
More information about the vtkusers
mailing list