http://imagej.273.s1.nabble.com/Handling-signed-and-unsigned-16-bit-images-tp3693185p3693186.html
Right, Java has no unsigned types - but it is only a matter of a few bit operations to treat 16-bit words as either signed (default) or unsigned. However, I don't think there is any way to mark a ShortProcessor as "signed", so a plugin cannot distinguish between unsigned and signed images (unless you make assumptions).
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On
> Behalf Of Reinhard Mayr aka Czerwinski
> Sent: Tuesday, March 24, 2009 1:43 PM
> To:
[hidden email]
> Subject: Re: Handling signed and unsigned 16-bit images
>
> Mike,
>
> I once extended the AVIReader for a certain kind of 16bit
> AVIs
> (
http://rsb.info.nih.gov/ij/plugins/download/AVI_Reader.java).
> Maybe you find something useful there.
>
> As far as I remember, the major problem is that Java does not
> know unsigned data types.
>
> Hth & all the best!
>
> Reinhard.
>
> -------- Original-Nachricht --------
> > Datum: Tue, 24 Mar 2009 11:15:15 +0000
> > Von: Michael Doube <
[hidden email]>
> > An:
[hidden email]
> > Betreff: Handling signed and unsigned 16-bit images
>
> > Hi all
> >
> > After a bit of googling and hacking and tying myself in
> knots, I have to
> > ask the list how people write plugins that can elegantly
> handle both
> > signed and unsigned 16-bit images?
> >
> > I had a play with
>
http://rsbweb.nih.gov/ij/plugins/converter.html, and
> > will continue in this sort of direction unless there's a
> known better
> > way to do it.
> >
> > Cheers
> >
> > Mike
>
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s
> mit allen:
http://www.gmx.net/de/go/multimessenger01>