<!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.3314.2100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#a6caf0>
<DIV><FONT face=Arial size=2>Dear vtkers:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I use the following code ot load and view a BMP 
image. but It's too slow.</FONT></DIV>
<DIV><FONT face=Arial size=2>for a bmp image of 240*320 it takes more than 6 
seconds.And the&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>interaction is&nbsp;also slow.&nbsp;what's the 
reason?</FONT><FONT face=Arial size=2>it's the same with 
vtkTIFFReader.</FONT></DIV>
<DIV><FONT face=Arial size=2>The following is the program:</FONT></DIV>
<DIV><FONT size=2>&nbsp;</DIV>
<DIV><FONT face=Arial>BOOL CImaDoc::OnOpenDocument(LPCTSTR lpszPathName) 
</FONT></DIV>
<DIV><FONT face=Arial>{</FONT></DIV>
<DIV><FONT face=Arial>if 
(!vtkMFCDocument::OnOpenDocument(lpszPathName))</FONT></DIV>
<DIV><FONT face=Arial>return FALSE;</FONT></DIV>
<DIV><FONT face=Arial>// TODO: Add your specialized creation code 
here</FONT></DIV>
<DIV><FONT face=Arial>this-&gt;ImageReader = vtkBMPReader::New();</FONT></DIV>
<DIV><FONT face=Arial>this-&gt;Mapper =vtkDataSetMapper::New();</FONT></DIV>
<DIV><FONT face=Arial>this-&gt;Actor =vtkActor::New();</FONT></DIV>
<DIV><FONT face=Arial>this-&gt;Actor-&gt;SetMapper(Mapper);</FONT></DIV>
<DIV><FONT 
face=Arial>this-&gt;ImageReader-&gt;SetFileName(lpszPathName);</FONT></DIV>
<DIV><FONT 
face=Arial>this-&gt;Mapper-&gt;SetInput(this-&gt;ImageReader-&gt;GetOutput());</FONT></DIV>
<DIV><FONT face=Arial>this-&gt;Props-&gt;AddItem(this-&gt;Actor);</FONT></DIV>
<DIV><FONT face=Arial>this-&gt;Actor-&gt;VisibilityOn();</FONT></DIV>
<DIV><FONT face=Arial>return TRUE;</FONT></DIV>
<DIV><FONT face=Arial>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><FONT face=Arial>
<DIV>regards,</DIV>
<DIV>&nbsp;</DIV>
<DIV>zj zhang</FONT></FONT></DIV></BODY></HTML>