[vtkusers] problem withvtkWin32OpenGLRenderWindow
Renaud Isabelle
renauisa at yahoo.fr
Fri Jun 10 08:40:39 EDT 2005
Hi,
I`m sorry: I tried Modified() as soon as I got your message, but this changed nothing: my image saved in essai.bmp is still blank!
Isabelle
Goodwin Lawlor <goodwin.lawlor at ucd.ie> a écrit :
Try this before you call a Write()
renSrc->Modified();
hth
Goodwin
"Renaud Isabelle" wrote in message
news:20050609203658.51819.qmail at web26105.mail.ukl.yahoo.com...
Don't anyone have a solution? I really don't manage to solve this.
Why just this 2 lines added could change something?
Please
Isa
Renaud Isabelle a écrit :
Hi,
I read your code example and I think this could help me because this seems
to be right.
- When I display directly on screen, the image "essai.bmp" saved is the
exact copy of what is rendered on screen: here is my code where everything
is fine:
// render to memory with m_pRenderWindow as a vtkWin32OpenGLRenderWindow.
m_pRenderWindow->Render();
vtkWindowToImageFilter* renSrc = vtkWindowToImageFilter::New();
renSrc->SetInput(m_pRenderer);
vtkBMPWriter* writer = vtkBMPWriter::New();
writer->SetInput(renSrc->GetOutput());
writer->SetFileName("essai.bmp");
writer->Write();
- However, to avoid flickering on screen, I want to render off screen by
double buffering. Here is the new code. Just is added the line
// render to memory with m_pRenderWindow as a vtkWin32OpenGLRenderWindow.
int *size = m_pRenderWindow->GetSize();
m_pRenderWindow->SetupMemoryRendering(size[0], size[1],
GetDC() ->GetSafeHdc());
m_pRenderWindow->Render();
vtkWindowToImageFilter* renSrc = vtkWindowToImageFilter::New();
renSrc->SetInput(m_pRenderer);
vtkBMPWriter* writer = vtkBMPWriter::New();
writer->SetInput(renSrc->GetOutput());
writer->SetFileName("essai.bmp");
writer->Write();
m_pRenderWindow->ResumeScreenRendering();
Problem: The image saved in essai.bmp is white. How could this be? I really
don't understand.I check class vtkWin32OpenGLRenderWindow and I am stuck on
this problem for 3 days.
Please help
Isa
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici ! _______________________________________________
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
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users
_______________________________________________
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
---------------------------------
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050610/ac8d6a05/attachment.htm>
More information about the vtkusers
mailing list