how i can get the profile of pixel value in dicom

6 views (last 30 days)
hello,
I am trying to plot the pixel value in profile of dicome image, i try the solution mentioned in previuse questions but it not working?
maybe for dicome there is certain code labeling?

Accepted Answer

Image Analyst
Image Analyst on 8 Oct 2021
Do you mean dicom? As in from a .DCM image file? Did you try using improfile()?
  35 Comments
Walter Roberson
Walter Roberson on 25 Nov 2021
someValue should be a value that is the border between "background" and signal. At the moment, how do you judge what part of the image is part of the center that you want to measure, as compared to being part of the background that you do not want to measure?
Maram Othman
Maram Othman on 25 Nov 2021
I am considering a region of 400x400 pixel to be included inside the central part that I want to investigate,
for the value in this region I tried to do the mean2 function, but I also tried to do the following,
% for 3 image set I want to study the central od 400x400 pixel, then after the NewValue is rescaled I do:
x1=NewValue_1(400:700,400:700)
x2=NewValue_2(400:700,400:700)
x3=NewValue_3(400:700,400:700)
and for X2 image signal will contribute X3 signal, to find the relative difference of signal contribution,
signal=x2./x3
plot(signal)

Sign in to comment.

More Answers (1)

yanqi liu
yanqi liu on 11 Oct 2021
Edited: yanqi liu on 18 Oct 2021
clc; clear all; close all;
[X, map] = dicomread('US-PAL-8-10x-echo.dcm');
n = size(X, 4);
D=[];
for i=1:n
I = ind2rgb(X(:,:,:,i), map);
I = rgb2gray(I);
I = double(I);
D(:,:,i)=I;
end
figure; imshow(D(:,:,1));
[cx,cy,c] = improfile(D(:,:,1), [270 380], [130 330]);
hold on; plot(cx, cy, 'r-', 'LineWidth', 2)
figure; plot(c);

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!