How can I place the cancerous area on the CT image and separate it into ROI and non-ROI?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zeynep Fatma
el 6 de Abr. de 2023
Editada: Image Analyst
el 10 de Abr. de 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 comentarios
Joe Vinciguerra
el 6 de Abr. de 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?
Respuesta aceptada
Image Analyst
el 7 de Abr. de 2023
Editada: Image Analyst
el 10 de Abr. de 2023
OK, here is an example.
0 comentarios
Más respuestas (2)
Image Analyst
el 6 de Abr. de 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 comentarios
Joe Vinciguerra
el 10 de Abr. de 2023
Editada: Joe Vinciguerra
el 10 de Abr. de 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 comentarios
Ver también
Categorías
Más información sobre DICOM Format en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!