Hello
Apoligies if my question is outside the scope of this forum, but here it goes:
I am in a situation where I have to convert a mask created on a CT image in to a mask that applies to a PET image. E.g. from 480x480x600 -> 256x256x156 in dimensions. With the ultimate goal of doing SUV “readings/measurements” of the region within the PET roi.
Normally people have been using an old proprietary program for this transformation, but in a project I am trying to do the same, but in Python. Until now I have simply been using pydicom and numpy, for all my manipulations. As the images and roi’s come in DICOM files and an RTSTRUCT respectively.
My initial solution has been to:
- Find the contour points for the CT mask.
- Transfer the CT pixel coordinates to CT mm coordinates
- Then find “nearest/corresponding” mm coordinates in the PET coordinates using euclidean distance
- Then convert PET mm coords. to PET pixels
- And then fill the resulting PET contour points.
With this method I am able to reproduce the max, mean and std values within +/- 10%. But I believe there must be a smarter, more right and robust way.
I have tried to deduce how the proprietary software works, and I believe it tries to conserve the volume, as it makes these strange cut-offs in the masks sometime, but always ends up with a near identical volume as the CT mask.
I have thought about doing resampling of the images with SimpleITK, but fear that it might distort the true value.
So I will be very gratefull for any inputs or suggestions that you might have, especially if I can use SimpleITK to solve this.
Any help is much appreciated.
Regards
Jakob