Script Definition

<< Click to Display Table of Contents >>

Navigation:  Pipeline Processing > Call PMOD Pipeline Processing from Command Script >

Script Definition

The external script basically performs the following steps:

1.It prepares a .procPipe pipeline definition file which specifies the files to be processed.

2.It calls PMOD in pipeline processing mode, providing the .procPipe file as an argument. PMOD acquires a license which has to include all required tools, performs pipeline processing, saves the results, releases the license and exits.

3.The script performs a cleanup removing unneeded files.

The script definition can be based on the RunPmod script located in the Pmod4.4/Start folder from the installation directory. Create a copy of the RunPmod script, name it RunExamplePipeline and edit it as follows:

1.After the pmod.jar add the switch PIPELINE or PIPELINE_NOGUI. With PIPELINE the script starts the processing with the full user interface. With PIPELINE_NOGUI no interface is visible and output goes to the console.

2.Append the full path and name of the pipeline located in the def folder. Note that the pipe processing definition files have suffix *.procPipe. For all operating systems / must be used as folder separator (NOT Windows backslash "\") .

The RunExamplePipeline script file may look like illustrated below:

D:
cd "D:\Pmod4.4"
rem external preprocessing: include input files in example.procPipe
.\java\jre\bin\java -Xmx8G -jar pmod.jar PIPELINE D:/Pmod4.4/data/pipe/def/example.procPipe
rem external cleanup: remove input files

The external preprocessing is referring to a program created by the user that populates input file entries in the pipeline definition (.procPipe) file.

The external cleanup is referring to a program created by the user that removes processed input files from the in folder.

The following tags have to be updated in the .procPipe file:

1.PIPE_FILE_NAME_<num> Entries defining the input images. A slash / has to be used as folder separator.

2.NUMBER_OF_PIPE_FILES Number of input data files.

An example is illustrated below:

PIPE_FILE_NAME_1=D\:/Pmod4.4/data/pipe/in/06371770//\:0
PIPE_FILE_NAME_2=D\:/Pmod4.4/data/pipe/in/41891912//\:0
PIPE_FILE_NAME_3=D\:/Pmod4.4/data/pipe/in/41884445//\:0
NUMBER_OF_PIPE_FILES=3

Note: A pipeline template (template.procPipe) can easily be created from an interactively defined pipeline which performs the intended processing. Open the file, remove the PIPE_FILENAME_<num> and the NUMBER_OF_PIPE_FILES lines. The external routine can then simply append the PIPE_FILENAME_<num> and NUMBER_OF_PIPE_FILES lines according to the data for creating the actual .procPipe file for the batch.

Execution Return Codes

There are a few return codes which can be defined to diagnose the execution:

1.EX_OK = 0 // Indicates successful termination of the processing.

2.EX_UNAVAILABLE = 69 // Indicates the service is unavailable: no license is available for the processing.

3.EX_CONFIG = 78 // Indicates a configuration error: the memory allocated to run Pmod is too low.

If no license is available, the behavior depends on the processing mode:

PIPELINE: the standard license dialog is shown and PMOD waits for user interaction;

PIPELINE_NOGUI: PMOD exits returning code 69.