Skip to content

Additional documentation for itkimage2segimage  #441

Description

@denbonte

Hey all,

Thanks for the work you guys put in dcmqi.

As discussed with @fedorov, I think it would be beneficial to add a few lines in the itkimage2segimage documentation page to help users with the following use case:

  • generation of the JSON file when the input is a comma-separated list of N files, each storing the segmentation mask for a single structure.

The reason I'm opening this issue is that the JSON generated at http://qiicr.org/dcmqi/#/seg is not right in such case - as segmentAttributes will be a list of a list containing N different dictionaries (with labelID going from 1 to N):

# this works if a single input file stores N different structures
{
  "ContentCreatorName": "DB",
  ...
  "segmentAttributes": [
    [
      {
        "labelID": 1,
        # dict for structure 1
      },
      {
        "labelID": 2,
        # dict for structure 2
      },
      ...
    ]
  ],
  "ContentLabel": "SEGMENTATION",
  ...
}

instead of a list of N lists containing one dictionary each (per structure, with labelID: 1 in all the cases):

# this works if N input files store one structure each
{
  "ContentCreatorName": "DB",
  ...
  "segmentAttributes": [
    [
      {
        "labelID": 1,
        # dict for structure 1
      }
    ],
    [
      {
        "labelID": 1,
        # dict for structure 2
      }
    ],
      ...
  "ContentLabel": "SEGMENTATION",
  ...
}

Activity

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

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