[Insight-users] PGM file reading writting

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 26 11:42:02 EST 2005


Kexiang,

As Karthik just pointed out, ITK doesnt support PGM directly,
and using ImageMagick is probably the fastest solution to your
problem.

However you may save some disk space if you just create MetaImage
headers for your PGM files. This is possible as long as your PGM
files are storing the pixel data in binary and not ASCII.

MetaImage can be used for reading any fileformat that has a header
followed by binary data at the end of the file.

Please look at the "Data" link on www.itk.org for instructions
on how to write MetaImage headers.


   Regards,


      Luis


-----------------------------
Karthik Krishnan wrote:

> Hi Kexiang
> 
> A list of file formats ITK supports is here. PGM is not one of them. You 
> can use ImageMagick tools to convert it to oneof the many supported file 
> fomats like PNG etc....
> 
> www.vtk.org/Wiki/ITK_File_Formats
> www.ImageMagick.org
> 
> Thanks
> kk
> 
> 
> 
> 
> 
> Kexiang Wang wrote:
> 
>> Does ITK support reading and writting PGM file format?
>> I try ImageFileReader and ImageFileWriter, but failed.
>> thanks
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>  
>>
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 





More information about the Insight-users mailing list