ROI generation Operator
ROI generation operator is designed for multi AI pipeline. This operator takes MHD data and an ROI configuration file as input and performs either SPLIT or MERGE operation. In Split operation, several sub-volumes aka ROI (region of interest) are created from input data. In merge operation, several small input sub-volumes masks are merged into a single mask volume.
Input MHD data, ROI Configuration file
For Split, several ROIs are created as configured in ROI configuration file. For Merge, a single Mask volume is created from several small ROI masks.
ROI configuration file is an input to the operator. This file lists the ROIs desired and their extents in 3 dimensions. An example ROI configuration file is shown below.
Liver 1 512 1 512 100 400 Lung 1 512 1 512 450 700
Above information is parsed by the operator to create Liver and Lung ROIs. User must provide correct ROI extents in the configuration file, and they must fall within the extents of the input data. ROI extents are provided with Tranverse (axial) view of the data. Each line represents an ROI with seven elements (ID, x-start, x-end, y-start, y-end, z-start, z-end.)
Following parameters are supported. Parameter is passed as an environment variable.
ROI_OPERATION: Split or Merge
The Operator has following dependencies.
Supports MHD data only. ROI configuration file format, as described above.
For local execution, following command must be executed in sequence on a command prompt.
Execute ‘docker images’ and locate the ‘TAG’ of clara/python-base image.
Execute following to tag python-base image, use value of ‘TAG’ as identified in above step:
docker tag clara/python-base:'TAG' clara/python-base:latest
Navigate to Applications/Operators/image_processing/app_roi/ folder in sdk. Execute ‘make’.
Locate the input folder. Keep relevant input data and configuration files in the folder.
Locate the output folder.
By default operator runs split operation.
docker run -ti --rm -v $INPUT:/app/in/ -v $OUTPUT:/app/out/ -e NVIDIA_CLARA_NOSYNCLOCK=TRUE -e ROI_OPERATION=split roi-generator:latest
For merge operation, execute following:
docker run -ti --rm -v $INPUT:/app/in/ -v $OUTPUT:/app/out/ -e NVIDIA_CLARA_NOSYNCLOCK=TRUE -e ROI_OPERATION=merge roi-generator:latest