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

Add structure channel for rendering with masks #215

Closed
eigenvivek opened this issue Apr 13, 2024 · 1 comment · Fixed by #216
Closed

Add structure channel for rendering with masks #215

eigenvivek opened this issue Apr 13, 2024 · 1 comment · Fixed by #216

Comments

@eigenvivek
Copy link
Owner

eigenvivek commented Apr 13, 2024

output of drr.forward should be B C H W where C is the number of structures in drr.subject.mask (C=1 if subject has no mask).

current idea is

  • use the same indexes for the volume on the mask, ie channels = torch.take(mask, idxs) with shape B (HW) N
  • onehot channels for shape B C (HW) N
  • multiply channels and voxels, nansum over N, and make img with shape B C (HW)

current limitation: onehot is memory intensive for C = 118 (ie, totalsegmentator)

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 a pull request may close this issue.

1 participant