Re: Scientific notation within a numericField of a GenericDialog
Posted by
CARL Philippe (LBP) on
Mar 09, 2021; 8:20pm
URL: http://imagej.273.s1.nabble.com/Scientific-notation-within-a-numericField-of-a-GenericDialog-tp5024509p5024512.html
Dear Michael,
Thanks a lot for your (as always) very sharp answer which is working as described!
I had lost myself in way more complicated solutions.
Kindest regards,
Philippe
----- Mail original -----
De: "Michael Schmid" <
[hidden email]>
À: "imagej" <
[hidden email]>
Envoyé: Mardi 9 Mars 2021 20:55:55
Objet: Re: Scientific notation within a numericField of a GenericDialog
Hi Philippe,
you can specify a negative number for the number of digits, then ImageJ
uses scientific notation. It is the same as with IJ.d2s (java) or d2s
(macro).
Macro example:
Dialog.create("test");
Dialog.addNumber("the number", 1.0, -3, 8, "units");
Dialog.show();
Michael
________________________________________________________________
On 09.03.21 19:59, CARL Philippe (LBP) wrote:
> Dear all,
> Is there a way to force the content of a numericField (at least for its defaultValue) within a GenericDialog to be shown with scientific notations.
> I thank very much in advance for your help on this.
> My best regards,
> Philippe
>
> Philippe CARL
> Laboratoire de Bioimagerie et Pathologies
> UMR 7021 CNRS - Université de Strasbourg
> Faculté de Pharmacie
> 74 route du Rhin
> 67401 ILLKIRCH
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html