[vtkusers] Why so slow to read and view a image?
zhangzhijun
zjzhang at ee.cuhk.edu.hk
Sat May 5 10:32:29 EDT 2001
Dear vtkers:
I use the following code ot load and view a BMP image. but It's too slow.
for a bmp image of 240*320 it takes more than 6 seconds.And the
interaction is also slow. what's the reason?it's the same with vtkTIFFReader.
The following is the program:
BOOL CImaDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
if (!vtkMFCDocument::OnOpenDocument(lpszPathName))
return FALSE;
// TODO: Add your specialized creation code here
this->ImageReader = vtkBMPReader::New();
this->Mapper =vtkDataSetMapper::New();
this->Actor =vtkActor::New();
this->Actor->SetMapper(Mapper);
this->ImageReader->SetFileName(lpszPathName);
this->Mapper->SetInput(this->ImageReader->GetOutput());
this->Props->AddItem(this->Actor);
this->Actor->VisibilityOn();
return TRUE;
}
regards,
zj zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20010505/23e15e25/attachment.htm>
More information about the vtkusers
mailing list