[vtkusers] Help!!!Image Display

Paul paulstjohn at cogeco.ca
Tue Mar 4 06:52:35 EST 2003


Hi Zhao,

Check the bit-depth of the BMP.  Try loading an 8 or 24-bit BMP.

Paul St. John
www.visible-bytes.com

-----Original Message-----
From: vtkusers-admin at public.kitware.com
[mailto:vtkusers-admin at public.kitware.com]On Behalf Of zhao yong qiang
Sent: 04/03/2003 5:42 AM
To: vtkusers at public.kitware.com
Subject: [vtkusers] Help!!!Image Display


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

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003




More information about the vtkusers mailing list