Skip to content

2208 Add meta_keys arg to the components#2214

Merged
wyli merged 11 commits intoProject-MONAI:devfrom
Nic-Ma:2208-add-meta-key
May 19, 2021
Merged

2208 Add meta_keys arg to the components#2214
wyli merged 11 commits intoProject-MONAI:devfrom
Nic-Ma:2208-add-meta-key

Conversation

@Nic-Ma
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma commented May 19, 2021

Fixes #2208 .

Description

The meta_key_postfix arg can help to use a same postfix to get meta data of different keys, but sometimes we may want to use key A's meta data for key B, so also need a more explicit way to specify the meta_keys.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma Nic-Ma force-pushed the 2208-add-meta-key branch from 7eff54f to 65a3e8d Compare May 19, 2021 09:26
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 19, 2021

/black

@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli May 19, 2021 09:29
Nic-Ma added 2 commits May 19, 2021 18:57
Signed-off-by: Nic Ma <[email protected]>
Signed-off-by: Nic Ma <[email protected]>
Copy link
Copy Markdown
Member

@ericspod ericspod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few comments but otherwise looks good.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 19, 2021

Hi @ericspod ,

Thanks very much for your review.
I updated the PR according to your comments.
Could you please help review it again?

Thanks in advance.

@ericspod ericspod self-requested a review May 19, 2021 13:55
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 19, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 19, 2021

Hi @ericspod ,

This feature can be helpful if we want to use the meta data which was not generated from current key, for example:
If we use SaveImageD transform to save the model output with key pred, there is no meta data with key pred_meta_dict which has postfix meta_dict, instead, we should use the image_meta_dict to extract meta data. So we need a way to explicitly specify the key of expected meta data.

Thanks.

@Nic-Ma Nic-Ma enabled auto-merge (squash) May 19, 2021 14:07
@Nic-Ma Nic-Ma disabled auto-merge May 19, 2021 14:09
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 19, 2021

/black

@wyli wyli merged commit 1ee459b into Project-MONAI:dev May 19, 2021
@Nic-Ma Nic-Ma deleted the 2208-add-meta-key branch July 2, 2021 23:36
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.

Add meta_key arg to enhance the meta_key_postfix arg

4 participants