[vtkusers] How to save renWin output in vtk format?
shahrooz Roohi
shahrooz_roohi2004 at yahoo.com
Sun Aug 27 09:46:54 EDT 2006
Dear all
I want to save my output of visualization (Volume rendering or surface rendering)
to vtk format. but I don't know which class I should use and the input of class.
I test vtkDataObjectWriter class with inputs renWin, ren1 and volume, but it didn't work. How can I solve this problem?
vtkRenderer *ren1 = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer(ren1);
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow(renWin);
ren1->AddActor(outline);
ren1->AddVolume(volume);
ren1->SetActiveCamera(aCamera);
ren1->ResetCamera ();
aCamera->Dolly(1.5);
ren1->SetBackground(1,1,1);
renWin->SetSize(640, 480);
vtkDataObjectWriter *writer=vtkDataObjectWriter::New();
writer->SetInput(renWin->GetOutput());
---------------------------------
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060827/d1c0c85c/attachment.htm>
More information about the vtkusers
mailing list