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

5 ビュー (過去 30 日間)
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");

回答 (1 件)

Shubham
Shubham 2023 年 9 月 15 日
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!!

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by