Greetings Michael,

I have only faced scaling issues, i.e., rounding off to 0.00, never a
purely precision issue as in your example. Generally two or three
significant digits is sufficient in scientific notation, as this is only
controlling the visual grey scale.

Generally the use case for this are the images that are currently in
development, and thus the reason for using the GUI instead of setting the
W&L programmatically. I try not to scale the image values as this tends to
get confusing when trying to keep the physic, modeling, and programming in
my head and remembering if I scaled the image.

For Label(s) that I will be dynamically changing, I create the label with
the longest string that will be produced; as Label does not seem to
respect the width you request. After the Label is create then I set the
initial value; a nuisance, but it works.

Thanks for the quick reply,

Fred

PS: thanks to others for the other stuff...


On Thu, September 5, 2024 4:10 pm, Michael Schmid wrote:
> Hi Fred,
>
> in principle one could fix this in the 'Set' dialog of Window/Level, but
> I fear that there are aboput a hundred places in ImageJ where pixel
> values or calibrated coordinates are shown with two digits behind the
> decimal point.
>
> In principle, ImageJ has a function
>     IJ.d2s(value, significantDigits, maxDigits)
> which automatically switches to scientific notation and could be used in
> all these places, but then there is the problem how many significant
> digits to display. If the pixel values are all between 10000 and 10001,
> one should have more digits behind the decimal point than for pixel
> values between -10000 and +10000.
> In most cases, displaying 7 significant digits (roughly the accuracy of
> 32-bit floating point numbers) would be too much, not user friendly.
>
> My usual solution is using a unit for the pixel values where typical
> values are in the range of tens or hundreds.
> E.g., for high-resolution STM images (where the pixel value corresponds
> to height and the noise is on the order of 1 picometer), I use
> picometers as the unit of the pixel values.
>
>
> Michael
> ________________________________________________________________
> On 05.09.24 21:51, Fred Damen wrote:
>> Greetings,
>>
>> As I deal mainly with 32bit images in there appropriate units - viz
>> values
>> generally not within the range normal for images, it is frustrating that
>> I
>> need to do a histogram to determine the values for W&L. The main W&L
>> window value display crops off at too few pixels, and the set window
>> rounds to 0.00. I would propose the W&L main window preset the length of
>> the Label field to the width of the window, and scientific notation used
>> when appropriate.
>>
>> See attached image, or run below.
>> newImage("r", "32-bit noise", 128, 128, 1);
>> run("Multiply...", "value=0.000001");
>> run("Enhance Contrast", "saturated=0.35");
>> run("Histogram", "bins=256 use x_min=-3.111E-6 x_max=3.281E-6
>> y_max=Auto");
>> selectImage("r");
>> // W&L/Set...
>> run("System Clipboard");
>> saveAs("PNG", "/tmp/Clipboard.png");
>>
>> Thanks in advance,
>>
>> Fred
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Reply via email to