Although MIPAV allows you to easily create scripts, it is important to plan scripts before creating them, particularly if the scripts perform actions on VOIs. First, however, you need to understand:
There are two methods for creating scripts:
1 To create a script using the Scripting toolbar, open an image of interest and simply click the Start Recording Script icon on the Scripting toolbar. See Figure 6.
2 To create a script using the main MIPAV menu, click Scripts > Record Script in the MIPAV window and simply start recording. See Figure 6.
For more information, refer to Section "Recording scripts".
It's also important to understand what actions or events you can record in scripts. For example, scripts neither record views, such as lightbox, triplanar, and volume renderer; nor do they record other visualization commands, such as those that adjust the lookup table.
The only VOI commands that can be recorded in scripts are the open VOI commands:
MIPAV scripts do not record and save VOIs. Therefore, to apply VOIs to images in scripts, you need to:
Create and save all VOIs in advance of creating a script;
Open and apply the VOIs when you are recording the script.
After you've created all necessary VOIs, you can save them through the Save VOI commands available via the VOI menu in the main MIPAV window:
VOI > Save VOI
VOI > Save VOI as
VOI > Save All VOIs
VOI > Save All VOIs to
Caution: Do not use the Exit command in MIPAV scripts unless you are calling the script from another program or scripts (Perl, C , Windows batch).
Tip: You might consider to organize your workplace, for example, designate a specific folder(s) for VOIs using in scripts.
Saving VOIs: Some Reminders You can save VOIs under names that MIPAV assigns or under names that you assign. If the VOIs have never been saved before, MIPAV assigns names to VOIs when you use the Save VOI or Save All VOIs commands. The name of the first VOI or set of VOIs that you save is Area1.voi; the second is Area2.voi; and so on. If you want to specify a different name for the VOI or set of VOIs: select VOI > Save VOI as or VOI > Save All VOIs to. The Save VOI as dialog box opens. Type a name for the VOI in File name and the extension .voi or .xml, and click Save. The program saves the file under the specified name.
|