You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
courbe de progression du pixel
2 views (last 30 days)
Show older comments
Bonjour à tous j'ai en entrée 25 images IRM(dicom).
je metsen un point fixe (x,y) et je garde l'emplacement de ce pixel pour les autres images.
je veux tracer la courbe de progression de ce pixel. comment programmer ça?
Hello everyone, I have 25 MRI images (dicom) as input. I put a fixed point (x, y) and I keep the location of this pixel for the other images. I want to plot the progression curve of this pixel. how to program that?
20 Comments
Amal Felhi
on 8 Apr 2021
acutually my image is not 3D so i think that's why it didn't work for me and yes i'm using R2014b if u have another proposition i'll be glad and thanks
Image Analyst
on 8 Apr 2021
Might get more answers if it were translated into English. Some of us don't know what is being asked unless we take the trouble to go to Google Translate.
Amal Felhi
on 8 Apr 2021
how I will store the 25 images in a 3D array?
Amal Felhi
on 8 Apr 2021
i load the 25 images with this codes:
rep = uigetdir;
Imgs = dir(rep);
thisname = Imgs(3).name;
[path,name,ext]=fileparts(thisname);
ext=strcat('*',ext);
chemin = fullfile(rep,ext);
list = dir(chemin);
nbr_images= numel(list);
for n=1:numel(list)
k=dicomread(fullfile(rep, list(n).name));
end;
IM=double(img);
figure(1),subplot(5,5,1),imshow(IM,[]);
figure(1),subplot(5,5,2),imshow(IM,[]);
figure(1),subplot(5,5,3),imshow(IM,[]);
figure(1),subplot(5,5,4),imshow(IM,[]);
figure(1),subplot(5,5,5),imshow(IM,[]);
figure(1),subplot(5,5,6),imshow(IM,[]);
figure(1),subplot(5,5,7),imshow(IM,[]);
figure(1),subplot(5,5,8),imshow(IM,[]);
figure(1),subplot(5,5,9),imshow(IM,[]);
figure(1),subplot(5,5,10),imshow(IM,[]);
figure(1),subplot(5,5,11),imshow(IM,[]);
figure(1),subplot(5,5,12),imshow(IM,[]);
figure(1),subplot(5,5,13),imshow(IM,[]);
figure(1),subplot(5,5,14),imshow(IM,[]);
figure(1),subplot(5,5,15),imshow(IM,[]);
figure(1),subplot(5,5,16),imshow(IM,[]);
figure(1),subplot(5,5,17),imshow(IM,[]);
figure(1),subplot(5,5,18),imshow(IM,[]);
figure(1),subplot(5,5,19),imshow(IM,[]);
figure(1),subplot(5,5,20),imshow(IM,[]);
figure(1),subplot(5,5,21),imshow(IM,[]);
figure(1),subplot(5,5,22),imshow(IM,[]);
figure(1),subplot(5,5,23),imshow(IM,[]);
figure(1),subplot(5,5,24),imshow(IM,[]);
figure(1),subplot(5,5,25),imshow(IM,[]);
on this zip files you will find the 25 images
Rik
on 8 Apr 2021
Edited: Rik
on 8 Apr 2021
Please delete the zip file, as it seems to contain actual patient information.
I expect you can use this in your loop to load your images to a 3D array:
IM=dicomread(fullfile(rep, list(1).name));
IM(1,1,numel(list))=0;%extend array to fit all slices
for n=2:numel(list)
IM(:,:,n)=dicomread(fullfile(rep, list(n).name));
end
And your other block of code can be replaced by something this:
figure(1),clf(1)
WW_WL=[min(IM(:)) max(IM(:))];
for n=1:25
subplot(5,5,n)
imshow(IM(:,:,n),WW_WL)
end
Or simply:
montage(permute(IM,[1 2 4 3]),'DisplayRange',[0 1000])
Amal Felhi
on 8 Apr 2021
okay thank you so much.
after the code of the 3D array , i put this code for progression of the pixel?
S=load('mri');
I=squeeze(S.D);
x=randi(size(I,1));y=randi(size(I,2));
intensity=squeeze(I(x,y,:));
plot(intensity)
Amal Felhi
on 9 Apr 2021
there is an error it does not work
Amal Felhi
on 9 Apr 2021
ok thanks it works.
Amal Felhi
on 9 Apr 2021
Alright!
otherwise yes I have another problem I want to create a GUI interface which contains a push button, an axis and a popupmenu. from the push button I select 25 images and these 25 images will be saved in a popup menu. for example if I click on the 1st item of the popupmenu I display the 1st image
Amal Felhi
on 9 Apr 2021
yes but my problem is not solved.
my problem in saving 25 images the popupmenu
Amal Felhi
on 9 Apr 2021
my problem the update of the 25 images on the popmenu.
can you send to me the code of the update?
Accepted Answer
Rik
on 7 Apr 2021
%load an example image
S=load('mri');
I=squeeze(S.D);
x=randi(size(I,1));y=randi(size(I,2));
intensity=squeeze(I(x,y,:));
plot(intensity)
4 Comments
Amal Felhi
on 7 Apr 2021
merci pour votre réponse mais je veux choisi un pixel à partir d'une image IRM (dicom) je garde l'intensité de ce pixel pour les 25 images pour tracer la courbe de progression de ce pixel
Amal Felhi
on 7 Apr 2021
votre code me donne ce resultat:
Rik
on 7 Apr 2021
You should put in your own image and coordinates. It can happen that an x-y-combination is 0 for all z values. This will happen around the edge. Unfortunately, this example image is about half edge, so if you want to use random coordinates, you will get this line about half the time.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)