[Insight-users] using reader as global variable

David Doria daviddoria at gmail.com
Sun May 29 09:51:28 EDT 2011


On Sun, May 29, 2011 at 6:11 AM, john smith <mkitkinsightuser at gmail.com>wrote:

> Hello to all,
>
> I am using a function in which I am loading a 3D image volume using a
> reader,as it seems bellow:
>
> void MainWindow::push_button_File()
> {
>       ReaderType::Pointer reader = ReaderType::New();
> {
>
> how could use this reader as a global variable in order to use the same 3D
> volume in an other function?
>
>
You should go out of your way not to use global variables. Could you just
make the reader a member variable of MainWindow?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110529/b0fe299a/attachment.htm>


More information about the Insight-users mailing list