detect motion across frames

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

detect motion across frames

Brian Willkie-2
Hello,

I searched the list archives briefly, but didn't find this topic
specifically. It's entirely possible that I simply didn't know what to
look for.

I have access to GOES 12 satellite data (i.e. cloud data) as either
raw data, TIFF files - frame by frame - or High definition QuickTime
movie.

I'd like to use some image-processing techniques to identify pixels
that you and I would group togther as a clouds, and track their motion
from one frame to the next.

Analyze particles seems to work well to identify clouds in a given
frame. Are there any commands / plug-ins / algorithms to track their
motion/change across frames (i.e. can I get a dataset that tells me
that a given particle in the current frame is the same particle as one
found in the previous frame, although its size, shape, and/or position
have changed slightly)?

Thanks,
Brian
Reply | Threaded
Open this post in threaded view
|

Re: detect motion across frames

Michael Schell
You might try plugins-stacks-TFunctions-deltaFdown.  This will  
compare two stacks in succession, subtract pixel-by-pixel, and store  
the difference.  Thus, it makes a new stack that consists of pixels  
that changed intensity over time.  If you flatten this stack as a  
maximal projection, you can see regions that showed the greatest  
movement (although often the vectorial info is lost).   The average  
pixel intensity of the flattened stack can sometimes be assigned an  
arbitrary value as  a  "motility index."

We used this successfully to measure changes in mitochondrial  
motility caused by intracellular calcium (ref below), but it might  
work for clouds too:

Brough D  Biochemical J.  392:291 (2005).

Michael


On Apr 7, 2008, at 2:38 PM, Brian Willkie wrote:

> Hello,
>
> I searched the list archives briefly, but didn't find this topic
> specifically. It's entirely possible that I simply didn't know what to
> look for.
>
> I have access to GOES 12 satellite data (i.e. cloud data) as either
> raw data, TIFF files - frame by frame - or High definition QuickTime
> movie.
>
> I'd like to use some image-processing techniques to identify pixels
> that you and I would group togther as a clouds, and track their motion
> from one frame to the next.
>
> Analyze particles seems to work well to identify clouds in a given
> frame. Are there any commands / plug-ins / algorithms to track their
> motion/change across frames (i.e. can I get a dataset that tells me
> that a given particle in the current frame is the same particle as one
> found in the previous frame, although its size, shape, and/or position
> have changed slightly)?
>
> Thanks,
> Brian

Michael J. Schell, Ph.D., CIV, USUHS
Assist. Professor
Dept. of Pharmacology
Uniformed Services University
4301 Jones Bridge Rd.
Bethesda, MD  20814-3220
tel:  (301) 295-3249
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: detect motion across frames

Franklin Shaffer-2
In reply to this post by Brian Willkie-2
I have images that resemble clouds and I am also trying to track the motion of clouds from frame-to-frame.  Although my "clouds" are actually clusters of small particles.
 
I've been considering using cross-correlation techniques.  I know they will work because I have large structures that move small displacements from frame-to-frame.  Cross-correlating will give the magnitude and direction of the displacement of the structure between frames.  
 
Does anyone know if ImageJ has the capability to use cross-correlations to measure the displacement of large structures from frame-to-frame?
 
I'm a new user to ImageJ and I continue to be very impressed.  I was going to buy a commercial image processing software package for $5000, but I find ImageJ to be better!  I will be adding plugins to ImageJ in the near future.
 
Frank Shaffer
USDOE

>>> "Brian Willkie" <[hidden email]> 4/7/2008 2:38 PM >>>
Hello,

I searched the list archives briefly, but didn't find this topic
specifically. It's entirely possible that I simply didn't know what to
look for.

I have access to GOES 12 satellite data (i.e. cloud data) as either
raw data, TIFF files - frame by frame - or High definition QuickTime
movie.

I'd like to use some image-processing techniques to identify pixels
that you and I would group togther as a clouds, and track their motion
from one frame to the next.

Analyze particles seems to work well to identify clouds in a given
frame. Are there any commands / plug-ins / algorithms to track their
motion/change across frames (i.e. can I get a dataset that tells me
that a given particle in the current frame is the same particle as one
found in the previous frame, although its size, shape, and/or position
have changed slightly)?

Thanks,
Brian
Reply | Threaded
Open this post in threaded view
|

Re: detect motion across frames

Albert Cardona
Franklin,


> I have images that resemble clouds and I am also trying to track the motion of clouds from frame-to-frame.  Although my "clouds" are actually clusters of small particles.
>  
> I've been considering using cross-correlation techniques.  I know they will work because I have large structures that move small displacements from frame-to-frame.  Cross-correlating will give the magnitude and direction of the displacement of the structure between frames.  
>  
> Does anyone know if ImageJ has the capability to use cross-correlations to measure the displacement of large structures from frame-to-frame?
>  

Several options:

If a binarized version of your images still contains the clouds as
blobs, you may run a watershed to separate them (as described in Tony
Collins ImageJ manual) and then use any of the ImageJ multiple object
trackers (see plugins page) to track each one separately.

For cross-correlation, we have a very fast library (automatically
parallelized, scales to CPU cores) inside TrakEM2 (
http://www.ini.uzh.ch/~acardona/trakem2.html ). See the mpi.fruitfly
packages:

http://repo.or.cz/w/trakem2.git?a=tree;f=mpi/fruitfly;h=822172d1796eb55345344321229acbcb7928c513;hb=HEAD


You may even use SIFT to extract the clouds as features, and then try to
track each one across the sections. The plumbing is there, but you'd
have to do the tracking yourself, finding a subset of features for each
cloud on each frame ( see some SIFT examples, a plugin and explanations
here : http://www.ini.uzh.ch/~acardona/howto.html#feature_extraction )

Hope that helped.

Albert

--
Albert Cardona
http://www.mcdb.ucla.edu/Research/Hartenstein/acardona
Reply | Threaded
Open this post in threaded view
|

Re: detect motion across frames

GCH-2
In reply to this post by Franklin Shaffer-2
Try the Image CorrelationJ plugin available at:

http://www.gcsca.net/IJ/ImageCorrelationJ.html

Gary.
http://www.gcsca.net


> I have images that resemble clouds and I am also trying to track the
> motion of clouds from frame-to-frame.  Although my "clouds" are actually
> clusters of small particles.
>
> I've been considering using cross-correlation techniques.  I know they
> will work because I have large structures that move small displacements
> from frame-to-frame.  Cross-correlating will give the magnitude and
> direction of the displacement of the structure between frames.
>
> Does anyone know if ImageJ has the capability to use cross-correlations to
> measure the displacement of large structures from frame-to-frame?
>
> I'm a new user to ImageJ and I continue to be very impressed.  I was going
> to buy a commercial image processing software package for $5000, but I
> find ImageJ to be better!  I will be adding plugins to ImageJ in the near
> future.
>
> Frank Shaffer
> USDOE
>
>>>> "Brian Willkie" <[hidden email]> 4/7/2008 2:38 PM >>>
> Hello,
>
> I searched the list archives briefly, but didn't find this topic
> specifically. It's entirely possible that I simply didn't know what to
> look for.
>
> I have access to GOES 12 satellite data (i.e. cloud data) as either
> raw data, TIFF files - frame by frame - or High definition QuickTime
> movie.
>
> I'd like to use some image-processing techniques to identify pixels
> that you and I would group togther as a clouds, and track their motion
> from one frame to the next.
>
> Analyze particles seems to work well to identify clouds in a given
> frame. Are there any commands / plug-ins / algorithms to track their
> motion/change across frames (i.e. can I get a dataset that tells me
> that a given particle in the current frame is the same particle as one
> found in the previous frame, although its size, shape, and/or position
> have changed slightly)?
>
> Thanks,
> Brian
>
Reply | Threaded
Open this post in threaded view
|

macro dialog interface

Winnok H. De Vos
In reply to this post by Albert Cardona
Dear all

I have a small question of rather practical and esthetical nature:
Is it possible to put options and checkboxes etc in a dialog next to instead
of below each other with macro language?
Many thanks in advance.
Kind regards
Winnok

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.23.9/1417 - Release Date: 6/05/2008
8:07
 
Reply | Threaded
Open this post in threaded view
|

Re: macro dialog interface

Michael Schmid
Hi Winnok,

no, sorry, you can't. You could have several checkboxes in
one line if you write a PlugIn or PlugInFilter and use the
addPanel method of GenericDialog.
Or you completely write a java.awt.Dialog yourself.

There is a disadvantage of having your own Panel with
checkboxes - ImageJ knows nothing about them.
- You cannot use the getNexBoolean() method to read the state
   of the checkbox
- The state of the checkbox cannot be set in a macro (and not
   recorded by the Macro Recorder)

Michael
________________________________________________________________

On 7 May 2008, at 09:55, Winnok De Vos (ugent) wrote:

> Dear all
>
> I have a small question of rather practical and esthetical nature:
> Is it possible to put options and checkboxes etc in a dialog next  
> to instead
> of below each other with macro language?
> Many thanks in advance.
> Kind regards
> Winnok
Reply | Threaded
Open this post in threaded view
|

Antwort: Re: macro dialog interface

Joachim Wesner
Hi Michael,

2 bad! I used addPanel on GenericDialog myself and know of it´s
limitations.

However, "intermediately complex" plugins easily have more configurable
options so that
GenericDialogs quickly become too high to fit on smaller screens.

I also would find it VERY useful if one could come up with an updated
version of GenericDialog
that makes 2D placing the dialog elements (so at least on the Java level)
more convenient without
loosing the advantages of it. THAT WOULD BE GREAT!

Joachim

ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008 10:13:12:

> Hi Winnok,
>
> no, sorry, you can't. You could have several checkboxes in
> one line if you write a PlugIn or PlugInFilter and use the
> addPanel method of GenericDialog.
> Or you completely write a java.awt.Dialog yourself.
>
> There is a disadvantage of having your own Panel with
> checkboxes - ImageJ knows nothing about them.
> - You cannot use the getNexBoolean() method to read the state
>    of the checkbox
> - The state of the checkbox cannot be set in a macro (and not
>    recorded by the Macro Recorder)
>
> Michael
> ________________________________________________________________
>
> On 7 May 2008, at 09:55, Winnok De Vos (ugent) wrote:
>
> > Dear all
> >
> > I have a small question of rather practical and esthetical nature:
> > Is it possible to put options and checkboxes etc in a dialog next
> > to instead
> > of below each other with macro language?
> > Many thanks in advance.
> > Kind regards
> > Winnok


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: macro dialog interface

Winnok H. De Vos
In reply to this post by Michael Schmid
Dear Michael

Thanks for your quick response and explanation.
I'll deal with the screen-high window for now and if expansion is necessary
follow up on your suggestions.
Kind regards,
Winnok


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
Michael Schmid
Sent: woensdag 7 mei 2008 10:13
To: [hidden email]
Subject: Re: macro dialog interface

Hi Winnok,

no, sorry, you can't. You could have several checkboxes in
one line if you write a PlugIn or PlugInFilter and use the
addPanel method of GenericDialog.
Or you completely write a java.awt.Dialog yourself.

There is a disadvantage of having your own Panel with
checkboxes - ImageJ knows nothing about them.
- You cannot use the getNexBoolean() method to read the state
   of the checkbox
- The state of the checkbox cannot be set in a macro (and not
   recorded by the Macro Recorder)

Michael
________________________________________________________________

On 7 May 2008, at 09:55, Winnok De Vos (ugent) wrote:

> Dear all
>
> I have a small question of rather practical and esthetical nature:
> Is it possible to put options and checkboxes etc in a dialog next  
> to instead
> of below each other with macro language?
> Many thanks in advance.
> Kind regards
> Winnok

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.23.9/1417 - Release Date: 6/05/2008
8:07
 

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.23.9/1417 - Release Date: 6/05/2008
8:07
 
Reply | Threaded
Open this post in threaded view
|

Re: Antwort: Re: macro dialog interface

Unruh, Jay
In reply to this post by Joachim Wesner
One option might be to use the JTable as sort of a spreadsheet entry table rather than a dialog with multiple components.  Unfortunately, that would require implementing the JDialog rather than the Dialog class.

Jay

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Joachim Wesner
Sent: Wednesday, May 07, 2008 3:23 AM
To: [hidden email]
Subject: Antwort: Re: macro dialog interface

Hi Michael,

2 bad! I used addPanel on GenericDialog myself and know of it´s limitations.

However, "intermediately complex" plugins easily have more configurable options so that GenericDialogs quickly become too high to fit on smaller screens.

I also would find it VERY useful if one could come up with an updated version of GenericDialog that makes 2D placing the dialog elements (so at least on the Java level) more convenient without loosing the advantages of it. THAT WOULD BE GREAT!

Joachim

ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008 10:13:12:

> Hi Winnok,
>
> no, sorry, you can't. You could have several checkboxes in one line if
> you write a PlugIn or PlugInFilter and use the addPanel method of
> GenericDialog.
> Or you completely write a java.awt.Dialog yourself.
>
> There is a disadvantage of having your own Panel with checkboxes -
> ImageJ knows nothing about them.
> - You cannot use the getNexBoolean() method to read the state
>    of the checkbox
> - The state of the checkbox cannot be set in a macro (and not
>    recorded by the Macro Recorder)
>
> Michael
> ________________________________________________________________
>
> On 7 May 2008, at 09:55, Winnok De Vos (ugent) wrote:
>
> > Dear all
> >
> > I have a small question of rather practical and esthetical nature:
> > Is it possible to put options and checkboxes etc in a dialog next to
> > instead of below each other with macro language?
> > Many thanks in advance.
> > Kind regards
> > Winnok


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Antwort: Re: Antwort: Re: macro dialog interface

Joachim Wesner
Hi Jay,

Naah... !!!

For a regular field of entries using an extra Panel is pretty OK,
I was think along a more arbitrary, irregular positioning of elements.

Actually, there already IS the not much documented capability for
"fine positioning" via setInsets(). Maybe one could extend GenericDialog
along that line???

Joachim


ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008 16:21:17:

> One option might be to use the JTable as sort of a spreadsheet entry
> table rather than a dialog with multiple components.  Unfortunately,
> that would require implementing the JDialog rather than the Dialog class.
>
> Jay
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf
> Of Joachim Wesner
> Sent: Wednesday, May 07, 2008 3:23 AM
> To: [hidden email]
> Subject: Antwort: Re: macro dialog interface
>
> Hi Michael,
>
> 2 bad! I used addPanel on GenericDialog myself and know of it´s
limitations.

>
> However, "intermediately complex" plugins easily have more
> configurable options so that GenericDialogs quickly become too high
> to fit on smaller screens.
>
> I also would find it VERY useful if one could come up with an
> updated version of GenericDialog that makes 2D placing the dialog
> elements (so at least on the Java level) more convenient without
> loosing the advantages of it. THAT WOULD BE GREAT!
>
> Joachim
>
> ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008
10:13:12:

>
> > Hi Winnok,
> >
> > no, sorry, you can't. You could have several checkboxes in one line if
> > you write a PlugIn or PlugInFilter and use the addPanel method of
> > GenericDialog.
> > Or you completely write a java.awt.Dialog yourself.
> >
> > There is a disadvantage of having your own Panel with checkboxes -
> > ImageJ knows nothing about them.
> > - You cannot use the getNexBoolean() method to read the state
> >    of the checkbox
> > - The state of the checkbox cannot be set in a macro (and not
> >    recorded by the Macro Recorder)
> >
> > Michael
> > ________________________________________________________________
> >
> > On 7 May 2008, at 09:55, Winnok De Vos (ugent) wrote:
> >
> > > Dear all
> > >
> > > I have a small question of rather practical and esthetical nature:
> > > Is it possible to put options and checkboxes etc in a dialog next to
> > > instead of below each other with macro language?
> > > Many thanks in advance.
> > > Kind regards
> > > Winnok
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: macro dialog interface

Wayne Rasband
In reply to this post by Winnok H. De Vos
> I have a small question of rather practical and esthetical nature:
> Is it possible to put options and checkboxes etc in a dialog next to
> instead
> of below each other with macro language?
> Many thanks in advance.
> Kind regards
> Winnok

In the v1.41c daily build you can use the

     Dialog.addCheckboxGroup(rows, columns, labels, defaults)

function to add a grid of checkboxes to a dialog box. Here is an
example:

   rows = 2;
   columns = 3;
   n = rows*columns;
   labels = newArray(n);
   defaults = newArray(n);
   for (i=0; i<n; i++) {
      labels[i] = "Checkbox "+i+1;
      if ((i%2)==0)
          defaults[i] = true;
      else
          defaults[i] = false;
   }
   Dialog.create("Checkbox Group");
   Dialog.addCheckboxGroup(rows,columns,labels,defaults);
   Dialog.show();
   for (i=0; i<n; i++)
       print(labels[i]+": "+Dialog.getCheckbox());

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: Antwort: Re: macro dialog interface

ctrueden
In reply to this post by Unruh, Jay
Hi guys,

A couple of points:

1) If you use a Java plugin, you can do pretty much whatever you want.
Create your GenericDialog, add the components, then use the methods at the
java.awt level such as getComponents(), remove() and add() as well as your
own layout manager to reorganize things however you like. For an example,
check out this method I wrote for adding scroll bars to a GenericDialog: <
https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/loci/plugins/Util.java#L343
>.

2) You can put Swing components in an AWT frame, so adding a JTable to a
Dialog should be no problem as long as it does not need to appear on top of
an overlapping AWT component. See Sun's venerable article for details: <
http://java.sun.com/products/jfc/tsc/articles/mixing/>.

-Curtis

On Wed, May 7, 2008 at 9:21 AM, Unruh, Jay <[hidden email]>
wrote:

> One option might be to use the JTable as sort of a spreadsheet entry table
> rather than a dialog with multiple components.  Unfortunately, that would
> require implementing the JDialog rather than the Dialog class.
>
> Jay
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Joachim Wesner
> Sent: Wednesday, May 07, 2008 3:23 AM
> To: [hidden email]
> Subject: Antwort: Re: macro dialog interface
>
> Hi Michael,
>
> 2 bad! I used addPanel on GenericDialog myself and know of it´s
> limitations.
>
> However, "intermediately complex" plugins easily have more configurable
> options so that GenericDialogs quickly become too high to fit on smaller
> screens.
>
> I also would find it VERY useful if one could come up with an updated
> version of GenericDialog that makes 2D placing the dialog elements (so at
> least on the Java level) more convenient without loosing the advantages of
> it. THAT WOULD BE GREAT!
>
> Joachim
>
> ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008
> 10:13:12:
>
> > Hi Winnok,
> >
> > no, sorry, you can't. You could have several checkboxes in one line if
> > you write a PlugIn or PlugInFilter and use the addPanel method of
> > GenericDialog.
> > Or you completely write a java.awt.Dialog yourself.
> >
> > There is a disadvantage of having your own Panel with checkboxes -
> > ImageJ knows nothing about them.
> > - You cannot use the getNexBoolean() method to read the state
> >    of the checkbox
> > - The state of the checkbox cannot be set in a macro (and not
> >    recorded by the Macro Recorder)
> >
> > Michael
> > ________________________________________________________________
> >
> > On 7 May 2008, at 09:55, Winnok De Vos (ugent) wrote:
> >
> > > Dear all
> > >
> > > I have a small question of rather practical and esthetical nature:
> > > Is it possible to put options and checkboxes etc in a dialog next to
> > > instead of below each other with macro language?
> > > Many thanks in advance.
> > > Kind regards
> > > Winnok
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email______________________________________________________________________
>
Reply | Threaded
Open this post in threaded view
|

Antwort: Re: Antwort: Re: macro dialog interface

Joachim Wesner
Hi Curtis,

thanx for the pointers. Actually, if the recent addition Wayne made
regarding adding
Checkbox groups (jn an mcro) are also directly available in a Java plugin
(I assume so, I I need
to look up the daily source code to see how it´s implemented) it will
already help a lot
cleaning up some of my dialogs!

Cheers

Joachim


ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008 18:14:14:

> Hi guys,
>
> A couple of points:
>
> 1) If you use a Java plugin, you can do pretty much whatever you want.
> Create your GenericDialog, add the components, then use the methods at
the
> java.awt level such as getComponents(), remove() and add() as well as
your
> own layout manager to reorganize things however you like. For an example,
> check out this method I wrote for adding scroll bars to a GenericDialog:
<
> https://skyking.microscopy.wisc.
> edu/trac/java/browser/trunk/loci/plugins/Util.java#L343
> >.
>
> 2) You can put Swing components in an AWT frame, so adding a JTable to a
> Dialog should be no problem as long as it does not need to appear on top
of
> an overlapping AWT component. See Sun's venerable article for details: <
> http://java.sun.com/products/jfc/tsc/articles/mixing/>.
>
> -Curtis
>
> On Wed, May 7, 2008 at 9:21 AM, Unruh, Jay <[hidden email]>
> wrote:
>
> > One option might be to use the JTable as sort of a spreadsheet entry
table
> > rather than a dialog with multiple components.  Unfortunately, that
would

> > require implementing the JDialog rather than the Dialog class.
> >
> > Jay
> >
> > -----Original Message-----
> > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> > Joachim Wesner
> > Sent: Wednesday, May 07, 2008 3:23 AM
> > To: [hidden email]
> > Subject: Antwort: Re: macro dialog interface
> >
> > Hi Michael,
> >
> > 2 bad! I used addPanel on GenericDialog myself and know of it´s
> > limitations.
> >
> > However, "intermediately complex" plugins easily have more configurable
> > options so that GenericDialogs quickly become too high to fit on
smaller
> > screens.
> >
> > I also would find it VERY useful if one could come up with an updated
> > version of GenericDialog that makes 2D placing the dialog elements (so
at
> > least on the Java level) more convenient without loosing the advantages
of

> > it. THAT WOULD BE GREAT!
> >
> > Joachim
> >
> > ImageJ Interest Group <[hidden email]> schrieb am 07.05.2008
> > 10:13:12:
> >
> > > Hi Winnok,
> > >
> > > no, sorry, you can't. You could have several checkboxes in one line
if

> > > you write a PlugIn or PlugInFilter and use the addPanel method of
> > > GenericDialog.
> > > Or you completely write a java.awt.Dialog yourself.
> > >
> > > There is a disadvantage of having your own Panel with checkboxes -
> > > ImageJ knows nothing about them.
> > > - You cannot use the getNexBoolean() method to read the state
> > >    of the checkbox
> > > - The state of the checkbox cannot be set in a macro (and not
> > >    recorded by the Macro Recorder)
> > >
> > > Michael
> > > ________________________________________________________________
> > >
> > > On 7 May 2008, at 09:55, Winnok De Vos (ugent) wrote:
> > >
> > > > Dear all
> > > >
> > > > I have a small question of rather practical and esthetical nature:
> > > > Is it possible to put options and checkboxes etc in a dialog next
to

> > > > instead of below each other with macro language?
> > > > Many thanks in advance.
> > > > Kind regards
> > > > Winnok
> >
> >
> > ______________________________________________________________________
> > This email has been scanned by the MessageLabs Email Security System.
> > For more information please visit http://www.messagelabs.
>
com/email______________________________________________________________________

> >


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: macro dialog interface

Winnok H. De Vos
In reply to this post by Wayne Rasband
Thanks Wayne that's great!
Do you think it will be expanded to other Dialog attributes such as options
and numbers or a more general Dialog.addGroup function?
Kind regards,
Winnok

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Wayne
Rasband
Sent: woensdag 7 mei 2008 17:29
To: [hidden email]
Subject: Re: macro dialog interface

> I have a small question of rather practical and esthetical nature:
> Is it possible to put options and checkboxes etc in a dialog next to
> instead
> of below each other with macro language?
> Many thanks in advance.
> Kind regards
> Winnok

In the v1.41c daily build you can use the

     Dialog.addCheckboxGroup(rows, columns, labels, defaults)

function to add a grid of checkboxes to a dialog box. Here is an
example:

   rows = 2;
   columns = 3;
   n = rows*columns;
   labels = newArray(n);
   defaults = newArray(n);
   for (i=0; i<n; i++) {
      labels[i] = "Checkbox "+i+1;
      if ((i%2)==0)
          defaults[i] = true;
      else
          defaults[i] = false;
   }
   Dialog.create("Checkbox Group");
   Dialog.addCheckboxGroup(rows,columns,labels,defaults);
   Dialog.show();
   for (i=0; i<n; i++)
       print(labels[i]+": "+Dialog.getCheckbox());

-wayne

No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.23.9/1417 - Release Date: 6/05/2008
8:07
 

No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.23.9/1417 - Release Date: 6/05/2008
8:07
 
Reply | Threaded
Open this post in threaded view
|

Re: macro dialog interface

Dimiter Prodanov-2
In reply to this post by Winnok H. De Vos
Hi Winnok,

What you can do is to have serial dialog openings like hierarchical system.
But then sometimes you have to catch ArrayIndexOutOfBonds exception.

Hope that helps,

Dimiter