[Insight-users] using reader as global variable
Luis Ibanez
luis.ibanez at kitware.com
Sun May 29 14:34:12 EDT 2011
John,
You are missing:
typedef itk::ImageFileReader< ImageType > ReaderType.
Please read the ITK Software Guide
http://www.itk.org/ItkSoftwareGuide.pdf
in particular, Chapter 7 "Reading and Writing Images"
in pdf-pages 295-246.
Luis
---------------------------------------------------------
On Sun, May 29, 2011 at 1:24 PM, john smith <mkitkinsightuser at gmail.com> wrote:
> 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
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list