Hello,<br><br>I have declared a reader as global variable<br><i><br>  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();</i><br>
<br>I am using Qt to open and display images. So I have created a function<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>      reader-&gt;SetFileName( fileName.toStdString()  );<br>     reader-&gt;Update();<br>}</i><br><br>My problem is that when I load my first image I do not have any problem. But when I reload my reader with an other image I get this exception error:<br>
<br><i>Unhandled exception at 0x764ab727 in mainwindow.exe: Microsoft C++ exception: itk::InvalidRequestedRegionError at memory location 0x0095c0d8..</i><br><br>Do you know why is this happening?<br>