[vtkusers] [Resolved] Java SIGSEGV with vtkDataArray setNumberOfComponents

Leguay Romain romain.leguay at etu.u-bordeaux1.fr
Mon Jun 6 10:09:41 EDT 2011


Thanks so much!
It works fine now.

Romain.


Le Lundi 06 Juin 2011 14:59 CEST, Sebastien Jourdain <sebastien.jourdain at kitware.com> a écrit: 
 
> Hi Romain,
> 
> You can not create an abstract class (new vtkDataArray()). You have to
> create a DataArray with a given type, such as vtkDoubleArray.
> 
> Seb
> 
> On Mon, Jun 6, 2011 at 8:49 AM, Leguay Romain
> <romain.leguay at etu.u-bordeaux1.fr> wrote:
> > Hello everyone,
> > I try to do a CGNS reader for vtk. Actually, I manage to read the data (points and cells) and put it inside a vtkDataSet (unstructured grid or polydata). I manage to read attributes from a cgns file but when I try to put the data inside a vtkDataArray, I have a Sigsegv error.
> >
> > It's my code example:
> >
> > double[] attributesData = getAttributesData(attributeName); // OK
> >
> > vtkDataArray array = new vtkDataArray();
> > array.SetNumberOfComponents(cellDim); //cellDim = 1, 2 or 3 but I obtain a SigSegv
> > if (cellDim == 3) {
> >   int currentPos = 0;
> >   while(attributesData.lenght > currentPos) {
> >      vDataArray.InsertNextTuple3(attributesData[currentPos], attributesData[currentPos+1], attributesData[currentPos+2])
> >      currentPos +=3;
> >   }
> > }
> >
> >
> > I don't understand why I have got some sigSegv errors when I do SetNumberOfComponents...
> >
> > Has anyone got any ideas?
> >
> > Thanks,
> > Romain
> > _______________________________________________
> > 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
> >
 
 
 
 




More information about the vtkusers mailing list