[Insight-users] displaying image error
Alireza Salamy
alireza_sal2000 at yahoo.com
Thu Mar 15 17:56:45 EST 2007
Hi all,
I am trying to display image (from insight data for example:BrainT1SliceBorder20.png)from file by using the code which is available at insight/example/Datarepresentation/image2.cxx
but I am not quite sure if I need to add anything more for displaying the image or not.my code is as follow:
#include "itkImage.h"
#include "itkImageFileReader.h"
int main( int , char * argv[])
{
typedef unsigned char PixelType;
const unsigned int Dimension = 2;
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::ImageFileReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
const char * filename = argv[1];
reader->SetFileName( "BrainT1SliceBorder20.png" );
reader->Update();
ImageType::Pointer image = reader->GetOutput();
reader->Update();
ImageType::Pointer image = reader->GetOutput(
return 0;
}
thank you for your help
---------------------------------
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070315/7632a879/attachment.html
More information about the Insight-users
mailing list