[vtkusers] help!!imageview

zhao yong qiang zhao-yq at cs.sjtu.edu.cn
Tue Mar 4 05:15:51 EST 2003


Hi,all
    I  am a new user of VTK. The enviroment is MSVC + VTK+ ITK for win2000.
    In MSVC, I write the following code:

    vtkBMPReader* reader = vtkBMPReader::New(); 
    reader->SetFileName(BMP file path);
    vtkImageViewer* viewer = vtkImageViewer::New();
    viewer->SetInput(reader->GetOutput());
    viewer->SetSize(256,256);
    viewer->Render();

  After executing,it show a black window,not display image. why?
  can someone tell me the reason and how to corect it? 
Thank u!!
Regards, 
                          Zhao Yongqiang
                          Dept. of Computer Science & Engineering
                          Shanghai JiaoTong University
                          Shanghai, China
                          zhao-yq at cs.sjtu.edu.cn


More information about the vtkusers mailing list