[vtkusers] How to use vtkDataObjectReader in C++

ycollette.nospam at free.fr ycollette.nospam at free.fr
Thu Feb 9 08:26:33 EST 2012


I found the way to initialize the class in C++:

  vtkFieldData * dataSet = NULL;
  vtkDataObject * do_tmp = NULL;
  vtkDataObjectReader * do_reader = vtkDataObjectReader::New(); // instead of new vtkDataObjectReader

  do_reader->ReadAllFieldsOn();
  do_reader->SetFileName(Filename);
  do_tmp = do_reader->GetOutput();
  dataSet = do_reader->ReadFieldData();

Now, I've got a problem: this simple program hangs when I call dataSet = do_reader->ReadFieldData();

YC

----- Mail original -----
De: "ycollette nospam" <ycollette.nospam at free.fr>
À: vtkusers at vtk.org
Envoyé: Jeudi 9 Février 2012 14:04:27
Objet: [vtkusers] How to use vtkDataObjectReader in C++

Hello, 

I tried to compile the following code under C++, but the compiler complains about not being able to access protected members (the contructor and the destructor).
Here is the peice of code:

  vtkFieldData * dataSet = NULL;
  vtkDataObjectReader * do_reader = new vtkDataObjectReader;

  do_reader->ReadAllFieldsOn();
  do_reader->SetFileName(Filename);
  dataSet = do_reader->ReadFieldData();


My question is: how to use vtkDataObjectReader in C++ ?

Best regards,

YC
_______________________________________________
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