Sat Jul 04, 2015 2:26 pm
typedef float OutputPixelType;
typedef itk::Image< OutputPixelType, 2 > OutputImageType;
void ClassName::saveImage(OutputImageType::Pointer image, const char * outputFilename)
{
// Access to a Size of Image Region
typedef itk::ImageFileWriter< OutputImageType > WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetFileName(outputFilename);
writer->SetInput(image);
try
{
writer->Update();
}
catch( itk::ExceptionObject & err )
{
std::cerr << "ExceptionObject caught !" << std::endl;
std::cerr << err << std::endl;
}
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.