to rejoin the separated roi and roni of a dicom image

5 ビュー (過去 30 日間)
uthara ravi
uthara ravi 2015 年 12 月 16 日
コメント済み: Tanjena Azim 2021 年 8 月 4 日
i hav the code for separating a dicom image as ROI and RONI. pls help me to reverse the process.
%code for separating the ROI and RONI of a DCM file
clear all;
close all;
[RONI,MAP]=dicomread('189.dcm');
InputImg1 = uint8(255*mat2gray(RONI));
% Display the Image
figure,imshow(InputImg1,[]);title('Select the region of interest(ROI)');
% Get Inputs from Mouse,Select 4 Seed Points in Image
[Col Row]=ginput(4);
c =Col;
r =Row;
% Select polygonal region of interest
BinaryMask = roipoly(InputImg1,c,r);
%figure,imshow(BinaryMask,[]); title('Selected Region of Interest')
%Create Buffer for ROI
ROI=zeros(512,512);
%Create Buffer for NONROI
RONI=zeros(512,512);
for i=1:512
for j=1:512
if BinaryMask(i,j)==1
ROI(i,j)=InputImg1(i,j);
else
RONI(i,j)=InputImg1(i,j);
end
end
end
%Display ROI and Non ROI
figure,imshow(ROI,[]);title('ROI');
figure,imshow(RONI,[]);title('NON ROI');

回答 (1 件)

Walter Roberson
Walter Roberson 2015 年 12 月 16 日
Merged = RONI;
Merged(BinaryMask) = ROI;
figure,imshow(Merged,[]);title('Merged NON ROI and ROI');
  7 件のコメント
Walter Roberson
Walter Roberson 2021 年 8 月 4 日
I myself do not have much experience with that work. @Image Analyst might have suggestions.
Tanjena Azim
Tanjena Azim 2021 年 8 月 4 日
.@Walter Roberson Sir, thanks for ur prompt reply :)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by