#include "vtkSmartPointer.h"
#include "vtkPNGReader.h"
#include <vtkImageLuminance.h>
#ifdef ENABLE_QUICKVIEW
#endif
int
main(int argc, char * argv[])
{
if (argc < 2)
{
std::cerr << "Required: filename" << std::endl;
return EXIT_FAILURE;
}
vtkSmartPointer<vtkPNGReader> reader = vtkSmartPointer<vtkPNGReader>::New();
reader->SetFileName(argv[1]);
reader->Update();
vtkSmartPointer<vtkImageLuminance> luminanceFilter = vtkSmartPointer<vtkImageLuminance>::New();
luminanceFilter->SetInputConnection(reader->GetOutputPort());
luminanceFilter->Update();
VTKImageToImageType::Pointer vtkImageToImageFilter = VTKImageToImageType::New();
vtkImageToImageFilter->SetInput(luminanceFilter->GetOutput());
vtkImageToImageFilter->Update();
ImageType::Pointer image = ImageType::New();
image->Graft(vtkImageToImageFilter->GetOutput());
#ifdef ENABLE_QUICKVIEW
#endif
return EXIT_SUCCESS;
}