how to obtain pixel values from multiple images in the same directory

1 回表示 (過去 30 日間)
sbei arafet
sbei arafet 2016 年 4 月 16 日
Hi,
i'm truying to get roi pixel values from many slices in the same folder,
dicomlist = dir(fullfile('D:\master\LUNGIX\LUNGIX\PET PETCT_WB_apc (Adult)\PET WB - 102\','*.dcm'))
for cnt = 1: size(dicomlist,1)
Slice(:,:,cnt) =double (dicomread(fullfile('D:\master\LUNGIX\LUNGIX\PET PETCT_WB_apc (Adult)\PET WB - 102\',dicomlist(cnt).name)));
for i=1:size(o,1)
roi(i)=double(I(a(i),b(i)));
res(:,:,cnt)=double (roi(i));
end
end
this gives the same pixel values for each slice
thanks in advance

回答 (1 件)

Muhammad Usman Saleem
Muhammad Usman Saleem 2016 年 4 月 16 日
編集済み: Muhammad Usman Saleem 2016 年 4 月 16 日
is your image in RGB or have multiple images?
Here is my function, which will pixel value at given x,y value. Tested over RGB image
  2 件のコメント
sbei arafet
sbei arafet 2016 年 4 月 16 日
Hi, thanks for the ansewer but my images are in grayscale under the same folder
Muhammad Usman Saleem
Muhammad Usman Saleem 2016 年 4 月 17 日
then use my function also work for gray scale image. Check it

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by