Why does creatMaks have no images

1 回表示 (過去 30 日間)
梅花
梅花 2024 年 3 月 7 日
回答済み: UDAYA PEDDIRAJU 2024 年 3 月 12 日
This is my code, the function is to generate mask by dicom RT:
info = dicominfo('G:\2024\FillContourFile\rtst2.dcm');
rtContours = dicomContours(info);
rtContours.ROIs
figure
plotContour(rtContours)
dcmFiles = dir('E:\Desktop\pyDemo\pythonProject\150s_masked\*.dcm');
info = dicominfo(fullfile(dcmFiles(1).folder, dcmFiles(1).name));
imageSize = [info.Rows, info.Columns, numel(dcmFiles)];
pixelSpacing = [info.PixelSpacing', info.SliceThickness];
%Here imageSize=[223 406 181],pixelSpacing=[0.5410 0.5410 1.0000]
referenceInfo = imref3d(imageSize,pixelSpacing(1),pixelSpacing(2),pixelSpacing(3));
for i=1:size(rtContours.ROIs,1)
contourIndex = i;
Name = string(rtContours.ROIs{i, 2}{1});
mask = createMask(rtContours, contourIndex, referenceInfo);
size(mask)
volshow(mask);
end

回答 (1 件)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2024 年 3 月 12 日
Hi 梅花,
The issue with "createMask" producing no images could be due to a spatial mismatch between the RT contours and the DICOM images, or incorrect specifications in "imageSize" or "pixelSpacing'. Ensure the RT contours align with the DICOM series spatially and that "referenceInfo" accurately reflects the image dimensions and resolution. Double-check the contour coordinates and the DICOM series for consistency in anatomical coverage and patient positioning.
If you still face the issue after checking the above, attach the required files for further investigation and debugging.

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by