Hello, in my application I want to load my image once using a reader and then use this reader every time I want to make image processing in the input image.How could I declare this reader as global variable? I have tried many things but I didn;t manafe to use reader as global variable. I would appreciate your help.<br>
<br><i>  typedef unsigned char        InputPixelType;<br>  typedef unsigned char        OutputPixelType;<br><br>  typedef itk::Image&lt; InputPixelType,  3 &gt;    InputImageType;<br>  typedef itk::Image&lt; OutputPixelType, 2 &gt;    OutputImageType;<br>
<br>  typedef itk::ImageFileReader&lt; InputImageType  &gt;  ReaderType;<br>  typedef itk::ImageFileWriter&lt; OutputImageType &gt;  WriterType;<br>ReaderType::Pointer reader = ReaderType::New();<br> reader-&gt;SetFileName( fileName.toStdString()  );<br>
      reader-&gt;Update();</i><br> <br><br>supposing that I have this function to load the reader<br><i><br>void MainWindow::push_button_File()<br>{<br><br>   fileName = QFileDialog::getOpenFileName(this,<br>                                   tr(&quot;Open File&quot;), QDir::currentPath());<br>
   <br>}</i><br><br>and this function to use the reader<br><br><i>void MainWindow::z_slice_extract()<br>{<br>  reader=.....<br>}</i><br>