How can I use the DICOMWRITE function to save a in MATLAB generated contour as a DICOM file? (Modality RTSTRUCT)

1 view (last 30 days)
I would like to be able to use the DICOMWRITE function to save my current contour (an array of x y and z coorinates of points) as a DICOM file. Or alternatively to edit one of the structures of the original dcm file (Modality RTSTRUCT). Thanks for your help!
  1 Comment
Michaela Daniel
Michaela Daniel on 26 Jun 2014
Hi everyone!
I managed to edit and add new contours to the metadata of the dicomfile.
I used dicominfo to edit the data
(e.g.info.ROIContourSequence.(NewItem).ReferencedROINumber = NumberOfROIs; %adapting the refROINumber in a loop)
and dicomwrite to save the altered data to a new file.
(e.g. dicomwrite([ ],[inputnewfilename '.dcm'], info, 'CreateMode', 'Copy') )
So far, so good...
A problem occurs when I try to import the new generated file back to the treatment planning system. It cannot read it ("file is not a dicomfile"?!) or complains that something's wrong with it. I suppose that the default image data dicomwrite is saving to it (e.g. Width=0, Height=0, BitDepth=16... instead of [ ]) is confusing the system, so that it cannot recognize it as structure-file.
I really need your help. Do you know how one can change this default values?
Thanks in advance!

Sign in to comment.

Answers (0)

Categories

Find more on DICOM Format in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!