Closed manuelakuhn closed 3 years ago
The reason is, that if no rule was registered before importing data, the default heuristics are used and otherwise the defaults are ignored. Even though this should not change the conversion result, it is confusing.
Correct.
Although not perfect, but an easy solution could be to execute the default heuristic always first.
Yes, I agree. What I plan to do is: Make the default rule an actual, independent rule, that can be configured (and is configured by default). Since one can already configure several rules to be applied subsequently, that would by default result in the behavior you suggested, but would also allow to easily remove the default rules if desired. Apart from some minor code changes, that will require to "install" rules delivered with hirni into some dedicated location.
Minor comment in case that's not entirely clear:
The call to hirni-dicom2spec
after hirni-import-dcm
in the "before case" is superfluous. The import command calls dicom2spec internally at the end.
In my mind, this boils down to #194, so I will close here. Feel free to reopen, if you think there's more to it, @manuelakuhn
The studyspec.json file differ depending if a rule is registered before or after data is imported
Creating a dataset where the rule is registered before the import
Creating a dataset where the rule is registered after the import
Now the content of both studyspecs differs:
to give a few examples:
register_after_import
contains keys that are not present inregister_before_import
, for example for entryanat-T1w
:The reason is, that if no rule was registered before importing data, the default heuristics are used and otherwise the defaults are ignored. Even though this should not change the conversion result, it is confusing.
Although not perfect, but an easy solution could be to execute the default heuristic always first.