[Insight-users] using reader as global variable

David Doria daviddoria at gmail.com
Sun May 29 21:11:21 EDT 2011


On Sun, May 29, 2011 at 7:21 PM, john smith <mkitkinsightuser at gmail.com>wrote:

> To be more specific I have tried the following, but still I get errors.
> Could somebody tell me what to type?
>
> Thanks in advance
>
>  class MainWindow
> {
> private:
>  typedef   itk::ImageFileReader< ImageType >   ReaderType;
>
> };
>
>
>
> MainWindow::MainWindow()
> {
>   reader = ReaderType::New();
> }
>

Now you have defined the type, but not created the variable.  You need:

typedef   itk::ImageFileReader< ImageType >   ReaderType;
ReaderType::Pointer reader;

in the class.

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


More information about the Insight-users mailing list