필터 지우기
필터 지우기

How can I place the cancerous area on the CT image and separate it into ROI and non-ROI?

조회 수: 1 (최근 30일)
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
Joe Vinciguerra
Joe Vinciguerra 2023년 4월 6일
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?
Zeynep Fatma
Zeynep Fatma 2023년 4월 6일
When I say merge, I meant that montaging the tumor region (ROI) on the body image. I want to get a single image by putting ROI on Dicom image(CT). I want to get a result like the image that I have uploaded.

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2023년 4월 7일
편집: Image Analyst 2023년 4월 10일

추가 답변 (2개)

Image Analyst
Image Analyst 2023년 4월 6일
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.

Joe Vinciguerra
Joe Vinciguerra 2023년 4월 10일
편집: Joe Vinciguerra 2023년 4월 10일
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)

카테고리

Help CenterFile Exchange에서 DICOM Format에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by