[Insight-users] problem with png image Writing

Luis Ibanez luis.ibanez at kitware.com
Wed Jun 23 13:11:31 EDT 2004


Hi Anis,

The simplest thing to do is to modify the example
in order to use 8bits instead of 16bits.

Goto line 87 of ImageReadWrite.cxx and replace


      typedef unsigned short PixelType;

with

      typedef unsigned char PixelType;

That will produce 8 bits images that will be
easier to visualize with naive viewers.


It is also a good idea to build the ImageViewer
from InsightApplications, since it will allow you
to see most of the image formats supported in ITK.



   Regards,


      Luis


------------
sd d wrote:

> thanks, but how can i normalize it?
>  i have Microsoft Photo Editor.
> 
> */Michael Eichler <michael.eichler at student.uni-tuebingen.de>/* wrote:
> 
>     Hi!
> 
>     You probably have to normalize the image to view it. Most of the
>     graphics-programs (e.g. "display") should be able to do this.
> 
>     Cheers,
>     Michael
> 
>     On Wednesday 23 June 2004 15:34, sd d wrote:
>      > I created a new Project, then i run the example
>     ImageReadWrite.cxx like
>      > that
>      >
>      > ImageReadWrite BrainProtonDensitySlice.png result.png
>      >
>      > I had black image in result.png.
>      >
>      > how can i find a solution?
>      >
>      >
>      >
>      >
>      >
>      >
>      >
>      > ---------------------------------
>      > Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
>      > Créez votre Yahoo! Mail
>      >
>      > Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !
> 
> ------------------------------------------------------------------------
> Créez gratuitement votre Yahoo! Mail avec *100 Mo de stockage !*
> Créez votre Yahoo! Mail 
> <http://fr.rd.yahoo.com/mail/mail_taglines_100/default/*http://fr.benefits.yahoo.com/> 
> 
> 
> Dialoguez en direct avec vos amis grâce à Yahoo! Messenger ! 
> <http://fr.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com/> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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