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

4 visualizaciones (últimos 30 días)
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");

Respuestas (1)

Shubham
Shubham el 15 de Sept. de 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!!

Categorías

Más información sobre DICOM Format en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by