Project-MONAI / Project-MONAI/MONAILabel
Spacingd makes label and image shape mismatch
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 891
- Forks
- 269
- Avg merge
- 15h 41m
- Merged PRs (30d)
- 1
Description
Please use MONAILabel's Discussions tab
For questions relating to MONAILabel usage, please do not create an issue.
Instead, use MONAI's GitHub Discussions tab. This can be found next to Issues and Pull Requests along the top of our repository.
load_transforms = monai.transforms.Compose([
monai.transforms.LoadImaged(keys=["image", "label_path"]),
monai.transforms.AddChanneld(keys=["image", "label_path"]),
monai.transforms.Orientationd(keys=["image", "label_path"], axcodes="RAS"),
])
and out put is untransformed is (1, 512, 512, 254),(1, 512, 512, 254)
while:
spacing_transforms = monai.transforms.Compose([
monai.transforms.LoadImaged(keys=["image", "label_path"]),
monai.transforms.AddChanneld(keys=["image", "label_path"]),
monai.transforms.Orientationd(keys=["image", "label_path"], axcodes="RAS"),
monai.transforms.Spacingd(keys=["image", "label_path"],
pixdim=(args.space_x, args.space_y, args.space_z),
mode=("bilinear", "nearest")),
])
and output is transformed is (1, 326, 326, 423),(1, 342, 342, 170)
and my version is monai 1.1.0,there is a warning——pixdim[0] (qfac) should be 1 (default) or -1; setting qfac to
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are identified. Start by reproducing the LoadImaged, AddChanneld, Orientationd, and Spacingd pipeline shown with MONAI 1.1.0, then inspect the image and label metadata and resulting shapes; done requires a clarified expected shape relationship or a reproducible defect with a proposed test case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100