Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional documentation for itkimage2segimage #441

Open
denbonte opened this issue Jul 9, 2021 · 0 comments
Open

Additional documentation for itkimage2segimage #441

denbonte opened this issue Jul 9, 2021 · 0 comments

Comments

@denbonte
Copy link

denbonte commented Jul 9, 2021

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",
  ...
}
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

No branches or pull requests

1 participant