Resultstable and locale

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

Resultstable and locale

Wolfgang Gross
Hi all,

may I add a small(?) item to the ImageJ wishlist?

Resultstable d2s method contains this line
  dfs = new DecimalFormatSymbols(Locale.US);
which means other Locales are left out in the cold.
Could we have a method like setLocale ... ? That would
be nice for plugins.
Or even better: a global preference parameter eg under Edit|Options|Misc... .

The reason for this: If one copies and pastes from a resultstable
to  EXCEL under a german Windows then EXCEL will take the decimal point  
as thousands separator.

There are workarounds, ok.

Regards
Wolfgang Gross
Reply | Threaded
Open this post in threaded view
|

Re: Resultstable and locale

lechristophe
I'd like to also express my interest for this feature. Being able to specify
the format of numbers in IJ to match the system-wide settings would be
excellent.

Christophe

On Thu, Jan 13, 2011 at 15:28, Wolfgang Gross <[hidden email]> wrote:

> Hi all,
>
> may I add a small(?) item to the ImageJ wishlist?
>
> Resultstable d2s method contains this line
>  dfs = new DecimalFormatSymbols(Locale.US);
> which means other Locales are left out in the cold.
> Could we have a method like setLocale ... ? That would
> be nice for plugins.
> Or even better: a global preference parameter eg under Edit|Options|Misc...
> .
>
> The reason for this: If one copies and pastes from a resultstable
> to  EXCEL under a german Windows then EXCEL will take the decimal point
> as thousands separator.
>
> There are workarounds, ok.
>
> Regards
> Wolfgang Gross
>
Reply | Threaded
Open this post in threaded view
|

Re: Resultstable and locale

Michael Schmid
In reply to this post by Wolfgang Gross
Hi Wolfgang,

not sure whether this is a good solution:

Some ImageJ functions don't use d2s for displaying numbers, we would  
get a mix of decimal points and commas.
Even worse, essentially no input function in ImageJ can understand a  
comma as decimal separator, and it would be almost impossible to  
change this in a consistent way. When restricting it only to the way  
how the Results table is written to a file, File>Import>Results won't  
work.

As this is not only a problem with ImageJ, my solution was switching  
to English versions for all software. In a university environment, I  
found this also beneficial for our own students (train their English)  
and of course, exchange students and guests from beyond the German-
speaking countries need it anyhow.

Another option would be setting the decimal separator to a decimal  
point in the system control panel (locale). I guess that Excel should  
obey this setting, at least for the output (I am not sure about what  
it does when reading files).

Michael
________________________________________________________________

On 13 Jan 2011, at 15:28, Wolfgang Gross wrote:

> Hi all,
>
> may I add a small(?) item to the ImageJ wishlist?
>
> Resultstable d2s method contains this line
>   dfs = new DecimalFormatSymbols(Locale.US);
> which means other Locales are left out in the cold.
> Could we have a method like setLocale ... ? That would
> be nice for plugins.
> Or even better: a global preference parameter eg under Edit|Options|
> Misc... .
>
> The reason for this: If one copies and pastes from a resultstable
> to  EXCEL under a german Windows then EXCEL will take the decimal  
> point
> as thousands separator.
>
> There are workarounds, ok.
>
> Regards
> Wolfgang Gross
Reply | Threaded
Open this post in threaded view
|

Re: Resultstable and locale

Wolfgang Gross
Hi Michael,


On 13 Jan 2011 at 15:59, Michael Schmid wrote:

> Hi Wolfgang,
>
> not sure whether this is a good solution:
>
> Some ImageJ functions don't use d2s for displaying numbers, we would  
> get a mix of decimal points and commas.
Hmm, right, one would have to change statusbar info, logs, image labels etc.
> Even worse, essentially no input function in ImageJ can understand a  
> comma as decimal separator, and it would be almost impossible to  
> change this in a consistent way. When restricting it only to the way  
> how the Results table is written to a file, File>Import>Results won't  
> work.
Oops, didn't know about that one, never used it. That's not easy, right.
>
> As this is not only a problem with ImageJ, my solution was switching  
> to English versions for all software. In a university environment, I  
> found this also beneficial for our own students (train their English)  
> and of course, exchange students and guests from beyond the German-
> speaking countries need it anyhow.
Not a realistic option in many cases. One has to live with the zoo of
operating systems, standard office programs etc as it is created and maintained
by organisation politics, campus/national license programs, history etc.
>
> Another option would be setting the decimal separator to a decimal  
> point in the system control panel (locale). I guess that Excel should  
> obey this setting, at least for the output (I am not sure about what  
> it does when reading files).
That would surely break other programs.


I understand that a general change is too difficult after so many years of
ImageJ development but the proposed setLocale method could be easily added and
would not break other features.

Best regards

Wolfgang
--
Dr. W. Gross, Chirurgische Klinik I, Exp. Chirurgie, Uniklinik
Heidelberg
Im Neuenheimer Feld 365, D-69120 Heidelberg, Germany
Tel. ++49 (0)6221/566392, Fax: ++49 (0)6221/564208
[hidden email]