Thread Subject: how to plot 2D histogram of medical image

Subject: how to plot 2D histogram of medical image

From: Magda Kie?basa

Date: 26 Oct, 2009 23:42:02

Message: 1 of 2

I have two a images T1 and T2 from magnetic resonans session in DICOM standard and I have to plot 2-dimensional histogram off this image.I tried to do it gor example like that:
[A B] = meshgrid(1:N,1:N);
figure;
plot3(A,B,image1,'. k','MarkerSize',3);
hold on;
plot3(A,B,image2,'. k','MarkerSize',3);

but it's 3D histogram

I tried also something like that:

figure;
load seamount;
wym=[N,M];
hold on;
hist3(wym);
n = hist3(wym);
n1=n;
n1(size(n,1)+1,size(n,2)+1)=0;
xb=linspace(min(wym(:,1)),max(wym(:,1)),size(n,1)+1);
yb=linspace(min(wym(:,2)),max(wym(:,2)),size(n,1)+1);
h=pcolor(xb,yb,n1);
set(h,'zdata',obraz1(size(n1))*max(max(n)))
colormap(hot)
grid on
view(3);

but it also 3D histogram and I don't know how to do it in 2D...

Subject: how to plot 2D histogram of medical image

From: NZTideMan

Date: 27 Oct, 2009 06:36:34

Message: 2 of 2

On Oct 27, 12:42 pm, "Magda Kie?basa" <magda13...@wp.pl> wrote:
> I have two a images T1 and T2 from magnetic resonans session in DICOM standard and I have to plot 2-dimensional histogram off this image.I tried to do it gor example like that:
> [A B] = meshgrid(1:N,1:N);
> figure;
> plot3(A,B,image1,'. k','MarkerSize',3);
> hold on;
> plot3(A,B,image2,'. k','MarkerSize',3);
>
> but it's 3D histogram
>
> I tried also something like that:
>
> figure;
> load seamount;
> wym=[N,M];
> hold on;
> hist3(wym);
> n = hist3(wym);
> n1=n;
> n1(size(n,1)+1,size(n,2)+1)=0;
> xb=linspace(min(wym(:,1)),max(wym(:,1)),size(n,1)+1);
> yb=linspace(min(wym(:,2)),max(wym(:,2)),size(n,1)+1);
> h=pcolor(xb,yb,n1);
> set(h,'zdata',obraz1(size(n1))*max(max(n)))
> colormap(hot)
> grid on
> view(3);
>
> but it also 3D histogram and I don't know how to do it in 2D...

Do a search on histxy in this Usenet group.
You will find a couple of algorithms there that date back to 2002.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com