Difference between revisions of "Using the mipav command"
(added multifile information) |
|||
Line 28: | Line 28: | ||
<div class="CellBody">[-i][-I]</div> | <div class="CellBody">[-i][-I]</div> | ||
| | | | ||
− | <div class="CellBody">Image file name</div> | + | <div class="CellBody">Image file name, -m for multifile</div> |
|- | |- | ||
| | | |
Latest revision as of 16:19, 12 March 2013
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, -m for multifile
|
[-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.
Note: When calling MIPAV scripts from other programs, be sure to enter an Exit command at the end of the MIPAV script.
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
|
To display help for using the mipav command
1 Navigate to the mipav directory on your computer.
2 Select Start > All Programs > Accessories > Command Prompt. The Command Prompt dialog box opens.
</font></div>
4 Press Enter. The Command Line Help dialog box (Figure 33) opens.
To open a DICOM image dataset
Suppose you want to open a single DICOM image from a collection of experiments made in 2004 named exp2004. You would type the following command in the Command Prompt dialog box in Microsoft Windows XP:
C:\ mipav -i i:\images\DICOM\exp2004\I04301.dcm |
To open VOIs into that image
You can open VOIs as well as the image from the command line. In Windows XP, it would be the following:
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 |
To open multiple images using compound commands
Suppose you know that there were multiple DICOM datasets in exp2004. To open every DICOM image on the Windows computer, you would type:
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.