Project-MONAI / Project-MONAI/MONAI
Create transform to get tumor size
Nobody has claimed this yet.
- 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 segmentation models, Radiologist are interested in finding the size of the tumors. The transform should calculate the number of pixels for each label and multiple it by the voxel size.
voxel size= pixel xy spacing ^2 X slice thickness
Describe the solution you'd like
Would like a transform to give back the tumor or tumors and their sizes as
spleen =1 connected components, pixel count = 200, size 500 ml
Liver tumors = 3 with sizes=100, 150, 50 ml
Describe alternatives you've considered
I manually have function calls to do connected components for certain labels then calculate the tumor size
one suggestion from @YanxuanLiu was to do it a lambda transform but it is missing the z dim
Lambda(func=lambda x: (x > 0).sum() * torch.prod(x.pixdim))
Additional context
The transform should work on each connected component for each label that is patient has 5 liver tumors and give the size of each tumor.
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 file or test is named in the issue. Start by reviewing the existing connected-components function calls and the Lambda example using x.pixdim; done means the transform reports each requested label's connected components and their sizes using the available voxel dimensions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100