Login  Register

macro to grade and digitize xrays

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

macro to grade and digitize xrays

J.J. Trey Crisco
2 posts
I have gone through all the help I can find, but still stuck!  I have x-rays images from over 100 subjects.  I am trying to create a macro that I can send to various scorers.  I have successfully created code that will sort and identify images and presents dialog boxes for  scores.  Now, I want them to simply digitize 5 points on one of the uploaded images.  I want this to occur in the macro so I can save scores and xy coordinates.  

How do you  have the user digitize 5 points in the macro when prompted then collect the xy data?  

I try getCursorLoc, but its a continuous stream before the user clicks the points. I tried setting point and multipoint, create a dialog, but it doesn't allow the dialog to remain open while digitizing?  This must be so simple  but I am missing something

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: macro to grade and digitize xrays

Cammer, Michael
283 posts
Does this help?

  for (i=0; i<5; i++) {
    do {
       getCursorLoc(x, y, z, flag);
     }  while (flag&16==0);
     print ("Point # "+(i+1)+" clicked at "+x+", "+y);
     wait(250);
  } //i

Regards,

Michael C.

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of J.J. Trey Crisco
Sent: Friday, July 12, 2013 3:39 PM
To: [hidden email]
Subject: macro to grade and digitize xrays

I have gone through all the help I can find, but still stuck!  I have x-rays images from over 100 subjects.  I am trying to create a macro that I can send to various scorers.  I have successfully created code that will sort and identify images and presents dialog boxes for  scores.  Now, I want them to simply digitize 5 points on one of the uploaded images.  I want this to occur in the macro so I can save scores and xy coordinates.  

How do you  have the user digitize 5 points in the macro when prompted then collect the xy data?  

I try getCursorLoc, but its a continuous stream before the user clicks the points. I tried setting point and multipoint, create a dialog, but it doesn't allow the dialog to remain open while digitizing?  This must be so simple  but I am missing something

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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: macro to grade and digitize xrays

J.J. Trey Crisco
2 posts
Yes, That does it! I was missing the wait (250), which I could not find any
documentation on why that works!  Thanks, Trey




J.J. Trey Crisco, Ph.D.
Henry Frederick Lippitt Professor of Orthopaedic Research
Director Bioengineering Laboratory, Department of Orthopaedics
The Warren Alpert Medical School of Brown University and Rhode Island
Hospital

Editor-in-Chief, Journal of Applied Biomechanics

Address/Mailing: 1 Hoppin Street, Suite 404 Coro West, Providence, RI 02903
email: [hidden email]
web page: http://www.brownbiomechanics.org
Tel: 401-444-4231  Fax: 401-444-4418


On Fri, Jul 12, 2013 at 4:20 PM, Cammer, Michael <[hidden email]
> wrote:

> Does this help?
>
>   for (i=0; i<5; i++) {
>     do {
>        getCursorLoc(x, y, z, flag);
>      }  while (flag&16==0);
>      print ("Point # "+(i+1)+" clicked at "+x+", "+y);
>      wait(250);
>   } //i
>
> Regards,
>
> Michael C.
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> J.J. Trey Crisco
> Sent: Friday, July 12, 2013 3:39 PM
> To: [hidden email]
> Subject: macro to grade and digitize xrays
>
> I have gone through all the help I can find, but still stuck!  I have
> x-rays images from over 100 subjects.  I am trying to create a macro that I
> can send to various scorers.  I have successfully created code that will
> sort and identify images and presents dialog boxes for  scores.  Now, I
> want them to simply digitize 5 points on one of the uploaded images.  I
> want this to occur in the macro so I can save scores and xy coordinates.
>
> How do you  have the user digitize 5 points in the macro when prompted
> then collect the xy data?
>
> I try getCursorLoc, but its a continuous stream before the user clicks the
> points. I tried setting point and multipoint, create a dialog, but it
> doesn't allow the dialog to remain open while digitizing?  This must be so
> simple  but I am missing something
>
> --
> 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