I'm trying to set up a container command that operates on the DICOM segmentation file associated with an ROI Collection object, created when a mask is exported with the OHIF plugin. When run manually, the container is run with:
My command.json is loaded successfully, but I'm not seeing an option to run the container in the Action Box when viewing an ROI Collection. Am I setting up my command correctly, both to:
1. get it to appear in the icr:roiCollectionData context, and
2. correctly parse the project-id and dicom segmentation file path?
I need the command to run on the "SEG_***.dcm" file, in the ROI Collection's files:
{
"name": "i2c2-xnat-volume-calculator",
"description": "Calculate and upload volume of dicom segmentation object.",
"version": "1.0",
"schema-version": "1.0",
"image": "MYREGISTRY/i2c2-xnat-volume-calculator:v1.0",
"type": "docker",
"override-entrypoint": false,
"command-line": "[PROJECT_ID] /segmentation/[DICOM_SEG_FILE_NAME]",
"mounts": [
{
"name": "segmentation-in",
"writable": "false",
"path": "/segmentation"
}
],
"inputs": [
{
"name": "dicom-seg-file-name",
"description": "DICOM segmentation file to process",
"type": "string",
"required": true,
"replacement-key": "[DICOM_SEG_FILE_NAME]"
},
{
"name": "project-id",
"description": "Project ID to export results to",
"type": "string",
"required": true,
"replacement-key": "[PROJECT_ID]",
"command-line-flag": "-p"
}
],
"outputs": [
],
"xnat": [
{
"name": "calculate-segmentation-volume",
"description": "Calculates and uploads the ROI volume/s from a dicom segmentation object.",
"contexts": ["icr:roiCollectionData"],
"external-inputs": [
{
"name": "segmentation",
"type": "Assessor",
"required": true,
"matcher": "'SEG' in @.resources[*].label",
"load-children": true
}
],
"derived-inputs": [
{
"name": "session",
"type": "Session",
"derived-from-wrapper-input": "segmentation",
"required": true,
"load-children": true
},
{
"name": "project",
"type": "string",
"derived-from-wrapper-input": "session",
"derived-from-xnat-object-property": "project-id",
"provides-value-for-command-input": "project-id"
},
{
"name": "segmentation-dicom",
"type": "Resource",
"derived-from-wrapper-input": "segmentation",
"matcher": "@.label == 'SEG'",
"provides-files-for-command-mount": "dicom-in"
},
{
"name": "segmentation-dicom-file",
"type": "File",
"derived-from-wrapper-input": "segmentation-dicom"
},
{
"name": "segmentation-dicom-file-name",
"type": "string",
"derived-from-wrapper-input": "segmentation-dicom-file",
"derived-from-xnat-object-property": "name",
"provides-value-for-command-input": "dicom-seg-file-name",
}
],
"output-handlers": [
]
}
]
}