This repository has been archived by the owner on Nov 2, 2021. It is now read-only.
RF: prevent storage of metadata in dicom subdatasets #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am attempting to remove any metadata aggregation done in the dicom subdatasets. The goal is to keep them "pristine" and store any aggregated metadata in the top-level superdataset.
Currently, there are 2 places where
hirni-import dicom
aggregates metadata. Once in the function_guess_acquisition_and_move
, in order to determine the session/acquisition if not provided (here the metadata is stored in the dicom subdataset), and then again right before callingdicom2spec
(here the metadata is stored it in the top-level superdataset).So far, this PR replaces
metadata_aggregate
done in_guess_acquisition_and_move
withmetadata_extract
in order to avoid storage of metadata in the dicom subdataset.Something I haven't figured out yet, is how to avoid the configuration setup done in the dicom subdataset. Currently, when the dicom subdataset is created, hirni configures the dicom metadata extractor.
Ideally, we wouldn't need this configuration and could keep the dicom subdataset "untouched" after the dicom data is extracted.
metadata_extract
allows me to get around this configuration by declaring the extractor to be executed throughsources
. But,metadata_aggregate
doesn't have an option to declare the extractor type in the command call, and rather requires the extractor to be enabled via the configuration file.This PR is a step forward as is in that it stores metadata in the top-level superdataset only, but
hirni-import-dicom
still "dirties" the dicom subdatasets via the metadata extractor configuration. Thoughts @mih and @bpoldrack?related #117