# how i can get the profile of pixel value in dicom

54 views (last 30 days)
Maram Othman on 8 Oct 2021
Commented: Maram Othman on 25 Nov 2021 at 16:13
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?

Image Analyst on 8 Oct 2021
Do you mean dicom? As in from a .DCM image file? Did you try using improfile()?
Maram Othman on 25 Nov 2021 at 16:13
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)

yanqi liu on 11 Oct 2021
Edited: yanqi liu on 18 Oct 2021
clc; clear all; close all;
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);
Maram Othman on 11 Oct 2021
sorry this couldn't work else

R2020b

### Community Treasure Hunt

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

Start Hunting!

Translated by