Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create transform to get tumor size #8196

Open
AHarouni opened this issue Nov 7, 2024 · 1 comment
Open

Create transform to get tumor size #8196

AHarouni opened this issue Nov 7, 2024 · 1 comment

Comments

@AHarouni
Copy link

AHarouni commented Nov 7, 2024

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.

@aylward
Copy link
Collaborator

aylward commented Nov 7, 2024

Instead of computing just one statistic, what about calling pyradiomics and getting extensive statistics on any and/or every label in a segmentation?

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

No branches or pull requests

2 participants