[vtkusers] VTK VC++ question

Michnay Balázs michnay at freemail.hu
Thu Oct 21 11:32:05 EDT 2004


Dear VTKUsers,
I'm using Visual C++ 6 to develop VTK applications and it works just 
fine. But there's one thing I couldn't figure out...
My application uses MFC, so I have a menu in the main window.
In one of the menu options I have two other options to select.
Let's suppose that clicking on one of them reads a BMP file using 
vtkBMPReader and another one displays it using vtkImageViewer.
Since I couldn't find a way to store the image data globally I had to 
read the whole BMP file again each time I'd like to display it.
As far as I think "static vtkBMPReader *BMPReader;" doesn't make 
sense, because BMPReader is an object so it cannot be made static (as 
methods and data members can be).
Is there a way to store vtk-related data globally?
So once I read a BMP file by clicking on "Read BMP" in the menu for 
instance I don't want to read it again when clicking on "Display BMP".
On this exaple can someone please explain how these data can be 
stored globally?
Thank you very much, I'm looking forward to your reply,
Regards,
  Michnay



More information about the vtkusers mailing list