Scaling

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

Scaling

Kirmse Robert
Dear Group,

I have a problem and I don´t know if I made an error in reasoning or ...
I have the Version 1.35b using java 1.5.0-beta2.

I have an image

with the following parameter (from the Info window)
Title: 007266.tif
Width:  2.57 inches (2058)
Height:  3.73 inches (2984)
Resolution:  800 pixels per inch
Bits per pixel: 8 (grayscale LUT)
No Threshold
Magnification: 0.25
Uncalibrated
+++++++++++++++++++++++++++++++++

I want to measure in cm so I set "Unit of Length" in the properties window
to cm.
looking in Info again gives

Title: 007266.tif
Width:  6.59 cm (2058)
Height:  9.55 cm (2984)
Resolution:  312.50 pixels per cm
Bits per pixel: 8 (grayscale LUT)
No Threshold
Magnification: 0.25
Uncalibrated

But! (when calculating by myself taking 2.54 cm = 1 inch)

shouldn´t the values be like (not rounded)
Width: 6.5278 cm
Height: 9.4742 cm
Resolution 314.9606 (if 800/2.54)

Even when rounding to two digits I get other values than ImageJ.
When dividing the total pixels through the width in cm the values will not
fit either.
It seems like a fairly large rounding error to me.

So can someone tell me if I do something wrong or is it a bug.
Or will ImageJ calculate correctly when I use "Set scale" and
enter 314.7 pixel equals 1 cm

Thank you all very much in advance

Cheers
robert





 
Reply | Threaded
Open this post in threaded view
|

Re: Scaling

Wayne Rasband
> Dear Group,
>
> I have a problem and I don´t know if I made an error in reasoning or
> ...
> I have the Version 1.35b using java 1.5.0-beta2.

This bug is fixed in ImageJ 1.35r, available at
<http://rsb.info.nih.gov/ij/notes.html>. Earlier versions of ImageJ
would sometimes generate an incorrect scale when you changed units
(e.g., "inch" to "cm") in the Image>Properties dialog.

-wayne

>
> I have an image
>
> with the following parameter (from the Info window)
> Title: 007266.tif
> Width:  2.57 inches (2058)
> Height:  3.73 inches (2984)
> Resolution:  800 pixels per inch
> Bits per pixel: 8 (grayscale LUT)
> No Threshold
> Magnification: 0.25
> Uncalibrated
> +++++++++++++++++++++++++++++++++
>
> I want to measure in cm so I set "Unit of Length" in the
> properties window to cm.
> looking in Info again gives
>
> Title: 007266.tif
> Width:  6.59 cm (2058)
> Height:  9.55 cm (2984)
> Resolution:  312.50 pixels per cm
> Bits per pixel: 8 (grayscale LUT)
> No Threshold
> Magnification: 0.25
> Uncalibrated
>
> But! (when calculating by myself taking 2.54 cm = 1 inch)
>
> shouldn´t the values be like (not rounded)
> Width: 6.5278 cm
> Height: 9.4742 cm
> Resolution 314.9606 (if 800/2.54)
>
> Even when rounding to two digits I get other values than ImageJ.
> When dividing the total pixels through the width in cm the
> values will not fit either.
> It seems like a fairly large rounding error to me.
>
> So can someone tell me if I do something wrong or is it a bug.
> Or will ImageJ calculate correctly when I use "Set scale" and
> enter 314.7 pixel equals 1 cm
>
> Thank you all very much in advance
>
> Cheers
> robert
>
>
>
>
>
>
>