<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR>
<STYLE>@font-face {
        font-family: ЛОМе;
}
@font-face {
        font-family: РВЛОМе;
}
@font-face {
        font-family: @ЛОМе;
}
@font-face {
        font-family: @РВЛОМе;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=ZH-CN style="TEXT-JUSTIFY-TRIM: punctuation" vLink=purple link=blue 
bgColor=#ffffff>
<DIV><FONT face=Arial size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">hey all, 
<o:p></o:p></SPAN></FONT></DIV>
<DIV class=Section1 style="LAYOUT-GRID:  15.6pt none">
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">IЎЇm using the 
</SPAN></FONT><FONT face=РВЛОМе size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">vtkWindowToImageFilter class for the 
screen shot to a image file. I used VS2005, vtk 4.1 under the windowXP. 
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=РВЛОМе size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=РВЛОМе size=1><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">Here is my code: 
<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=РВЛОМе size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
vtkRenderWindow* pRenderWindow = 
pWindow-&gt;getRenderWindow();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
vtkWindowToImageFilter* pWindowToImageFilter = 
vtkWindowToImageFilter::New();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
pWindowToImageFilter-&gt;SetInput(pRenderWindow);<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
pWindowToImageFilter-&gt;Update();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; vtkBMPWriter* 
pBMPWriter = vtkBMPWriter::New();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
pBMPWriter-&gt;SetInputConnection(pWindowToImageFilter-&gt;GetOutputPort());<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
pBMPWriter-&gt;SetFileName(<FONT color=maroon><SPAN 
style="COLOR: maroon">"C:\\ExportRenderWindow2BMP.jpg"</SPAN></FONT>);<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
pRenderWindow-&gt;Render();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-ALIGN: left" align=left><FONT face=РВЛОМе 
size=1><SPAN lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">&nbsp;&nbsp;&nbsp;&nbsp; 
pWindowToImageFilter-&gt;Modified();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=РВЛОМе size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе">pBMPWriter-&gt;Write();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=РВЛОМе size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: РВЛОМе"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">When the render image size 
smaller than the screen size, in the other words, when you can see the whole 
image in the screen, these code work fine;<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">But, when the render image 
size bigger than the screen size, in the other words, after zoom in, when you 
can only see a part of the image, you can only get what you see, the saved image 
size is same to screenЎЇs size. <o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">I want to get the whole 
image data to image file, who can help me, thanks for any 
advice!<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><FONT face=Arial size=1><SPAN 
lang=EN-US 
style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV></BODY></HTML>