|
|
(6 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | === Running scripts ===
| |
| | | |
| + | == Scripts in MIPAV == |
| You can run a script either using the Scripts toolbar or via the Scripts>Run Script menu. | | 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 <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">active image</font>''</span> is the image that is currently selected, refer to [MIPAV_Scripting.html#1340066 Figure 283]. | + | 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 Figure 12. |
| | | |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
| |
| | | |
| {| border="1" cellpadding="5" | | {| border="1" cellpadding="5" |
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 283. An active image, which bar is highlighted (on your left) and inactive image, which bar is dimmed and grey (on your right)<br /></font>'''</div> | + | |+ '''Figure 12. An active image, which bar is highlighted (on your left) and inactive image, which bar is dimmed and grey (on your right)''' |
| |- | | |- |
− | |
| |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
| |
| | | | | |
| [[Image:Script_ActiveImage1.png]] | | [[Image:Script_ActiveImage1.png]] |
− | |}<br clear="all" /><br /></font></div>
| |
− | |
| |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
| |
| | | | | |
| [[Image:Script_InActiveImage.png]] | | [[Image:Script_InActiveImage.png]] |
− | |}<br clear="all" /><br /></font></div>
| |
| |} | | |} |
| | | |
− | <br /></font></div><div style="font-style: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 14pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> To run scripts from the Scripts toolbar<br /></font>'''</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 1 Open an image of interest and VOI, if needed.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 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].<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
| + | === To run scripts from the Scripts toolbar=== |
| + | 1 Open an image of interest and VOI, if needed.<br /> |
| + | 2 Select a script from Current Script in the scripting toolbar, then click the Run the Selected Script icon. See Figure 13.<br /> |
| | | |
| {| border="1" cellpadding="5" | | {| border="1" cellpadding="5" |
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> 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<br /></font>'''</div> | + | |+ '''Figure 13. 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''' |
| |- | | |- |
− | |
| |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
| |
| | | | | |
| [[Image:Script_RunScript1.png]] | | [[Image:Script_RunScript1.png]] |
− | |}<br clear="all" /><br /></font></div>
| |
| |} | | |} |
| | | |
− | <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 3 MIPAV automatically performs all of the actions in the script on the active image.<br /></font></div>
| + | 3 MIPAV automatically performs all of the actions in the script on the active image.<br /> |
| | | |
− | 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].
| |
| | | |
− | <div style="font-style: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 14pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> To run scripts from the Run Script menu<br /></font>'''</div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 1 Call Scripts > Run Script from the main MIPAV menu. <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 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].<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 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].<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 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].<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 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.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 6 Press Run Script.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 7 MIPAV automatically performs all of the actions in the script on the images indicated in the Script Execution Setup dialog.<br /></font></div>
| + | 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 "To run scripts from the Run Script menu" and Figure 14. |
| | | |
− | ===== Adding images to the Script Execution Setup ===== | + | === To run scripts from the file menu === |
| + | 1 Call Scripts > Run Script from the main MIPAV menu. <br /> |
| + | 2 Select a script you wish to run and press OK. The MIPAV Script Tool dialog box opens. Refer to Figure 14.<br /> |
| + | 3 Add images to the Script Execution Setup, refer to "Adding images to the Script Execution Setup".<br /> |
| + | 4 Add VOIs to the Script Execution Setup, if needed. Refer to "Adding VOIs to the Script Execution Setup".<br /> |
| + | 5 Repeat step 3 and step 4 for as many images and VOIs on which you want to run the script.<br /> |
| + | 6 Press Run Script.<br /> |
| + | 7 MIPAV automatically performs all of the actions in the script on the images indicated in the Script Execution Setup dialog.<br /> |
| + | |
| + | === 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 Figure 14. Images which have already been opened in MIPAV also appear in the Images window.<br /> |
| | | |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 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.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
| |
| | | |
| {| border="1" cellpadding="5" | | {| border="1" cellpadding="5" |
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 285. The MIPAV Script Tool dialog box<br /></font>'''</div> | + | |+ '''Figure 14. The MIPAV Script Tool dialog box''' |
| |- | | |- |
− | |
| |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
| |
| | | | | |
| [[Image:Script_GroupMode1.png]] | | [[Image:Script_GroupMode1.png]] |
− | |}<br clear="all" /><br /></font></div>
| |
| |} | | |} |
| | | |
− | <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 2 Use the mouse to drag selected images from the Images window to the Script Execution Setup. Arrange the order of the images. <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 3 If each script execution requires more than one image (e.g. you are applying algorithm(s) to Image 1, and then to Image 2), make sure that you add the same number of images under $image 1 and $image 2 in the Script Execution Setup. The same is also applied to VOIs. Refer to [MIPAV_Scripting.html#1341291 Figure 286].<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
| + | |
| + | 2 Use the mouse to drag selected images from the Images window to the Script Execution Setup. Arrange the order of the images. <br /> |
| + | 3 If each script execution requires more than one image (e.g. you are applying algorithm(s) to Image 1, and then to Image 2), make sure that you add the same number of images under $image 1 and $image 2 in the Script Execution Setup. The same is also applied to VOIs. Refer to Figure 15.<br /> |
| | | |
| {| border="1" cellpadding="5" | | {| border="1" cellpadding="5" |
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 286. <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Adding images to the Script Execution Setup</font>'''</span><br /></font>'''</div> | + | |+ '''Figure 15. Adding images to the Script Execution Setup''' |
| |- | | |- |
− | |
| |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
| |
| | | | | |
| [[Image:ScriptExecution2Imagespng.png]] | | [[Image:ScriptExecution2Imagespng.png]] |
− | |}<br clear="all" /><br /></font></div>
| |
| |} | | |} |
| | | |
− | <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 4 Press Run Script.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 5 Multiple images assigned to the same script will be used for separate execution of the chosen script.<br /></font></div>
| + | 4 Press Run Script.<br /> |
| + | 5 Multiple images assigned to the same script will be used for separate execution of the chosen script.<br /> |
| | | |
− | ===== Adding VOIs to the Script Execution Setup =====
| + | === Adding VOIs to the Script Execution Setup === |
− | | + | 1 Add images to the Images window and then to the Script Execution Setup window.<br /> |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 1 Add images to the Images window and then to the Script Execution Setup window.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 2 Add one or more VOIs to the VOIs from Selected Image window. In order to do that, click the Add VOI from File button and then select a VOI.<br /></font></div>
| + | 2 Add one or more VOIs to the VOIs from Selected Image window. In order to do that, click the Add VOI from File button and then select a VOI.<br /> |
| | | |
| You don't need to manually associate VOIs for those images that already have associated VOIs. Those VOIs appear in the Script Execution Setup window automatically under the corresponding image. | | You don't need to manually associate VOIs for those images that already have associated VOIs. Those VOIs appear in the Script Execution Setup window automatically under the corresponding image. |
| | | |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 3 For those images that don't have linked VOIs, add VOIs manually by dragging files from the VOIs window to the designated image in the Script Execution Setup. Linked VOI is a result of <span style="font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline"><font color="#000000">OpenVOI()</font></span> action in the script. Refer to [MIPAV_Scripting.html#1335489 Figure 287] for details.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
| + | 3 For those images that don't have linked VOIs, add VOIs manually by dragging files from the VOIs window to the designated image in the Script Execution Setup. Linked VOI is a result of |
| + | OpenVOI() action in the script. Refer to Figure 16 for details.<br /> |
| | | |
| {| border="1" cellpadding="5" | | {| border="1" cellpadding="5" |
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 287. Adding VOIs to images<br /></font>'''</div> | + | |+ '''Figure 16. Adding VOIs to images''' |
| |- | | |- |
− | |
| |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 1pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
| |
| | | | | |
| [[Image:Script_GroupModeVOI.png]] | | [[Image:Script_GroupModeVOI.png]] |
− | |}<br clear="all" /><br /></font></div>
| |
| |} | | |} |
| | | |
− | <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 4 Press Run Script.<br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 18pt; margin-right: 0pt; margin-top: 6pt; text-align: left; text-decoration: none; text-indent: -18pt; text-transform: none; vertical-align: baseline"><font color="#000000"> 5 Multiple images and VOIs assigned to the same script will be used for separate execution of the chosen script.<br /></font></div>
| + | 4 Press Run Script.<br /> |
| + | 5 Multiple images and VOIs assigned to the same script will be used for separate execution of the chosen script.<br /> |
| | | |
− | <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Note:</font>'''</span> After assigning an image or VOI to a script in the Script Execution Setup, your can delete the assignment using the Delete context menu option.
| + | After assigning an image or VOI to a script in the Script Execution Setup, your can delete the assignment using the Delete context menu option. |
| | | |
− | <div style="font-style: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 14pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Notes about running scripts<br /></font>'''</div>
| + | === Notes about running scripts === |
| | | |
| Use the Scripting toolbar to run simple scripts which involve one image and one VOI. Use the Run Script menu option to run more complicated scripts which apply to multiple images and VOIs. You can also use the Scripting menu to execute the same script multiple times. | | Use the Scripting toolbar to run simple scripts which involve one image and one VOI. Use the Run Script menu option to run more complicated scripts which apply to multiple images and VOIs. You can also use the Scripting menu to execute the same script multiple times. |
Line 96: |
Line 92: |
| For example, you can consider to use the toolbar option to execute the script while you are setting the script parameters and/or testing it; and after the script has been tested and debugged, you can run it over the set of images via the Scripting menu. | | For example, you can consider to use the toolbar option to execute the script while you are setting the script parameters and/or testing it; and after the script has been tested and debugged, you can run it over the set of images via the Scripting menu. |
| | | |
− | ==== The MIPAV Script Tool dialog box options ==== | + | ==MIPAV Script Tool dialog box == |
− | | + | |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000">
| + | |
− | | + | |
| {| border="1" cellpadding="5" | | {| border="1" cellpadding="5" |
− | |+ <div style="font-style: normal; margin-bottom: 3pt; margin-left: 0pt; margin-right: 0pt; margin-top: 9pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline">'''<font color="#000000"> Figure 288. The MIPAV Script Tool dialog box <br /></font>'''</div> | + | |+ '''Figure 17. The MIPAV Script Tool dialog box ''' |
| |- | | |- |
| | | | | |
Line 108: |
Line 101: |
| <div class="CellBody">Contains a list of images and associated VOIs.</div> | | <div class="CellBody">Contains a list of images and associated VOIs.</div> |
| | rowspan="3" colspan="1" | | | | rowspan="3" colspan="1" | |
− | <div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br clear="all" />{| align="center"
| |
− | |
| |
| [[Image:Script_MIPAV_Script_ToolDB.png]] | | [[Image:Script_MIPAV_Script_ToolDB.png]] |
− | |}<br clear="all" /><br /></font></div>
| |
| |- | | |- |
| | | | | |
Line 162: |
Line 152: |
| |} | | |} |
| | | |
− | <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <br /></font></div><div style="font-style: normal; font-weight: normal; margin-bottom: 0pt; margin-left: 0pt; margin-right: 0pt; margin-top: 5pt; text-align: left; text-decoration: none; text-indent: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">Tip:</font>'''</span> To speed up the process of associating VOIs with images, you can open all of the images at once and all of their associated VOIs at once. The Images box shows all of the images selected and the VOI box lists all of the VOIs selected. Select an image in the Images box and then select the VOI that applies to that image. Drag the image and VOI to the Script Execution Setup pane. Repeat these steps for as many images and VOIs as you need.<br /></font></div>
| + | '''Tip:''' To speed up the process of associating VOIs with images, you can open all of the images at once and all of their associated VOIs at once. The Images box shows all of the images selected and the VOI box lists all of the VOIs selected. Select an image in the Images box and then select the VOI that applies to that image. Drag the image and VOI to the Script Execution Setup pane. Repeat these steps for as many images and VOIs as you need.<br /> |
| | | |
| + | == See also: == |
| | | |
| [[Editing and deleting scripts]] | | [[Editing and deleting scripts]] |
| + | |
| + | [[Category:Help]] |
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 Figure 12.
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 Figure 13.
3 MIPAV automatically performs all of the actions in the script on the active image.
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 Figure 14.
3 Add images to the Script Execution Setup, refer to "Adding images to the Script Execution Setup".
4 Add VOIs to the Script Execution Setup, if needed. Refer to "Adding VOIs to the Script Execution Setup".
5 Repeat step 3 and 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.
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 Figure 14. Images which have already been opened in MIPAV also appear in the Images window.
4 Press Run Script.
5 Multiple images assigned to the same script will be used for separate execution of the chosen script.
1 Add images to the Images window and then to the Script Execution Setup window.
2 Add one or more VOIs to the VOIs from Selected Image window. In order to do that, click the Add VOI from File button and then select a VOI.
You don't need to manually associate VOIs for those images that already have associated VOIs. Those VOIs appear in the Script Execution Setup window automatically under the corresponding image.
3 For those images that don't have linked VOIs, add VOIs manually by dragging files from the VOIs window to the designated image in the Script Execution Setup. Linked VOI is a result of
OpenVOI() action in the script. Refer to Figure 16 for details.
4 Press Run Script.
5 Multiple images and VOIs assigned to the same script will be used for separate execution of the chosen script.
After assigning an image or VOI to a script in the Script Execution Setup, your can delete the assignment using the Delete context menu option.
Use the Scripting toolbar to run simple scripts which involve one image and one VOI. Use the Run Script menu option to run more complicated scripts which apply to multiple images and VOIs. You can also use the Scripting menu to execute the same script multiple times.
For example, you can consider to use the toolbar option to execute the script while you are setting the script parameters and/or testing it; and after the script has been tested and debugged, you can run it over the set of images via the Scripting menu.