[vtkusers] How to Convert PNM,BMP data to vtkImageData?

John Hunter jdhunter at ace.bsd.uchicago.edu
Fri Jan 23 15:17:14 EST 2004


>>>>> "Sentil" == Sentil Balaji <profbalse at yahoo.co.in> writes:

    Sentil> Hey, I tried to obtain the Fourier Transform of an Image
    Sentil> saved as a PGM file.I have the file read but I have no
    Sentil> idea on how to convert the PNM reader data to
    Sentil> vtkImageData.As the function 'IterativeExecute' demands
    Sentil> vtkImageData as the input..Many Thanks..Ciao

Is this all you need?

  reader = vtk.vtkPNMReader()
  # read your data in ...
  imageData = reader.GetOutput()


JDH



More information about the vtkusers mailing list