<div class="gmail_quote">On Sun, May 29, 2011 at 10:00 AM, john smith <span dir="ltr">&lt;<a href="mailto:mkitkinsightuser@gmail.com">mkitkinsightuser@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
How I could do this? Could you give me an example?</blockquote><div><br>class MainWindow<br>{<br>private:<br>  ReaderType::Pointer reader;<br>};<br><br>Then you could initialize it in the constructor:<br><br>MainWindow::MainWindow()<br>
{<br>  reader = ReaderType::New();<br>}<br><br>and use it in your function:<br><br>void MainWindow::push_button_File()<br>{<br>      reader-&gt;SetFileName(&quot;test.png&quot;);<br>
}<br><br>David <br></div></div>