[Insight-users] using reader as global variable
john smith
mkitkinsightuser at gmail.com
Sun May 29 13:24:56 EDT 2011
When I am trying this I get a message which says
private:
ReaderType::Pointer reader;
is not a class or namespace name
2011/5/29 David Doria <daviddoria at gmail.com>
> On Sun, May 29, 2011 at 10:00 AM, john smith <mkitkinsightuser at gmail.com>wrote:
>
>> How I could do this? Could you give me an example?
>
>
> class MainWindow
> {
> private:
> ReaderType::Pointer reader;
> };
>
> Then you could initialize it in the constructor:
>
> MainWindow::MainWindow()
> {
> reader = ReaderType::New();
> }
>
> and use it in your function:
>
>
> void MainWindow::push_button_File()
> {
> reader->SetFileName("test.png");
> }
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110529/7d322163/attachment.htm>
More information about the Insight-users
mailing list