[Insight-users] Writing images to files

Julien Jomier jjomier at cs.unc.edu
Tue Sep 7 13:30:42 EDT 2004


Hi Chris,

The error message is clear:

> Image1.cxx:51:`outputFilename'
>    undeclared (first use this function)

the variable 'outputFilename' is not declared. The itkImageFileWriter is
expecting a variable of type char* for the FileName.

You should add in your code something like:

const char* outputFilename= "MyFileName.jpg";

Julien

> -----Original Message-----
> From: insight-users-bounces at itk.org 
> [mailto:insight-users-bounces at itk.org] On Behalf Of chris harris
> Sent: Tuesday, September 07, 2004 12:47 PM
> To: insight-users at itk.org
> Subject: [Insight-users] Writing images to files
> 
> 
> Hi.
>     Iam trying to write an Image to a file
> outputFilename with the following lines
> 
> WriterType::Pointer writer = WriterType::New();
> 
> writer->SetFileName(outputFilename);
> 
> writer->SetInput(image);
> 
> but Iam getting an error 
> 
> Image1.cxx:51:`outputFilename'
>    undeclared (first use this function)
> 
> Can any one help me out in figuring out the problem?
> 
> 
> =====
> Thanks
> Chris harris
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 



More information about the Insight-users mailing list