<div class="gmail_quote">On Sun, May 29, 2011 at 6:11 AM, john smith <span dir="ltr">&lt;<a href="mailto:mkitkinsightuser@gmail.com">mkitkinsightuser@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello to all,<br><br>I am using a function in which I am loading a 3D image volume using a reader,as it seems bellow:<br><br>void MainWindow::push_button_File()<br>{<br>      ReaderType::Pointer reader = ReaderType::New();<br>

{<br><br>how could use this reader as a global variable in order to use the same 3D volume in an other function?<br><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;word-wrap:break-word;color:black;font-size:10px;text-align:left;line-height:130%">

</div><br></blockquote><div><br>You should go out of your way not to use global variables. Could you just make the reader a member variable of MainWindow?<br><br>David <br></div></div>