Running scripts

From MIPAV
Revision as of 19:57, 15 February 2012 by Angelfish100 (Talk)

(diff) <previousrevision> | Latest revision (diff) | <nextrevision> (diff)
Jump to: navigation, search

Running scripts

You can run a script either using the Scripts toolbar or via the Scripts>Run Script menu.

If you are running the script via the Scripting toolbar and have at least one image open and selected, the script will automatically apply to that active image. Here, the active image is the image that is currently selected, refer to [MIPAV_Scripting.html#1340066 Figure 283].

Figure 283. An active image, which bar is highlighted (on your left) and inactive image, which bar is dimmed and grey (on your right)


{| align="center"

Script ActiveImage1.png



|


{| align="center"

| Script InActiveImage.png

|}

|}


To run scripts from the Scripts toolbar
1 Open an image of interest and VOI, if needed.
2 Select a script from Current Script in the scripting toolbar, then click the Run the Selected Script icon. See [MIPAV_Scripting.html#1335417 Figure 284].
Figure 284. Current Script lists all of the scripts in the scripts home directory alphabetically. To reorder the list of scripts in Current Script, click the Refresh icon


{| align="center"

Script RunScript1.png



|}


3 MIPAV automatically performs all of the actions in the script on the active image.

If the script requires more than one image or VOI, it will pop up the Script Execution Setup dialog box, where you can add more images and VOIs to the script procedure. Refer to [MIPAV_Scripting.html#1335424 "To run scripts from the Run Script menu" on page 450] and [MIPAV_Scripting.html#1335469 Figure 285].

To run scripts from the Run Script menu
1 Call Scripts > Run Script from the main MIPAV menu.
2 Select a script you wish to run and press OK. The MIPAV Script Tool dialog box opens. Refer to [MIPAV_Scripting.html#1335469 Figure 285].
3 Add images to the Script Execution Setup, refer to [MIPAV_Scripting.html#1340433 "Adding images to the Script Execution Setup" ]on [MIPAV_Scripting.html#1340433 page 450].
4 Add VOIs to the Script Execution Setup, if needed. Refer to [MIPAV_Scripting.html#1335473 "Adding VOIs to the Script Execution Setup" on page 451].
5 Repeat [MIPAV_Scripting.html#1335433 step 3] and [MIPAV_Scripting.html#1335439 step 4] for as many images and VOIs on which you want to run the script.
6 Press Run Script.
7 MIPAV automatically performs all of the actions in the script on the images indicated in the Script Execution Setup dialog.
Adding images to the Script Execution Setup
1 Use the Add Image from File option to choose the images and add them to the dialog box. Selected images appear in the Images window. See [MIPAV_Scripting.html#1335469 Figure 285]. Images which have already been opened in MIPAV also appear in the Images window.
Figure 285. The MIPAV Script Tool dialog box


{| align="center"

Script GroupMode1.png



|}