[vtkusers] Add multiple datasets (DataImage and PolyData) in a vtk file
david regnault
david.regnault at ign.fr
Mon Sep 5 09:48:53 EDT 2005
Hello,
I want to write in the same vtk file polygonal data (PolyData) and its
texture (ImageData) but the second element erase the first.
I wrote:
iostream *fp;
vtkDataSetWriter *pWriter = vtkDataSetWriter::New();
fp=pWriter->SetFileName("MyFile.vtk");
pWriter->OpenVTKFile(fp);
pWriter->SetInput(pImageData);
pWriter->Write();
pWriter->SetInput(pPolyData);
pWriter->Write();
pWriter->CloseVTKFile(fp);
I want then to extract separatly the ImageData and the PolyData by a
vtkDataSetReader in order to texture my polygons with tth ImageData.
There is maybe a better way that this method I want to do.
Thanks for your answears!
More information about the vtkusers
mailing list