<div>Hi all,</div> <div>I am trying to display image (from insight data for example:<FONT color=#800000 size=2>BrainT1SliceBorder20.png</FONT>)from file by using the code which is available at insight/example/Datarepresentation/image2.cxx</div> <div>but I am not quite sure if I need to add anything more for displaying the image or not.my code is as follow:</div><FONT color=#0000ff size=2> <div>#include</FONT><FONT size=2> </FONT><FONT color=#800000 size=2>"itkImage.h"</FONT></div><FONT color=#800000 size=2><FONT color=#0000ff size=2> <div>#include</FONT><FONT color=#000000 size=2> </FONT><FONT color=#800000 size=2>"itkImageFileReader.h"</FONT></div><FONT color=#800000 size=2><FONT color=#0000ff size=2> <div>int</FONT><FONT color=#000000 size=2> main( </FONT><FONT color=#0000ff size=2>int</FONT><FONT color=#000000 size=2> , </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2><FONT color=#000000> * argv[])</FONT></div> <div>{</div> <div></FONT> <div><FONT
color=#008000 size=2></div></FONT><FONT size=2></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2> PixelType;</div> <div></FONT><FONT color=#0000ff size=2>const</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> Dimension = 2;</div> <div></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::Image< PixelType, Dimension > ImageType;</div> <div></FONT> <div><FONT color=#008000 size=2></div></FONT><FONT size=2></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::ImageFileReader< ImageType > ReaderType;</div></FONT><FONT size=2> <div></FONT> <div><FONT color=#008000 size=2></div></FONT><FONT size=2>ReaderType::Pointer reader = ReaderType::New();</div></FONT><FONT size=2> <div></FONT> <div><FONT color=#008000
size=2></div></FONT><FONT size=2></FONT><FONT color=#0000ff size=2>const</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>char</FONT><FONT size=2> * filename = argv[1];</div> <div>reader->SetFileName( </FONT><FONT color=#800000 size=2>"BrainT1SliceBorder20.png"</FONT><FONT size=2> );</div></FONT><FONT size=2></FONT><FONT size=2> <div>reader->Update();</div></FONT><FONT size=2> <div>ImageType::Pointer image = reader->GetOutput();</div> <div></FONT> <div><FONT color=#008000 size=2></div></FONT><FONT size=2>reader->Update();</div></FONT><FONT size=2> <div></FONT> <div><FONT color=#008000 size=2></div></FONT><FONT size=2>ImageType::Pointer image = reader->GetOutput(</FONT> <div><FONT color=#008000 size=2></div></FONT><FONT size=2></FONT><FONT color=#0000ff size=2>return</FONT><FONT size=2> 0;</div> <div>}</div> <div> </div> <div>thank you for your help</div></FONT></FONT></FONT><p> 
<hr size=1>TV dinner still cooling?<br><a href="http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/">Check out "Tonight's Picks"</a> on Yahoo! TV.