Login  Register

ImageJ and decimal arithmetic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

ImageJ and decimal arithmetic

ericbarnhill
14 posts
I was recently asking a few code strategy questions over at other Java  
forums and every reply I got contained the same advice: switch to  
decimal arithmetic. This seems to be something considered basic  
practice in a lot of Java circles. And the links they pointed me to  
regarding the dangers of floating point were pretty hair-raising.

Is anyone incorporating decimal math into their ImageJ processing? And  
if so may I ask how you are doing it? Has anyone by chance created a  
Decimal Processor for themselves?

Thanks,
Eric



---
Eric Barnhill
Clinical Research Imaging Centre
The University of Edinburgh

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: ImageJ and decimal arithmetic

ctrueden
1670 posts
Hi Eric,

> Is anyone incorporating decimal math into their ImageJ processing?

We have plans in ImageJ2 and ImgLib2 to incorporate BigInteger- and
BigDecimal-based numerical processing types, for the reasons you allude to,
but we have not implemented it yet.

Note that while processing with these types would eliminate the error
associated with fixed-bit-depth numerical processing, but at a large
performance penalty. So there are always tradeoffs.

I noticed we didn't have a ticket for this work in our issue tracker yet,
so I filed one:
http://trac.imagej.net/ticket/1653

If you want to be CCed on progress, let me know and I will add you to the
ticket.

> Has anyone by chance created a Decimal Processor for themselves?

ImageJ1 is not designed to accommodate additional types of ImageProcessors.
You will need to wait for ImageJ2 if you want built-in support for such
things.

Regards,
Curtis


On Thu, Feb 21, 2013 at 3:06 PM, Eric Barnhill <[hidden email]>wrote:

> I was recently asking a few code strategy questions over at other Java
> forums and every reply I got contained the same advice: switch to decimal
> arithmetic. This seems to be something considered basic practice in a lot
> of Java circles. And the links they pointed me to regarding the dangers of
> floating point were pretty hair-raising.
>
> Is anyone incorporating decimal math into their ImageJ processing? And if
> so may I ask how you are doing it? Has anyone by chance created a Decimal
> Processor for themselves?
>
> Thanks,
> Eric
>
>
>
> ---
> Eric Barnhill
> Clinical Research Imaging Centre
> The University of Edinburgh
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.**html<http://imagej.nih.gov/ij/list.html>
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html