Why does creatMaks have no images
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!