<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3502.4856" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=730565406-03022003>A couple of months
work later and I have this nice program to visualize electromagnetic
fields. Put in the final function to save an image to a JPEG. And you
guessed it a problem.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=730565406-03022003>It seems that when
you have saved an image to file the interactor gets all screwed up so that mouse
events no longer are sent to the display. Could the window to image filter
or something be redirecting the interactor ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=730565406-03022003>I know the problem
is somewhere in this function - but I can't see where? Can anyone help - or do I
need to perform some off screen rendering (somehow) save the image there and
then redirect everything back to the screen?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=730565406-03022003>void
CvtkInfrastructure::Snapshot(CString
cFName)<BR>{<BR> vtkWindowToImageFilter
*vtkImageFilter;<BR> vtkJPEGWriter *vtkJpegWriter;</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003> vtkImageFilter=vtkWindowToImageFilter::New();<BR> vtkJpegWriter=vtkJPEGWriter::New();</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003> vtkImageFilter->SetInput(m_pRenWin);<BR> vtkJpegWriter->SetInput(vtkImageFilter->GetOutput());<BR> <BR> vtkJpegWriter->SetFileName(cFName);<BR> vtkJpegWriter->SetQuality(100);<BR> vtkJpegWriter->ProgressiveOff();<BR> vtkJpegWriter->Write();</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003> vtkImageFilter->Delete();<BR> vtkJpegWriter->Delete();</SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003>}</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=730565406-03022003>Brenton</SPAN></FONT></DIV></BODY></HTML>