Skip to content

Conversation

@plbenveniste
Copy link

I made the two following changes:

  • the script checks if the json sidecar is empty or not. If it is empty, it considers that there was no existing json sidecar
  • I addded to possibility to change the value stored in the json sidecar "Name" by adding the -task-name flag.

Ready for review

'-task-name', type=str, required=False, default='Manual',
help=
"R|The name of the task being done, which will be added in the json file. It must be added between \"\"."
" For example: \"Manual correction of lesions generated from model XXX\" Default: \"Manual\"g.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To track such workflow (automatic segmentation by a model + manual correction), we add two entries into the JSON file (one for the model, the second for the rater). See here.

{
    "SpatialReference": "orig",
    "GeneratedBy": [
        {
            "Name": "sct_deepseg_sc",
            "Version": "SCT v6.1"
        },
        {
            "Name": "Manual",
            "Author": "Nathan Molinier",
            "Date": "2023-07-14 13:43:10"
        }
    ]
}

Copy link
Member

@valosekj valosekj Nov 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can specify the model's details using the -json-metadata arg; see L246-L260
@plbenveniste, can you please try -json-metadata arg on some of your corrections? I believe the output JSON sidecars will contain all the information you want to track.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Jan, sometimes we want to add multiple information to the sidecar and I believe the -json-metadata flag accomplish that already

@valosekj
Copy link
Member

Please see #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants