[Insight-users] itkVTKtoITKtoVTK modification

Mathieu Lamard Mathieu.Lamard@enst-bretagne.fr
Tue, 30 Apr 2002 14:59:39 +0200


Hello,
The example itkVTKtoITKtoVTK works fine for me but I want to change


vtkImageNoiseSource* source = vtkImageNoiseSource::New();
   source->SetWholeExtent(0, 255, 0, 255, 0, 0);
   source->SetMinimum(0);
   source->SetMaximum(1);

by

  vtkPNGReader * m_vtkPNGReader = vtkPNGReader::New();
   m_vtkPNGReader ->SetFileName( "toto.png" );
   m_vtkPNGReader ->Update();

   vtkImageLuminance * m_luminance = vtkImageLuminance::New();

   m_luminance -> SetInput(m_vtkPNGReader->GetOutput());


And then

   vtkImageExport* vtkExporter = vtkImageExport::New();
   vtkExporter->SetInput(m_luminance->GetOutput());

But here it did not work :-(
have anybody  an idea ?

Thank

Mathieu