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

RTSTRUCT slice interpolation #17

Open
DylanHsu opened this issue Apr 7, 2021 · 3 comments
Open

RTSTRUCT slice interpolation #17

DylanHsu opened this issue Apr 7, 2021 · 3 comments
Labels
question Further information is requested

Comments

@DylanHsu
Copy link

DylanHsu commented Apr 7, 2021

Dear RT-UTILS authors,

Firstly, thank you for this wonderful and helpful library. It is amazing to use.

I would like to make a feature suggestion. I am not aware of any existing tool for resampling the RTSTRUCT pointsets into a different 3D geometry, which is a nontrivial problem. Existing tools are capable of handling different pixel spacing using workarounds, but not different slice spacing. For example, I could prepare a dummy CT series with different pixel spacing, and pass it to RTStructBuilder.create_from. Similar hacking is possible in Plastimatch using a dummy reference series or image file e.g. Nifti format. However, to get to a different slice spacing, nearest-neighbor interpolation is still required. I believe that a more intelligent way to handle this, starting from the pointsets and not the voxel masks, would be a choice addition to RT-UTILS.

Best regards,
Dylan Hsu, Ph.D
Memorial Sloan-Kettering Cancer Center

@awtkns
Copy link
Contributor

awtkns commented Apr 8, 2021

HI @DylanHsu ,

Thanks for the feedback, we are happy RT-UTILS being received well and used in the public.

With regards pointsets vs voxel masks, I am not entirely sure this is possible with the RT-Struct standard as each mask is usually associated with a slice. Do you have an example use case?

We are always open to PRs 😄

@awtkns awtkns added the question Further information is requested label Apr 8, 2021
@DylanHsu
Copy link
Author

DylanHsu commented Apr 9, 2021

Hi Adam,

I can give an example where the aforementioned feature would help. As you probably know, to apply machine learning techniques to medical images, it's imperative to standardize your input data. Let's say we have a patient dataset with CT images and RTSTRUCT files containing the ground truth. Our CT images have non-uniform CT slice thickness, but we need rasterized 2D (3D) voxel data with a uniform voxel spacing. We choose the minimum slice thickness of all series, rasterize each structure set to its native slice spacing, then resample to the intended spacing using nearest-neighbor interpolation. Perhaps we have lost some quality in resampling those pointsets, which could be recovered by treating the pointset as some kind of polyhedron and determining a new pointset from intersecting planes of the intended spacing.

Proprietary software such as MIM have a feature to resample structure set to a different pixel and slice spacing, but I'm not sure if the structures are first rasterized and resampled into the new spacing, or if they are interpreted more intelligently from the pointset.

I'd be happy to contribute to a PR in the future.

All the best
Dylan

@awtkns
Copy link
Contributor

awtkns commented Apr 15, 2021

Hi Dylan. If you wanted to try and PR this that would be great. My one concern is that this could be out scope for Rt-utils as this seems to be more pixel manipulation rather then rt-utils core focus of rt-struct creation from masks.

Thoughts @carluri?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants