Difference between revisions of "Setting up scripting"

From MIPAV
Jump to: navigation, search
(Created page with ' === Setting up scripting === <div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; margin-left: 0pt; margin-right: 0pt; margin-top: 0pt; text-align: left; te...')
 
(Setting up scripting)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
Before you start create, edit, run, or delete scripts, you need to <br />
 +
1 Select the scripts home directory, refer to "Scripts Home";<br />
 +
2 And display the scripting toolbar (optional, but very helpful).<br />
  
=== Setting up scripting ===
+
'''To display the scripting toolbar'''<br />
 
+
Like the paint toolbar, you can choose to show it on an as-needed basis or not to show it on an as-needed basis. To display the scripting toolbar on an as-needed basis, select Toolbars &gt; Scripting Toolbar (Figure 1) MIPAV.
<div style="font-style: normal; font-weight: normal; margin-bottom: 6pt; 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"> Before you start create, edit, run, or delete scripts, you need to <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 Select the scripts home directory, refer to [MIPAV_Scripting.html#1263590 "Scripts Home" on page 439]<nowiki>;</nowiki><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 And display the scripting toolbar (optional, but very helpful).<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 display the scripting toolbar<br /></font>'''</div>
+
 
+
Like the paint toolbar, you can choose to show it on an as-needed basis or not to show it on an as-needed basis. To display the scripting toolbar on an as-needed basis, select Toolbars &gt; Scripting Toolbar ([MIPAV_Scripting.html#1342422 Figure 272]) MIPAV.
+
  
 
{| 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 272. Scripting Toolbar command on the Toolbar menu<br /></font>'''</div>
+
|+ '''Figure 1. Scripting Toolbar command on the Toolbar menu'''
 
|-
 
|-
|
 
<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_Toolbar.png]]
 
[[Image:Script_Toolbar.png]]
|}<br clear="all" /><br /></font></div>
 
 
|}
 
|}
  
The scripting toolbar immediately appears beneath the VOI toolbar or, if the Paint toolbar is also displayed, immediately below the Paint toolbar. See [MIPAV_Scripting.html#1316729 Figure 273].
+
The scripting toolbar immediately appears beneath the VOI toolbar or, if the Paint toolbar is also displayed, immediately below the Paint toolbar. See Figure 2.
  
<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 273. The Scripting toolbar is highlighted<br /></font>'''</div>
+
|+ '''Figure 2. The Scripting toolbar is highlighted'''
 
|-
 
|-
|
 
<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_ToolbarAppearance.png]]
 
[[Image:Script_ToolbarAppearance.png]]
|}<br clear="all" /><br /></font></div>
 
 
|}
 
|}
  
<br /></font></div>
 
  
 
==== Scripts Home ====
 
==== Scripts Home ====
  
The <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">scripts home</font>''</span> is the directory where you store scripts, and from which you run them. After you select a scripts home, the name of one of the scripts (which are ordered alphabetically) in that directory appears after Current Script on the scripting toolbar ([MIPAV_Scripting.html#1329779 Figure 274]). If there is more than one script in the directory, Current Script becomes a list box from which you can select the script to run.
+
The ''scripts home'' is the directory where you store scripts, and from which you run them. After you select a scripts home, the name of one of the scripts (which are ordered alphabetically) in that directory appears after Current Script on the scripting toolbar (Figure 3). If there is more than one script in the directory, Current Script becomes a list box from which you can select the script to run.
  
 
To set up Scripts Home
 
To set up Scripts Home
 
+
1 Start MIPAV. The initial MIPAV window opens.<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 Start MIPAV. The initial MIPAV window opens.<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 Open an image. The expanded MIPAV window appears.<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 Select Toolbars &gt; Scripting Toolbar. The scripting toolbar appears.<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: 0pt; text-transform: none; vertical-align: baseline"><font color="#000000"> A dimmed rectangle appears immediately following the words <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">Current Script </font>''</span>in the scripting toolbar.<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 Open an image. The expanded MIPAV window appears.<br />
 +
3 Select Toolbars &gt; Scripting Toolbar. The scripting toolbar appears.<br />
 +
A dimmed rectangle appears immediately following the words ''Current Script'' in the scripting toolbar.<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 274. The Scripting toolbar<br /></font>'''</div>
+
|+ '''Figure 3. The Scripting toolbar'''
 
|-
 
|-
 
| rowspan="1" colspan="2" |
 
| rowspan="1" colspan="2" |
<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_Toolbar_narrow.png]]
 
[[Image:Script_Toolbar_narrow.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_RefreshTheScriptListing.png]]
 
[[Image:Script_RefreshTheScriptListing.png]]
|}<br clear="all" /><br /></font></div>
 
 
|
 
|
 
<div class="CellBody">Refresh the script listing</div>
 
<div class="CellBody">Refresh the script listing</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_RunTheSelectedScript.png]]
 
[[Image:Script_RunTheSelectedScript.png]]
|}<br clear="all" /><br /></font></div>
 
 
|
 
|
 
<div class="CellBody">Run the selected script </div>
 
<div class="CellBody">Run the selected script </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_StartRecordingScript.png]]
 
[[Image:Script_StartRecordingScript.png]]
|}<br clear="all" /><br /></font></div>
 
|
 
<div class="CellBody">Start recording a script </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 /></font></div>
 
 
|}
 
|}
  
<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: 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: 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 Click Scripts Directory... The Choose Directory dialog box ([MIPAV_Scripting.html#1265187 Figure 275]) appears. <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">
+
4 Click Scripts Directory... The Choose Directory dialog box (Figure 4) appears. <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 275. Choose Directory dialog box. Note that it shows only directories, not individual files<br /></font>'''</div>
+
|+ '''Figure 4. Choose Directory dialog box. Note that it shows only directories, not individual files'''
 
|-
 
|-
|
 
<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:ScriptSelecting_homedir.png]]
 
[[Image:ScriptSelecting_homedir.png]]
|}<br clear="all" /><br /></font></div>
 
 
|}
 
|}
 +
5 Select a directory in which to store your scripts.<br />
 +
6 Click Open. The directory opens and the Choose Directory dialog box closes. <br />
  
<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 Select a directory in which to store your scripts.<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 Click Open. The directory opens and the Choose Directory dialog box closes. <br /></font></div>
+
After you've selected a ''scripts home'' and run a script for the first time, Current Script becomes a list box that shows the name of a script in the scripts home directory (Figure 3). After creating more scripts, you can select the one you want to run from Current Script.
 
+
After you've selected a <span style="font-weight: normal; text-decoration: none; text-transform: none; vertical-align: baseline">''<font color="#000000">scripts home</font>''</span> and run a script for the first time, Current Script becomes a list box that shows the name of a script in the scripts home directory ([MIPAV_Scripting.html#1329779 Figure 274]). After creating more scripts, you can select the one you want to run from Current Script.
+
  
 
[[Planning scripts]]
 
[[Planning scripts]]

Latest revision as of 21:59, 21 February 2012

Before you start create, edit, run, or delete scripts, you need to
1 Select the scripts home directory, refer to "Scripts Home";
2 And display the scripting toolbar (optional, but very helpful).

To display the scripting toolbar
Like the paint toolbar, you can choose to show it on an as-needed basis or not to show it on an as-needed basis. To display the scripting toolbar on an as-needed basis, select Toolbars > Scripting Toolbar (Figure 1) MIPAV.

Figure 1. Scripting Toolbar command on the Toolbar menu

Script Toolbar.png

The scripting toolbar immediately appears beneath the VOI toolbar or, if the Paint toolbar is also displayed, immediately below the Paint toolbar. See Figure 2.


Figure 2. The Scripting toolbar is highlighted

Script ToolbarAppearance.png


Scripts Home

The scripts home is the directory where you store scripts, and from which you run them. After you select a scripts home, the name of one of the scripts (which are ordered alphabetically) in that directory appears after Current Script on the scripting toolbar (Figure 3). If there is more than one script in the directory, Current Script becomes a list box from which you can select the script to run.

To set up Scripts Home 1 Start MIPAV. The initial MIPAV window opens.
2 Open an image. The expanded MIPAV window appears.
3 Select Toolbars > Scripting Toolbar. The scripting toolbar appears.
A dimmed rectangle appears immediately following the words Current Script in the scripting toolbar.

Figure 3. The Scripting toolbar

Script Toolbar narrow.png

Script RefreshTheScriptListing.png

Refresh the script listing

Script RunTheSelectedScript.png

Run the selected script

Script StartRecordingScript.png

4 Click Scripts Directory... The Choose Directory dialog box (Figure 4) appears.

Figure 4. Choose Directory dialog box. Note that it shows only directories, not individual files

ScriptSelecting homedir.png

5 Select a directory in which to store your scripts.
6 Click Open. The directory opens and the Choose Directory dialog box closes.

After you've selected a scripts home and run a script for the first time, Current Script becomes a list box that shows the name of a script in the scripts home directory (Figure 3). After creating more scripts, you can select the one you want to run from Current Script.

Planning scripts