[vtkusers] Data attributes in unstructured grid

Martin Baumann mailsgetlost at web.de
Tue May 30 11:30:32 EDT 2006


Hi,

I found the answer to my question:

  vtkXMLUnstructuredGridReader* _xml_grid_reader  = vtkXMLUnstructuredGridReader::New();

  _xml_grid_reader->SetFileName(file);
  _xml_grid_reader->Update();

  cout << "#Points :    " << _xml_grid_reader->GetOutput()->GetNumberOfPoints() << endl;
  cout << "#Cells:      " << _xml_grid_reader->GetOutput()->GetNumberOfCells() << endl;
  cout << "#Pieces:     " << _xml_grid_reader->GetOutput()->GetNumberOfPieces() << endl;

  int num_arrays = _xml_grid_reader->GetOutput()->GetPointData()->GetNumberOfArrays();
  cout << "#DataArrays: " << num_arrays << endl;

  for (int c=0; c<num_arrays; c++)
    cout << "  -> " << c << " " << _xml_grid_reader->GetOutput()->GetPointData()->GetArrayName(c) << endl;

Regards,
M.B.


> -----Ursprüngliche Nachricht-----
> Von: Martin Baumann <mailsgetlost at web.de>
> Gesendet: 30.05.06 14:00:02
> An: vtkusers at vtk.org
> Betreff: [vtkusers] Data attributes in unstructured grid


> Hi,
> 
> how can I set / get attribute data that is associated with unstructured grid?
> In the documentation is mentioned that data attributes are stored as vtkDataArrays.
> 
> Thanks, M.B.
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000071




More information about the vtkusers mailing list