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

Roundtrip test and some fixes to inconsistencies between the schema, examples, and JSONMetadataHandler #101

Merged
merged 8 commits into from
Oct 21, 2016

Conversation

che85
Copy link
Member

@che85 che85 commented Oct 20, 2016

Followup on #97.

jsoncompare is from https://github.com/ChannelIQ/jsoncompare, with ChannelIQ/jsoncompare#8 applied.

fedorov and others added 7 commits October 20, 2016 02:13
This one is from https://github.com/ChannelIQ/jsoncompare with minor
modification submitted in this PR ChannelIQ/jsoncompare#8.

Without the modification, it is required that the compared JSONs have identical
number of keys, which is not logical, since we are specifically interested in
ignoring specified keys.

Related to QIICR#97
since this is not a DICOM attribute, it should start from lower case
The test is failing at the moment, because of the identified inconsistencies,
this will need to be fixed. Addresses QIICR#97.
@che85
Copy link
Member Author

che85 commented Oct 20, 2016

@fedorov Please check if all your commits (except of the last one for adding the missing file) are there.

@fedorov
Copy link
Member

fedorov commented Oct 20, 2016

Did you expect the test would fail too? It sounded from the earlier communication that you expect they should pass, so I wanted to confirm.

@che85
Copy link
Member Author

che85 commented Oct 20, 2016

I only wanted to correct the syntax of the test. I didn't mean or check anything else. But I can go ahead and check what's wrong.

@fedorov
Copy link
Member

fedorov commented Oct 20, 2016

ah, ok - makes sense. Can you take a look how much effort would be to fix inconsistencies? I didn't plan to merge until the test passes.

@che85
Copy link
Member Author

che85 commented Oct 20, 2016

@fedorov I figured out, that the DICOM-attributes of https://github.com/QIICR/dcmqi/blob/master/data/ct-3slice/liver.dcm
don't even correspond to the attributes defined in https://github.com/QIICR/dcmqi/blob/master/doc/seg-example.json

Instead of using the liver.dcm from the repository, we should use the output from itkimage2segimage otherwise the roundtrip would not make sense because we don't continue working with the produced data, right?

@fedorov
Copy link
Member

fedorov commented Oct 20, 2016

Good observation! It probably makes sense to run itk2seg first using baseline metadata, then run seg2itk on the output of itk2seg, not baseline seg, and use the output metadata file from seg2itk to compare with the baseline json that was used in the itk2seg in the first step. Does this make sense?

@che85
Copy link
Member Author

che85 commented Oct 20, 2016

I propose to do the following:

  • run itkimage2segimage with liver_seg.nrrd, 01.dcm..., seg-example.json
    • produces liver.dcm
  • run segimage2itkimage with product liver.dcm
    • produces nrrd file and meta.json
  • comparing meta files by means of comparejson.py with input1 seg-example.json and input2 meta.json

I would set dependencies between the tests in order to have the right order when running them.

@che85
Copy link
Member Author

che85 commented Oct 20, 2016

makes sense ;)

- added missing attributes
- fixed json comparison script (for the reference ChannelIQ/jsoncompare#8 and ChannelIQ/jsoncompare#9)
@che85
Copy link
Member Author

che85 commented Oct 21, 2016

@fedorov ready for merge

@fedorov
Copy link
Member

fedorov commented Oct 21, 2016

Looks great! One question - can you write up a summary of the changes you did to jsoncompare, and consider submitting pull request to the upstream?

@fedorov fedorov merged commit 69b9020 into QIICR:master Oct 21, 2016
@che85
Copy link
Member Author

che85 commented Oct 21, 2016

@fedorov I already submitted a PR to the upstream just before I created the PR here.

ChannelIQ/jsoncompare#9

@fedorov
Copy link
Member

fedorov commented Oct 21, 2016

Very good - I didn't check that repo, so thanks for adding a reference here.

@che85
Copy link
Member Author

che85 commented Oct 21, 2016

In my last commit message I added a reference to your PR and my PR of jsoncompare upstream

@fedorov
Copy link
Member

fedorov commented Oct 21, 2016

Sorry, I missed it

@che85 che85 deleted the jsoncompare branch November 18, 2016 07:22
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.

2 participants