Difference between revisions of "Using the mipav command"
(Created page with '=== Using the mipav command === To call scripts from other programs, you use the <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: ba...') |
(→Using the mipav command) |
||
Line 77: | Line 77: | ||
<br /></font></div> | <br /></font></div> | ||
− | + | Figure 31 shows examples of the <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">mipav</font>'''</span> command. | |
<div style="font-style: normal; font-weight: normal; margin-bottom: 5pt; 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">Note:</font>'''</span> When calling MIPAV scripts from other programs, be sure to enter an Exit command at the end of the MIPAV script.<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"> | <div style="font-style: normal; font-weight: normal; margin-bottom: 5pt; 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">Note:</font>'''</span> When calling MIPAV scripts from other programs, be sure to enter an Exit command at the end of the MIPAV script.<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 | + | |+ <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 31. Examples of using the mipav command<br /></font>'''</div> |
|- | |- | ||
| rowspan="1" colspan="2" | | | rowspan="1" colspan="2" | | ||
Line 115: | Line 115: | ||
|} | |} | ||
− | <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; 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 help for using the mipav command <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 Navigate to the mipav directory on your computer.<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 Start > All Programs > Accessories > Command Prompt. The Command Prompt dialog box 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"> 3 Type <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">mipav -H</font>'''</span> (refer to | + | <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; 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 help for using the mipav command <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 Navigate to the mipav directory on your computer.<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 Start > All Programs > Accessories > Command Prompt. The Command Prompt dialog box 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"> 3 Type <span style="font-style: normal; text-decoration: none; text-transform: none; vertical-align: baseline">'''<font color="#000000">mipav -H</font>'''</span> (refer to Figure 32).<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 | + | |+ <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 32. Command Prompt dialog box showing command to open Command Line Help dialog box<br /></font>'''</div> |
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:dialogboxCommandPrompt.jpg]] | [[Image:dialogboxCommandPrompt.jpg]] | ||
− | |||
|} | |} | ||
− | <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 Enter. The Command Line Help dialog box ( | + | <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 Enter. The Command Line Help dialog box (Figure 33) opens.<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: 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"> |
{| 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 | + | |+ <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 33. Command Line Help dialog box, which shows the syntax of the mipav command as well as examples<br /></font>'''</div> |
|- | |- | ||
− | |||
− | |||
| | | | ||
[[Image:ScriptsCommandLineHelp.jpg]] | [[Image:ScriptsCommandLineHelp.jpg]] | ||
− | |||
|} | |} | ||
Revision as of 21:14, 15 February 2012
Using the mipav command
To call scripts from other programs, you use the mipav command in the Command Prompt dialog box. The correct syntax of this command follows.
Syntax of the mipav command
| |
mipav [-hH] [-iI] imageFileName [-sS] ScriptFileName [-vV] voiFileName [-hideHide]
| |
Parameters
|
Purpose
|
[-h][-H]
|
Displays help for the mipav command in a Command Prompt window
|
[-hide][-HIDE]
|
Hides application frame
|
[-i][-I]
|
Image file name
|
[-s][-S]
|
Script file name
|
[-x][-X]
|
XML script file name
|
[-v][-V]
|
VOI file name
|
[-o][-O]
|
Specifies the output file name when "Save Image As" script command is used
|
[-d] [-D]
|
Set a value of a variable used in the script
|
[-inputdir] [-INPUTDIR]
|
Specifies the input directory with images
|
[-outpudir] [-OUTPUTDIR]
|
Specifies the output directory with images
|
Exit
|
Exits the MIPAV program
|
Figure 31 shows examples of the mipav command.
Example 1: Starts MIPAV
| |
> mipav | |
Example 2: Starts MIPAV and opening an image
| |
> mipav imageFileName
| |
Example 3: Starts MIPAV but does not display frame, opens an image, and runs a script on the image.
| |
> mipav -i imageFileName -s scriptFileName -hide
| |
Example 4: Starts MIPAV, runs a script, opens the first image, opens two VOIs associated with that image, opens a second image, and associates another VOI with that image
| |
> mipav -s scriptFileName -i imageFileName1 -v voiName1 -v voiName2 -i imageFileName2 -v voiName3
| |
Example 5: Exiting the MIPAV program
| |
> mipav Exit
|
C:\ mipav -i i:\images\DICOM\exp2004\I04301.dcm |
C> mipav -i i:\images\DICOM\exp2004\I04301.dcm -v i:\VOIs\exp2004\levelset1.xml |
In a UNIX BASH shell, this command looks like:
$ mipav -i ~/images/DICOM/exp2004/I043401.dcm -v ~/VOIs/exp2004/levelset1.xml |
C> for %f in (i:\images\DICOM\exp2004\*01.dcm) do mipav -i %f |
In this case, you must know something of the file structure of that dataset-you assumed that all image datasets had only one image ending in 01. However, the disadvantages of this format is the possibility of not opening all of the images at the same time.
A similar loop to open image sets on a UNIX BASH command line looks like:
$ for FI in `ls ~/images/DICOM/exp200?/*01.dcm`; do ./mipav -i $FI &; done |
There are three significant differences between the BASH command and the Windows command (beside from how a directory is specified):
When there is more than one MIPAV application window running, it's possible to close the wrong image by closing the wrong MIPAV application. In addition, operations that can occur between windows when running a single MIPAV may not be transferable between images being run by separate MIPAV windows.
While starting more than one MIPAV to display a set of images may be fine in limited applications, it causes needless overhead within in the operating system wasting system resources.