Why does creatMaks have no images
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
UDAYA PEDDIRAJU
am 12 Mär. 2024
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 Kommentare
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!