Viewing and modifying DICOM RT dose files

1,653 views
Skip to first unread message

loyola....@gmail.com

unread,
Dec 19, 2008, 2:34:02 PM12/19/08
to CERR FORUM
Hello all,

I'm working with the DICOM RT dose data, and (without being tied to
the respective CT and SS) was wondering if there is an easy way to
view and modify just the dose in CERR (or just Matlab).

I'm working with plans from BrachyVision, and want to apply
deformation fields to the dose distro. I know this may be a little
off topic, but thanks in advance for any help.

Mark

Khullar, Divya

unread,
Dec 22, 2008, 8:55:07 AM12/22/08
to cerr-...@googlegroups.com
Mark,
You should be able to import just the dose; Is there an error? CERR
creates a dummy scan if there in none.

Divya

Divya Khullar
Washington University School of Medicine
Department of Radiation Oncology
Campus Box 8224
4921 Parkview Place
St. Louis, MO 63110
Phone : (314)747-2973
Pager : (314)253-1927
Fax : (314)362-8521

************************************************************************
************************************************************************
****************
This email message is confidential, intended only for the named
recipient(s) above and may contain information that is privileged,
attorney work product, or exempt from disclosure under applicable law.
If you have received this message in error, or are not the named
recipient(s), please immediately notify the sender and delete this
message from your computer. Thank you.
************************************************************************
************************************************************************
****************
The materials in this message are private and may contain Protected Healthcare Information. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

NickH

unread,
Dec 23, 2008, 7:52:07 PM12/23/08
to CERR FORUM
Mark,

Assuming you have the plan/dose imported into CERR then you can just
open the 'planC' file in matlab ('whatever you saved the plan as.mat')
and go to the planC{1,8} structure. This contains all the info about
the dose cubes, including the dose array which is saved as a 3D
matrix. You can then pull this out and view how you like in Matlab or
other.

Regards,

Nick Hardcastle

On Dec 23, 12:55 am, "Khullar, Divya" <dkhul...@radonc.wustl.edu>
wrote:
> On Behalf Of loyola.hogga...@gmail.com

loyola....@gmail.com

unread,
Jan 6, 2009, 2:46:32 PM1/6/09
to CERR FORUM
Thanks everyone,

I was able to find exactly what I was looking for. I've found several
places where they are given in long lists along with the respective
header tags, but was wondering where those were processed in CERR. I
imagine there are most likely several functions that does this, but I
was wondering nonetheless if one of the functions specifically reads
and sorts the DICOM-RT header info. Thanks again for the input, it
was really helpful.

Mark

rickard....@gmail.com

unread,
Jan 28, 2009, 4:11:06 AM1/28/09
to CERR FORUM
I have problems importing an RT dose that's not connected to a CT and
RT struct.

The way I go about it is simply:

Import Study
DICOM (J)

and then select the path to the RT DOSE.

I get the following error:
Warning: DICOM Import has no methods defined for import into the planC
{indexS.dose}.fractionGroupID field, leaving empty.
??? Error using ==> reshape
To RESHAPE the number of elements must not change.

Error in ==> populate_planC_dose_field at 238
dose3 = reshape(doseV, [nCols nRows nSlcs]);

Error in ==> populate_planC_field at 153
dataS(dosesAdded+1).(names{i}) =
populate_planC_dose_field(names{i}, RTDOSE(doseNum), doseobj);

Error in ==> dcmdir2planC at 23
cellData = populate_planC_field(cellNames{i}, dcmdir_PATIENT);

Error in ==> CERRImportDCM4CHE at 75
planC = dcmdir2planC(dcmdirS.(selected)); %wy

Error in ==> CERR at 97
CERRImportDCM4CHE;

??? Error using ==> CERR('IMPORTDCM4CHE')
Error using ==> reshape
To RESHAPE the number of elements must not change.

??? Error while evaluating uicontrol Callback

would appriciate any help on this.

Regards
Rickard Ottosson
On 22 Dec. 2008, 14:55, "Khullar, Divya" <dkhul...@radonc.wustl.edu>
wrote:
> Mark,
> You should be able toimportjust thedose; Is there an error? CERR
> On Behalf Of loyola.hogga...@gmail.com
> Sent: Friday, December 19, 2008 1:34 PM
> To: CERR FORUM
> Subject: [cerr-forum:644] Viewing and modifying DICOM RTdosefiles
>
> Hello all,
>
> I'm working with the DICOM RTdosedata, and (without being tied to
> the respective CT and SS) was wondering if there is an easy way to
> view and modify just thedosein CERR (or just Matlab).
>
> I'm working with plans from BrachyVision, and want to apply
> deformation fields to thedosedistro.  I know this may be a little

James Alaly

unread,
Jan 28, 2009, 11:14:54 AM1/28/09
to cerr-...@googlegroups.com
That error suggests to me that that the dose file is corrupt in some
way... can you try using Matlab's built in dicom functions to see if
there is valid dose in there? Try:

doseV = dicomread('<DoseFilename>');
length(doseV)

and

dci = dicominfo('<DoseFilename>')

that should give you a dose vector and a structure array that should
include info about the dose dimensions. What is the output of those?

rickard....@gmail.com

unread,
Jan 29, 2009, 4:19:36 AM1/29/09
to CERR FORUM
Thanks for your reply.

These are the outputs:

>>doseV = dicomread('d:\MC\EclipseExport\TypeCProstata\6MV Simple IMRT\RD.1.2.246.352.71.7.1478776925.139041.20090126104643.dcm');
>> length(doseV)
ans =
158

doseV is 4-d unit32 vector with the correct dimensions.
>>size(doseV)
ans =
111 158 1 87

>> dci = dicominfo('d:\MC\EclipseExport\TypeCProstata\6MV Simple IMRT\RD.1.2.246.352.71.7.1478776925.139041.20090126104643.dcm')
dci =
Filename: [1x106 char]
FileModDate: '26-Jan-2009 10:49:16'
FileSize: 8243534
Format: 'DICOM'
FormatVersion: 3
Width: 158
Height: 111
BitDepth: 32
ColorType: 'grayscale'
SelectedFrames: []
FileStruct: [1x1 struct]
StartOfPixelData: 2140302
FileMetaInformationGroupLength: 164
FileMetaInformationVersion: [2x1 uint8]
MediaStorageSOPClassUID: '1.2.840.10008.5.1.4.1.1.481.2'
MediaStorageSOPInstanceUID:
'1.2.246.352.71.7.1478776925.139041.20090126104643'
TransferSyntaxUID: '1.2.840.10008.1.2'
ImplementationClassUID: '1.2.246.352.70.2.1.7'
SpecificCharacterSet: 'ISO_IR 100'
InstanceCreationDate: '20090126'
InstanceCreationTime: '104840'
SOPClassUID: '1.2.840.10008.5.1.4.1.1.481.2'
SOPInstanceUID:
'1.2.246.352.71.7.1478776925.139041.20090126104643'
StudyDate: '20070615'
StudyTime: '085843'
AccessionNumber: ''
Modality: 'RTDOSE'
Manufacturer: 'Varian Medical Systems'
ReferringPhysicianName: [1x1 struct]
StationName: 'HEDBVA01'
SeriesDescription: 'Eclipse Doses'
ManufacturerModelName: 'Aria RadOnc'
PatientName: [1x1 struct]
PatientID: '0000000010'
PatientBirthDate: ''
PatientSex: ''
SliceThickness: ''
DeviceSerialNumber: '1478776925'
SoftwareVersion: '8.2.24'
StudyInstanceUID:
'1.2.840.113704.1.111.3604.1181889783.3'
SeriesInstanceUID:
'1.2.246.352.71.2.1478776925.193697.20090126103704'
StudyID: '3909'
SeriesNumber: 64
InstanceNumber: ''
ImagePositionPatient: [3x1 double]
ImageOrientationPatient: [6x1 double]
FrameOfReferenceUID:
'1.2.840.113704.1.111.5168.1181891544.4'
PositionReferenceIndicator: ''
SamplesPerPixel: 1
PhotometricInterpretation: 'MONOCHROME2'
NumberOfFrames: 87
FrameIncrementPointer: [12292 12]
Rows: 111
Columns: 158
PixelSpacing: [2x1 double]
BitsAllocated: 32
BitsStored: 32
HighBit: 31
PixelRepresentation: 0
DoseUnits: 'GY'
DoseType: 'PHYSICAL'
DoseSummationType: 'PLAN'
GridFrameOffsetVector: [87x1 double]
DoseGridScaling: 7.8000e-005
TissueHeterogeneityCorrection: 'IMAGE'
DVHSequence: [1x1 struct]
ReferencedRTPlanSequence: [1x1 struct]
ReferencedStructureSetSequence: [1x1 struct]


On 28 Jan, 17:14, James Alaly <james.al...@gmail.com> wrote:
> That error suggests to me that that the dose file is corrupt in some
> way... can you try using Matlab's built in dicom functions to see if
> there is valid dose in there? Try:
>
> doseV = dicomread('<DoseFilename>');
> length(doseV)
>
> and
>
> dci = dicominfo('<DoseFilename>')
>
> that should give you a dose vector and a structure array that should
> include info about the dose dimensions.  What is the output of those?
>
> On Wed, Jan 28, 2009 at 3:11 AM, riolo...@heh.regionh.dk

Apte, Aditya

unread,
Jan 29, 2009, 9:45:43 AM1/29/09
to CERR FORUM

Can you try to import scan and dose together? Select the top-level directory containing both scan and dose. We found that there is a bug with importing individual dose/structs.

James Alaly

unread,
Jan 29, 2009, 10:40:02 AM1/29/09
to cerr-...@googlegroups.com
Interesting, the reshape should work unless CERR is getting a
different dose array compared to the built-in dicomread. Before
starting an import, please try:

dbstop if error;

Which should cause MATLAB to retain the variables at the point of
crashing. Once the crash occurs, try:

size(doseV)
nRows
nCols
nSlcs

Also, what system are you exporting from?
Reply all
Reply to author
Forward
0 new messages