[Insight-users] write jpg image

Luis Ibanez luis.ibanez at kitware.com
Tue Jun 29 21:05:41 EDT 2004


Hi Felix:

1) There is a bug in the JPEG writer.
    Image with 16 bit are not being
    saved correctly.


2) You are probably safer by using the MetaImage
    fileformat for saving your images and then
    viewing them with the ImageViewer application
    in InsightApplications.


3) If you want to include the ImageSeriesWriter
    to be wrapped for unsigned char, you can simply
    edit the file:


     Insight/Wrapping/CSwig/IO/
        wrap_itkImageSeriesWriter.cxx

     and a a line like

     ITK_WRAP_OBJECT2(ImageSeriesWriter, image::UC3, image::UC2, 
itkImageSeriesWriterUC3UC2)

     Then rebuild.


Please let us know if you find any problems,


    Thanks



       Luis


-----------------------
Felix Schwenk wrote:

> hi all,
> when writing a binary file with itkImageSeriesWriter to a series of
> files i encounter the following problem:
> when writing png or raw everything works out fine.
> when writing jpg or bmp the files look somewhat messed up.
> my binary volume is unsigned short.
> if i convert it from unsigned short to unsigned char everything works
> fine with jpg or bmp.
> but i haven't found a 
> itkImageSeriesWriter_UC3UC2 
> is there any particular reason why this can only be done in c++, or
> haven't i just found it?
> or are the jpg and bmp only messed up, because i use a wrong viewer?
> 
> regards,
> felix.
> 
> _______________________________________________
> 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