Using the mipav command
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.