DOSE.dcm to nifti Convertion fails

33 views
Skip to first unread message

Óscar Peña-Nogales

unread,
Jun 21, 2021, 3:37:13 AMJun 21
to Plastimatch
Hi all,

I've started using Plastimatch to convert dose images from dicom to nifti with this command:
>> plastimatch convert --input dicom_dir --input-dose-img doses/RTDOSE0000000005.dcm --output-dose-img temp_doses/RTDOSE0000000005.nii.gz --dose-scale 0.000038264590900000003

And it is working fine for most of the images, but it is failing in some of them with the following error:
 plastimatch: /build/gdcm-NQLsIX/gdcm-2.8.4/Source/DataStructureAndEncodingDefinition/gdcmAttribute.h:601: gdcm::Attribute<Group, Element, TVR, 218367>::ArrayType& gdcm::Attribute<Group, Element, TVR, 218367>::GetValue(unsigned int) [with short unsigned int Group = 12292; short unsigned int Element = 12; int TVR = 32; gdcm::Attribute<Group, Element, TVR, 218367>::ArrayType = double]: Assertion `idx < GetNumberOfValues()' failed.

In the command above the dose scale is the one of the image failing.
Does anyone know why that is happening, or what does the error mean?

Thank you very much :)
Best,
Óscar

Paolo Zaffino

unread,
Jun 21, 2021, 4:36:05 AMJun 21
to plast...@googlegroups.com
Hi,
for dose conversion I usually run:
plastimatch convert --input FOLDER_WITH_ONLY_DOSE --referenced-ct DICOM_CT --fixed NRRD_CT.NRRD --resize-dose --output-dose-img DOSE.NRRD

I use nrrd, but you can use nii.gz or mha.
In this case I had a folder with a single dicom dose inside, I think you can pass directly the dicom dose file as input.
I added also --reside-dose in order to have the dose with the same shape of CT, if you want an "untouched" dose you can remove this option.

HTH.

Paolo
--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/3eb95fbb-951c-4c8a-9758-d12d8d52ae6dn%40googlegroups.com.


Óscar Peña-Nogales

unread,
Jun 21, 2021, 6:12:17 AMJun 21
to Plastimatch
Hi Paolo - Thank you very much for your quick response.
It does work by applying your command (where I have included the --dose-scale and removed the --fixed) . However, if I apply your command and my original command to other images, the scale of the output dose images are clearly different. For example, with my original command the scale range goes from 1 to 15, but with yours it goes from 0.0001517 to 0.003388, do you know what might be causing that difference?

Thank you very much,
Óscar

Paolo Zaffino

unread,
Jun 21, 2021, 6:47:10 AMJun 21
to plast...@googlegroups.com
Hi Óscar,
no, something like this never happened to me, I'm sorry.

Paolo

Dylan Hsu

unread,
Jun 21, 2021, 10:22:57 AMJun 21
to plast...@googlegroups.com
Hi Oscar,

What about invoking "plastimatch convert" the way Paolo does it, but then call "plastimatch scale" afterwards to get the correct dose scaling?

all the best,
Dylan

Óscar Peña-Nogales

unread,
Jun 21, 2021, 10:54:06 AMJun 21
to Plastimatch
Hi Dylan,

Thank you very much for your suggestion. In this case the range is the same as in Paolo's case, which is is supper different to what I was obtaining before.... maybe my original command those something wrong?

thanks
Óscar

Sharp, Gregory C.

unread,
Jun 21, 2021, 11:19:30 AMJun 21
to Plastimatch
Hi Oscar,

The --input-dose-img option is intended to take a non-dicom image file (such as nifti), and add it to the study as a dose. That is why it is not working well. I would do it like this:

plastimatch convert --input dicom_dir --output-dose-img dose.nii

You mention using --dose-scale and then found that the output values were scaled. What is the complete command line you are using?

Greg



________________________________________
From: 'Óscar Peña-Nogales' via Plastimatch <plast...@googlegroups.com>
Sent: Monday, June 21, 2021 10:54 AM
To: Plastimatch
Subject: Re: [Plastimatch] DOSE.dcm to nifti Convertion fails

External Email - Use Caution
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/3eb95fbb-951c-4c8a-9758-d12d8d52ae6dn%40googlegroups.com<https://secure-web.cisco.com/10wOSFyt6D3MO0wPjyybHDPM2ApSEKBAXB3rK1MNe9gcNp9ejrlvx7lYnyE5YU7RkfB_w2BfwfjgPC4acSHFnYLO-_CShv_MC6XyMZPNdPD2R9oVu-92H8dBqm-1M3nWKPatDpeSsGVi9Gv56c9HDy7sNRu1_86MpWbL-tur6xfDOG1VNQGfOZQm-WJN-nKrJ7gwjWInkLeh4v4JeNuGNHiS9E4L1u7w32IUmGqorVMC1EE5mfX5CFpT6zFU5uhEVOIM5-LXBgeb-Wm6dKI5UXg/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2F3eb95fbb-951c-4c8a-9758-d12d8d52ae6dn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.


--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/bba3a8a0-cf6c-4276-bf5c-52629240983fn%40googlegroups.com<https://secure-web.cisco.com/19r45Gj6DsGHSLaeHVRkFfktMBXW2BbUD42Eq09OeZQFq0MSsdZQ6RA6BXAeIME5E5zPMjpvRlWYr3LBYhKYaZyjzVrI7oXp1P6Lko8f5HUzEZuCgme0vfIjs-rKtyJDO5PaqwDuGhJ08K27mf4Bk1apeZ306Wwj1wfyS59sBvkn5SVC0qEMt0ZDmCV_2ztbwauaKHwoxFyo3U789_VUyx5sPeDH68jKAOtwcsGYgyqLk69Tf9ArCsvPPu0wTZyA84Szqv1euuMQ8hml-CXpOOA/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2Fbba3a8a0-cf6c-4276-bf5c-52629240983fn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.

--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com<mailto:plastimatch...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/a16577d8-03bb-4032-aa68-5800a426f783n%40googlegroups.com<https://secure-web.cisco.com/1aYDyblcKmfdc67MQF0mEGjcGA3uXLEQvtxCCnKyrREBzlcOmftksBzOZzP6BnwfQBMHuNNOQX9nrbvVMQk8CwE_QDSLa--UdrTq7HD6d3pd2HAtv1it3Y_VPwhkz1m92kHebknaJV7THxh1tD__i9-uzRnXi9xKjsRUUWwJHNDBsEOSbtOrk0e2reqpxUg2oIkvsF3vWH9UYtA91xuB0HmRk57PtwyluiIjvQga1g_Mhp2LSHxDYs_f5gbWYXzxOHgArfjlWE_PPM53WnQ3z3A/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2Fa16577d8-03bb-4032-aa68-5800a426f783n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.

Óscar Peña-Nogales

unread,
Jun 21, 2021, 11:30:50 AMJun 21
to Plastimatch
Hi Sharp,

Thanks for your input. The command I was using before was:
>> plastimatch convert --input dicom_dir --input-dose-img doses/RTDOSE0000000005.dcm --output-dose-img temp_doses/RTDOSE0000000005.nii.gz --dose-scale 0.000038264590900000003

And the one Paolo and Dylan suggested is:
>> plastimatch convert --input DOSE_FILE.dcm -referenced-ct DICOM_MRI  --output-dose-img temp_doses/RTDOSE0000000005.nii.gz --dose-scale 0.000038264590900000003
(although Paolo suggested to split it in two)

You would vote for the latter one as well, right?

Do you know where can I find more information about your statement: 'The --input-dose-img option is intended to take a non-dicom image file'.

Thanks! :)
Óscar

Sharp, Gregory C.

unread,
Aug 17, 2021, 11:22:17 AMAug 17
to Plastimatch
Hi Oscar,
I'm very sorry for the late reply. We are very busy these days.

Were you able to get this to work?

To answer your question, the --input-dose-img is needed when you want to convert something from a research image format (nrrd, nii, mha) into a DICOM RTDOSE. It specifies that the image should be treated as dose instead of, say, a CT image.

Greg

________________________________________
From: 'Óscar Peña-Nogales' via Plastimatch <plast...@googlegroups.com>
Sent: Monday, June 21, 2021 11:30 AM
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/3eb95fbb-951c-4c8a-9758-d12d8d52ae6dn%40googlegroups.com<https://secure-web.cisco.com/16kW3FC91Uu-hjSM1tjhATiZswa5eNg-4i3XECYbTLcUYqyjoAY8roSNvvYc-XylEDsseixDF4yy0eTKs2BTzimlLcHjpdRS5KNEVjTkakfKs7DOG3Bxcn-TS9tMStbNX-V7vLZreS2njHQnaHldUaxzjxuWySeLTg536-CnhVl6A5YoBVePniRWaxozWPPN4TsEgAPRsf6MeFoZVHDANTqAZbVB2_u9FauslXnpLqDGDghKffiKWfBZ2bPEnbClWDzQXfceQfcp_XRGCqWaGLQ/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2F3eb95fbb-951c-4c8a-9758-d12d8d52ae6dn%2540googlegroups.com><https://secure-web.cisco.com/10wOSFyt6D3MO0wPjyybHDPM2ApSEKBAXB3rK1MNe9gcNp9ejrlvx7lYnyE5YU7RkfB_w2BfwfjgPC4acSHFnYLO-_CShv_MC6XyMZPNdPD2R9oVu-92H8dBqm-1M3nWKPatDpeSsGVi9Gv56c9HDy7sNRu1_86MpWbL-tur6xfDOG1VNQGfOZQm-WJN-nKrJ7gwjWInkLeh4v4JeNuGNHiS9E4L1u7w32IUmGqorVMC1EE5mfX5CFpT6zFU5uhEVOIM5-LXBgeb-Wm6dKI5UXg/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2F3eb95fbb-951c-4c8a-9758-d12d8d52ae6dn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.


--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/bba3a8a0-cf6c-4276-bf5c-52629240983fn%40googlegroups.com<https://secure-web.cisco.com/1qHls1Oh7Y5k-o-LGejIbgKw7KdSRhSsvgsW2B5DYvtbmN6AdzlEGMbgiztL6pKXSCH5ClSkis1e5c3PtpY-LCD8Kyn-Qknln_kUCpSntMepdU0j2cZypynVDqvpwoNiqiHJN79R9G5hmnZnyN9EnzsLOOwYqA1NLLdJ6H6VZOdUtxuP4-mYsC8o95kBaWEgbDbL4Vn8zA-DLPEj5ZegVcuOMl_ubqAq7wyLNYsL1RgRGEbVeM0UTM3R6EvcyPMivimDauNDfcdnp_Meadye8TQ/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2Fbba3a8a0-cf6c-4276-bf5c-52629240983fn%2540googlegroups.com><https://secure-web.cisco.com/19r45Gj6DsGHSLaeHVRkFfktMBXW2BbUD42Eq09OeZQFq0MSsdZQ6RA6BXAeIME5E5zPMjpvRlWYr3LBYhKYaZyjzVrI7oXp1P6Lko8f5HUzEZuCgme0vfIjs-rKtyJDO5PaqwDuGhJ08K27mf4Bk1apeZ306Wwj1wfyS59sBvkn5SVC0qEMt0ZDmCV_2ztbwauaKHwoxFyo3U789_VUyx5sPeDH68jKAOtwcsGYgyqLk69Tf9ArCsvPPu0wTZyA84Szqv1euuMQ8hml-CXpOOA/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2Fbba3a8a0-cf6c-4276-bf5c-52629240983fn%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.

--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com<mailto:plastimatch...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/a16577d8-03bb-4032-aa68-5800a426f783n%40googlegroups.com<https://secure-web.cisco.com/1sHK9u6CW4CFHRls3ncLw5ATdYcVvMQVzm3d-2QYpU4zYYvWqIUcGt0uJjv1y5S5MwPDejR4zaX_OTA9X1oMVk01fKm9FT1nECb3rHaKCU1IykbUuAa4BgztVFxGbUqK6L7sWDZwTP1p0wRKr4BWBun1lVlpzpiakV3u1xc_0-Dmq1AlKAh751UBKJO4PJmFymKLk7aXI6ldoG2rkaU2UF37LyjCQvNuxTG8yzy2zv21ZjYNJpw_987nXCbuxS7luQTMSVRHrPuGk0eRJfyTVtQ/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2Fa16577d8-03bb-4032-aa68-5800a426f783n%2540googlegroups.com><https://secure-web.cisco.com/1aYDyblcKmfdc67MQF0mEGjcGA3uXLEQvtxCCnKyrREBzlcOmftksBzOZzP6BnwfQBMHuNNOQX9nrbvVMQk8CwE_QDSLa--UdrTq7HD6d3pd2HAtv1it3Y_VPwhkz1m92kHebknaJV7THxh1tD__i9-uzRnXi9xKjsRUUWwJHNDBsEOSbtOrk0e2reqpxUg2oIkvsF3vWH9UYtA91xuB0HmRk57PtwyluiIjvQga1g_Mhp2LSHxDYs_f5gbWYXzxOHgArfjlWE_PPM53WnQ3z3A/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2Fa16577d8-03bb-4032-aa68-5800a426f783n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at http://www.massgeneralbrigham.org/complianceline<http://secure-web.cisco.com/1bNL540EaiDdiakNlxrP7Pc4vqFgMT616IYrF7NcrG-MaTPFGChpvx8-kQlRcXaQuozTqnHFYRGM0gA_Ob4i-2Q7OS_fdgHJADVkPm74cCGewqxEDcL6zYf9nzze7TPb1TqQyJmDKInfsxoOzrPJpu2LDYCllVSX5AoceHFxD1fanaRqYCZa9lOP-zjKZDC-hpyyE1fQCBWHtA0KqUGbq1hPl8YWCPzq5PYOtnfBgRT3_z8PjsAc83q7EyFDPoo1kxo6YE0vwJCymUnu9mfS6_w/http%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline> . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Please note that this e-mail is not secure (encrypted). If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately. Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail.


--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com<mailto:plastimatch...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/948db5a3-c8a0-4d40-8d93-d2979e8b07ben%40googlegroups.com<https://secure-web.cisco.com/1UWmg0xXjGvWzn3cYHT76e_PDR3L_xjVpWq1ttxO_Ap3Xnj1YxEYBnOpKcYT5X0TYSksBo1gA-C-niqTT6a7788MLGm3P9DO8n6T1e2q5qpwSVyWhcieT-6-0X76XaAy9UDLPmY0xad9QmA9QW2wq-3uE9wLDx_gxADfT_Fmeh-DBZKcU9Juc5PPbj4hpLSOtKtbXpZ0aTFgIXYmX5uo9O8CVimZtTH7PhdG1Qm_hbBbm8AYi6FWI2NiIfQmqy7qyCh_3BJwWhkUuEohmQMlRjg/https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fplastimatch%2F948db5a3-c8a0-4d40-8d93-d2979e8b07ben%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter>.
Reply all
Reply to author
Forward
0 new messages