Closing Plot Values Window in a Macro

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

Closing Plot Values Window in a Macro

Navinah Nundlall
Good afternoon all,

Does anyone know how to close the Plot Values Window in a Macro, once I have saved it as an Excel Spreadsheet ( saveAs("Text",....) )? I have tried to use close() but this only seems to apply to Windows that are Image-type Windows.

Thank you.

Navinah Nundlall
Medical Physics and Imaging - Trainee Clinical Scientist
Internal:        2267
Email:   [hidden email]
Web:     http://www.uhb.nhs.uk

There are many ways for you to make a difference as a member of Queen Elizabeth and Selly Oak hospitals.
To find out more about becoming a member, please contact the membership team by email at [hidden email], or visit www.uhb.nhs.uk


Medical - University Hospitals Birmingham NHS Foundation Trust


[cid:604415014@08022010-304B]

DISCLAIMER:
This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.

logo.gif (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Closing Plot Values Window in a Macro

Gluender-3
Good day!

The macro functions manual tells us:

close()
Closes the active image. This function has the advantage of not
closing the "Log" or "Results" window when you meant to close the
active image. Use run("Close") to close non-image windows.

>Good afternoon all,
>
>Does anyone know how to close the Plot Values Window in a Macro,
>once I have saved it as an Excel Spreadsheet ( saveAs("Text",....)
>)? I have tried to use close() but this only seems to apply to
>Windows that are Image-type Windows.
>
>Thank you.
>
>Navinah Nundlall
>Medical Physics and Imaging - Trainee Clinical Scientist
>Internal:        2267
>Email:   [hidden email]
>Web:     http://www.uhb.nhs.uk
>

HTH
--

                   Herbie

          ------------------------
          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: Closing Plot Values Window in a Macro

Navinah Nundlall
Hello,

Thank you for your response. Unfortunately that doesn't seem to work either. When I am running my Macro in Debug mode, it closes the text file when it gets to run("Close"). Also, when I run the Macro directly from ImageJ option, it just closes the main Image Window.
Below is a snippet of the code:
                                        selectWindow("Plot Values");
                                        Run("Close");
Thank you.

Navinah Nundlall
Medical Physics and Imaging - Trainee Clinical Scientist

Internal: 2267
Email:    [hidden email]
Web:      http://www.uhb.nhs.uk

There are many ways for you to make a difference as a member of Queen Elizabeth and Selly Oak hospitals.
To find out more about becoming a member, please contact the membership team by email at [hidden email], or visit www.uhb.nhs.uk


Medical - University Hospitals Birmingham NHS Foundation Trust




ð Delivering the best in care




-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gluender
Sent: 08 February 2010 15:50
To: [hidden email]
Subject: Re: Closing Plot Values Window in a Macro


Good day!

The macro functions manual tells us:

close()
Closes the active image. This function has the advantage of not
closing the "Log" or "Results" window when you meant to close the
active image. Use run("Close") to close non-image windows.

>Good afternoon all,
>
>Does anyone know how to close the Plot Values Window in a Macro,
>once I have saved it as an Excel Spreadsheet ( saveAs("Text",....)
>)? I have tried to use close() but this only seems to apply to
>Windows that are Image-type Windows.
>
>Thank you.
>
>Navinah Nundlall
>Medical Physics and Imaging - Trainee Clinical Scientist
>Internal:        2267
>Email:   [hidden email]
>Web:     http://www.uhb.nhs.uk
>

HTH
--

                   Herbie

          ------------------------
          <http://www.gluender.de>

DISCLAIMER:
This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.

Reply | Threaded
Open this post in threaded view
|

Re: Closing Plot Values Window in a Macro

Gluender-3
Good evening!

meanwhile I'm quite sure that I didn't get the point of your
question. (Perhaps you can try to be more specific about what
behavior you wish to achieve and what works and what doesn't...)

Here is a demo macro that creates a test image and performs some
measurements thus producing a results window. This window is then
closed and finally the test image as well.
--------------------------------------
newImage("test", "8-bit Ramp", 256, 256, 1);
wait(1000);
run("Measure");
wait(1000);
run("Close");
wait(1000);
run("Close");
--------------------------------------

>Hello,
>
>Thank you for your response. Unfortunately that doesn't seem to work
>either. When I am running my Macro in Debug mode, it closes the text
>file when it gets to run("Close"). Also, when I run the Macro
>directly from ImageJ option, it just closes the main Image Window.
>Below is a snippet of the code:
>                                         selectWindow("Plot Values");
>                                         Run("Close");
>Thank you.
>
>Navinah Nundlall
>Medical Physics and Imaging - Trainee Clinical Scientist
>
>Internal: 2267
>Email:    [hidden email]
>Web:      http://www.uhb.nhs.uk
>
>
>-----Original Message-----
>From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gluender
>Sent: 08 February 2010 15:50
>To: [hidden email]
>Subject: Re: Closing Plot Values Window in a Macro
>
>
>Good day!
>
>The macro functions manual tells us:
>
>close()
>Closes the active image. This function has the advantage of not
>closing the "Log" or "Results" window when you meant to close the
>active image. Use run("Close") to close non-image windows.
>
>>Good afternoon all,
>>
>>Does anyone know how to close the Plot Values Window in a Macro,
>>once I have saved it as an Excel Spreadsheet ( saveAs("Text",....)
>>)? I have tried to use close() but this only seems to apply to
>>Windows that are Image-type Windows.
>>
>>Thank you.
>>
>>Navinah Nundlall
>>Medical Physics and Imaging - Trainee Clinical Scientist
>>Internal:        2267
>>Email:   [hidden email]
>  >Web:     http://www.uhb.nhs.uk

Best
--

                   Herbie

          ------------------------
          <http://www.gluender.de>
Reply | Threaded
Open this post in threaded view
|

Re: Closing Plot Values Window in a Macro

Navinah Nundlall
Good Morning All,

My macro now seems to work! I didn't make any changes to the code. As Wayne, pointed out, I had to select "Auto-Close" and "List Values" in Edit->Options->Profile Plot Options.
Thank you all for your suggestions.

Navinah Nundlall
Medical Physics and Imaging - Trainee Clinical Scientist

Internal: 2267
Email:    [hidden email]
Web:      http://www.uhb.nhs.uk

There are many ways for you to make a difference as a member of Queen Elizabeth and Selly Oak hospitals.
To find out more about becoming a member, please contact the membership team by email at [hidden email], or visit www.uhb.nhs.uk


Medical - University Hospitals Birmingham NHS Foundation Trust




ð Delivering the best in care




-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gluender
Sent: 08 February 2010 23:11
To: [hidden email]
Subject: Re: Closing Plot Values Window in a Macro


Good evening!

meanwhile I'm quite sure that I didn't get the point of your
question. (Perhaps you can try to be more specific about what
behavior you wish to achieve and what works and what doesn't...)

Here is a demo macro that creates a test image and performs some
measurements thus producing a results window. This window is then
closed and finally the test image as well.
--------------------------------------
newImage("test", "8-bit Ramp", 256, 256, 1);
wait(1000);
run("Measure");
wait(1000);
run("Close");
wait(1000);
run("Close");
--------------------------------------

>Hello,
>
>Thank you for your response. Unfortunately that doesn't seem to work
>either. When I am running my Macro in Debug mode, it closes the text
>file when it gets to run("Close"). Also, when I run the Macro
>directly from ImageJ option, it just closes the main Image Window.
>Below is a snippet of the code:
>                                         selectWindow("Plot Values");
>                                         Run("Close");
>Thank you.
>
>Navinah Nundlall
>Medical Physics and Imaging - Trainee Clinical Scientist
>
>Internal: 2267
>Email:    [hidden email]
>Web:      http://www.uhb.nhs.uk
>
>
>-----Original Message-----
>From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
>Gluender
>Sent: 08 February 2010 15:50
>To: [hidden email]
>Subject: Re: Closing Plot Values Window in a Macro
>
>
>Good day!
>
>The macro functions manual tells us:
>
>close()
>Closes the active image. This function has the advantage of not closing
>the "Log" or "Results" window when you meant to close the active image.
>Use run("Close") to close non-image windows.
>
>>Good afternoon all,
>>
>>Does anyone know how to close the Plot Values Window in a Macro, once
>>I have saved it as an Excel Spreadsheet ( saveAs("Text",....) )? I
>>have tried to use close() but this only seems to apply to Windows that
>>are Image-type Windows.
>>
>>Thank you.
>>
>>Navinah Nundlall
>>Medical Physics and Imaging - Trainee Clinical Scientist
>>Internal:        2267
>>Email:   [hidden email]
>  >Web:     http://www.uhb.nhs.uk

Best
--

                   Herbie

          ------------------------
          <http://www.gluender.de>

DISCLAIMER:
This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.