-2

I'm currently an MS student in Medical Physics and I have a great need to be able to overlay an isodose distribution from an RTDOSE file onto a CT image from a .dcm file set.

I've managed to extract the image and the dose pixel arrays myself using pydicom and dicom_numpy, but the two arrays are not the same size! So, if I overlay the two together, the dose will not be in the correct position based on what the Elekta Gamma Plan software exported it as.

I've played around with dicompyler and 3DSlicer and they obviously are able to do this even though the arrays are not the same size. However, I think I cannot export the numerical data when using these softwares.I can only scroll through and view it as an image. How can I overlay the RTDOSE to an CT image?

Thank you

  • I am not sure, since I have no experience wih RTDose, but: in dicom you do not only have the pixel array, you also have the PixelSpacing Tag. This is very important. Because maybe the CT has 512x512 pixels with a pixelspacing of 1.0x1.0mm. This means the image is 512mm times 512mm. and the RTDose has only 100x100 pixels but pixelspacing of 5.12x5.12mm. then each pixel in the dose is bigger, but the whole image again is 512mm times 512mm. This is just an assumption, but please take a look. – gofal3 Oct 30 '19 at 19:32
  • Ican we assume the RTDose data is in the same frame of reference as the series you want to display it on? (I.e. Leave out registration steps). – bastijn Nov 03 '19 at 22:27
  • @bastijn I'm guessing yes, because it looked like 3DSlicer "was able to do this" and likely the RT data was generated for that CT. ...I also didn't want to get (below) into a whole next level of complexity about having to do registration if the FOR aren't the same lol! – Richard Nov 15 '19 at 09:37

1 Answers1

0

for what you want it sounds like you should use Simple ITK (or equivalent - my experience is with sitk) to do the dicom handling, not pydicom.

Dicom has built in a complete system for 3D point and location specifications for all the pixel data in patient coordinates. This uses a bunch of attributes in the dicom files in the Image Plane Module set of tags. See here for a good overview.

The simple ITK library fully understands and uses the full 3D Image Plane tags to identify and locate any images in patient coordinates by default - irrespective of such things as the specific pixel spacing, slice thickness etc etc.


So - in your case - if you use SITK to open your studies, then you should be able to overlay them correctly "out of the box", because SITK will do all the work to parse the Image Plane Module tags and locate the data in patient coordinates - just like you get with 3DSlicer.

Pydicom, in contrast, doesn't itself try to use any of that information at all. It only gives you the raw pixel arrays (for images).

Note I use both pydicom and SITK. This isn't something bad about pydicom, but more a question of right tool for the job. In fact, for many (most?) things I use pydicom, but for any true 3D type work, SITK is the easier toolkit to use.

Richard
  • 3,024
  • 2
  • 17
  • 40