[vtkusers] VTK VC++ question

de Boer Ingo I.deBoer at polytec.de
Fri Oct 22 02:34:17 EDT 2004


Hi,

well.. I don't exactly know where the problem is, but
why don't you store a pointer to the bmp as a member
in your CView or CDocument class?
There is no need for global storage...

greets
  Ingo

---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255
 
> 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