Re: Global scale is reset (BUG)

Posted by jumpfunky on
URL: http://imagej.273.s1.nabble.com/Global-scale-is-reset-BUG-tp5015924p5015929.html

Dear Herbi,
thanks for the information, but this is not what I'm looking for.

I'm looking for a way to determine in a macro if the scale was set
globally or locally. Unfortunately I can't use the title, because
getTitle() does not contain the "(G)" which means there is no way to
detect it by parsing the title. So in short, I want to do the following
in my macro:

if(isGlobalScale){
        do this
}
else{
        do that
}

Any ideas for determining 'isGlobalScale'?


Cheers,
Thorsten

Am Freitag, den 18.03.2016, 10:43 +0100 schrieb Herbie:

> Thorsten,
>
> it's all written in the User-Guide:
>
> "XXIII Global Calibrations
>
> Calibration settings related to spatial (pixel width, height and
> voxel 
> depth), temporal (frame interval) and luminance (brightness)
> information 
> can be set globally, i.e., can be applied to all images opened
> during 
> the current session instead of just the active image. The Global
> flag 
> can be set in three dialog prompts:
>
> 1. Image . Properties. . . [P] (pixel width, height, voxel depth,
> frame 
> interval)
> 2. Analyze . Set Scale. . . (pixel width and height)
> 3. Analyze . Calibrate. . . (pixel intensity)
>
> Once Global calibration is set, a ‘(G)’ is displayed in all image
> titles 
> until ImageJ is closed. A warning message is displayed when a
> calibrated 
> image with conflicting calibration is opened and the Global option
> is 
> enabled.
> Choose Disable Global Calibration to stop using global settings or 
> Disable these Messages to keep respecting global settings, ignoring
> the 
> calibration of the newly open image."
>
> HTH
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::::
> Am 18.03.16 um 10:25 schrieb Thorsten Wagner:
> >
> > Dear Herbie,
> >
> > thank you for your fast response.
> >
> > Is there a way to find out in a macro if the current scale is
> > global?
> > I have seen that in the title a (G) is added, but is this the only
> > way
> > I can check it?
> >
> > Cheers,
> > Thorsten
> > Am Freitag, den 18.03.2016, 09:59 +0100 schrieb Herbie:
> > >
> > > Thorsten,
> > >
> > > The User-Guide tells us:
> > >
> > > "When Global is checked, the scale defined in this dialog is used
> > > for
> > > all opened images during the current session instead of just the
> > > active
> > > image, see XXIII Global Calibrations."
> > >
> > > "current session" is what matters here...
> > >
> > > Best
> > >
> > > Herbie
> > >
> > > :::::::::::::::::::::::::::::::::::::::::::::
> > > Am 18.03.16 um 09:18 schrieb Thorsten Wagner:
> > > >
> > > >
> > > > Dear List,
> > > >
> > > > given the images A and B.
> > > >
> > > > When I set the global scale for an image A via
> > > >
> > > > run("Set Scale...", "known=5 unit=nm global");
> > > >
> > > > and then reset the scale only for A via
> > > > selectWindow("A");
> > > > run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel");
> > > >
> > > > then the scale is also reset for B.
> > > >
> > > > This is not what I've expected.
> > > >
> > > > Is that for purpose or a bug?
> > > >
> > > > Cheers,
> > > > Thorsten
> > > >
> > > > --
> > > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> > > >
> > > --
> > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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