Create a new dicom structure in dicom rt file with the contour data from the contour matrix returned from matlab contour() function

4 visualizzazioni (ultimi 30 giorni)
Does anybody know how to translate the coordinates returned by matlab contour() function to dicom contour data? c is the contour matrix i need to translate into dicom countour data and define as the parameter contours.
[c h]=contour(R);
info = dicominfo("RS_00170.dcm");
contourIn = dicomContours(info);
contourOut = addContour(contourIn,9,'name',contours,'Closed_planar');
info = convertToInfo(contourOut);
dicomwrite([],"RS_00170.dcm",info,CreateMode="copy");

Risposte (1)

Shubham
Shubham il 15 Set 2023
I understand that you want to convert the contour matrix into dicom contour data.
The contour matrix consists of two rows and the data is arranged in n sets of contour lines. Here is an example from the documentation of “contour()” function.
You can iterate over this matrix and add the coordinates of the contour lines to the dicom contour.
Create a temporary matrix storing the desired coordinates [x1 y1; x2 y2 …. xn yn] from the contour matrix, and add the matrix to the dicom contour data using the “addContour()” function.
You can refer to the following for more information:
Hope this helps!!

Categorie

Scopri di più su DICOM Format in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by