[vtkusers] problem withvtkWin32OpenGLRenderWindow
Renaud Isabelle
renauisa at yahoo.fr
Fri Jun 10 10:26:40 EDT 2005
I read somewhere a call of UpdateWholeExtent on vtkImageShiftScale filter: what is this aim of this function?
Isa
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/7259aa7b/attachment.htm>
More information about the vtkusers
mailing list