How can I place the cancerous area on the CT image and separate it into ROI and non-ROI?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Zeynep Fatma
am 6 Apr. 2023
Bearbeitet: Image Analyst
am 10 Apr. 2023
I have dicom file (body picture) and one cancerous area image detected in that body picture. How can I merge these cancerous regions with the dicom file? My second question is how can I do this automatically to 494 images?
Note: Since the dicom file could not be uploaded to this platform, I uploaded the body image as .jpg. How can I overlap dicom and jpg files together?
2 Kommentare
Joe Vinciguerra
am 6 Apr. 2023
What do you mean when you say "merge", and what is the final output you want? For example, do you want a single image showing the CT and highlighting the ROI?
Akzeptierte Antwort
Image Analyst
am 7 Apr. 2023
Bearbeitet: Image Analyst
am 10 Apr. 2023
OK, here is an example.
0 Kommentare
Weitere Antworten (2)
Image Analyst
am 6 Apr. 2023
Start with the FAQ: https://matlab.fandom.com/wiki/FAQ#How_can_I_process_a_sequence_of_files?
It's a generic, general purpose demo of how to threshold an image to find blobs, and then measure things about the blobs, and extract certain blobs based on their areas or diameters.
0 Kommentare
Joe Vinciguerra
am 10 Apr. 2023
Bearbeitet: Joe Vinciguerra
am 10 Apr. 2023
With the files you provided, and no special toolboxes:
CT = imread("Body-CT.jpg"); % import the CT image
ROI = imread("ROI.jpg"); % import the ROI image
CT(end+1, :) = 0; % make the CT array the same size as the ROI array
ROIN = ROI / 255; % normaize to 1
ROIN = uint8(ROIN); % convert to an integer
RGB = CT; % initialize a variable for the merged image
RGB(:,:,2) = RGB(:,:,2) - RGB(:,:,2).*ROIN; % reduce the amount of green in the ROI
RGB(:,:,3) = RGB(:,:,3) - RGB(:,:,3).*ROIN; % reduce the amount of blue in the ROI
indx = and(ROIN, RGB(:,:,1) < 64); % find areas within the ROI where red is too dim
RGB(:,:,1) = RGB(:,:,1) + 64*uint8(indx); % increase red within the ROI where it is too dim
% imshow(RGB) % display the results if you want to
imwrite(RGB, "output.png") % save the output to a file
Now put this code in a FOR loop to process a batch of images, where the file name variables change accordinly.
Some of this code (where you see uint8, 255, 64) assumes your images are 8-bit. This would need to change based on the dynamic range of the images. Additionally, I'm not familiar with dicom files, so check out this: DICOM file format in medical imaging - MATLAB & Simulink (mathworks.com)
0 Kommentare
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!