[Insight-users] using reader as global variable

john smith mkitkinsightuser at gmail.com
Sun May 29 10:00:56 EDT 2011


How I could do this? Could you give me an example?


2011/5/29 David Doria <daviddoria at gmail.com>

> 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/cecfa585/attachment.htm>


More information about the Insight-users mailing list