Skip to content

Update the SaveImage transform to support saving input-output mapping. #7557

Closed
@binliunls

Description

@binliunls

Is your feature request related to a problem? Please describe.
When I run a segmentation bundle like spleen segmentation, I would like to have a new json/yaml/csv file to explicitly show the input-output mapping between images and labels. For example if the input and output folders are like:

--input
   --input_0.nii.gz
   --input_1.nii.gz
   -- ...
   --input_n.nii.gz

--output
   --input_0/input_0_seg.nii.gz
   --input_1/input_1_seg.nii.gz
   --...
   --input_n/input_n_seg.nii.gz

Describe the solution you'd like
A json file with content shown below should be generated if the parameter is specified:

[
    {image: ["/path/to/image/input/input_0.nii.gz"], label: ["/path/to/seg/output/input_0/input_0_seg.nii.gz"]},
    {image: ["/path/to/image/input/input_1.nii.gz"], label: ["/path/to/seg/output/input_1/input_1_seg.nii.gz"]},
    ...,
    {image: ["/path/to/image/input/input_n.nii.gz"], label: ["/path/to/seg/output/input_n/input_n_seg.nii.gz"]},
]

The image and label parameters are set to lists in case there are multiple inputs/outputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions