Project-MONAI / Project-MONAI/MONAI

built-in option of `FromMetaTensor` in LoadImage?

Open
#4,700 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature request
Dominant language
Python
Stars
8.7k
Forks
1.6k
Avg merge
5d 1h
Merged PRs (30d)
20

Description

Is your feature request related to a problem? Please describe.
for backward compatibility, it might be useful to consider an option of as_dict=True to enable FromMetaTensor as part of the LoadImage transform.

Currently we have a similar design of the ensure_channel_first flag for EnsureChannelFirst
https://github.com/Project-MONAI/MONAI/blob/7a5de8b7b9db101a431e70ae2aa8ea7ebb8dfffe/monai/transforms/io/array.py#L262-L263

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in monai/transforms/io/array.py near the existing ensure_channel_first option and review how LoadImage and FromMetaTensor are currently defined. Check the related transform tests, then verify that the proposed as_dict option enables FromMetaTensor through LoadImage while preserving backward compatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.