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; }}