[Insight-users] (no subject)
Syrine Sahmim
syrine.sahmim at yahoo.fr
Wed Jun 17 04:42:10 EDT 2009
hello
this program also gives errors in compilation phase
i joined the cmakelists file
Can help me to find error
thanks
void main()
{
// Definition of stuctures
typedef unsigned char PixelType;
const unsigned int Dimension = 2;
typedef itk::Image< PixelType, Dimension > ImageType;
typedef itk::ImageFileReader< ImageType > ReaderType;
typedef itk::ImageFileWriter< ImageType > WriterType;
// Create a object of reader and read the image
ReaderType::Pointer reader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
const char pInputfileName[] = "003F87DA.jpg";
const char pOutputfileName[] = "003F87DA.jpg";
reader->SetFileName( pInputfileName );
reader->Update();
ImageType::Pointer image = reader->GetOutput();
writer->SetFileName( pOutputfileName );
writer->SetInput( reader->GetOutput() );
try
{
writer->Update();
}
catch( itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
exit(-1);
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090617/82ce9f6d/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090617/82ce9f6d/attachment.txt>
More information about the Insight-users
mailing list