comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Clsuter analysis wiht IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Clsuter analysis wiht IDL [message #23936 is a reply to message #23851] Wed, 28 February 2001 09:09 Go to previous messageGo to previous message
Benno Puetz is currently offline  Benno Puetz
Messages: 16
Registered: March 2000
Junior Member
Dorthe Wildenschild wrote:

> I am trying to use the cluster analysis utility in IDL, and I can't work it
> out. Perhaps due to my lack of knowledge in the statistical field.....
>
> I have a 2D-image (658x658) with a single band of info (CT x-ray
> intentities) that I want to classify (into three classes) using cluster
> analysis. I assume I have to use the CLUST_WTS function first and then the
> CLUSTER function, but I can't work it out.
> The on-line help isn't very helpful on this topic....
>
> If I use
> weights = clust_wts(image, n_clusters=3), with image= intarr(658x658) I get
> alot of floating errors.
> Do I need to reform the image to (658x658,1) before using the clust_wts
> function? Doesn't seem to work either, though.

What you want is probably REFORM the image to (1,658x658), one variable
(intensity) and 432964 observations (pixels)

Using three clusters you will (likely) end up with one for background and two
for low and high intensities in the CT image, respectively, ...

> Also how do I get the
> cluster numbers back as an overlay of my image? so that I can actually see
> the result of the classification.

use something like

ref_img=REFORM(image,1,658*658)
weights = clust_wts(ref_img, n_clusters=3)
cls=cluster(ref_img,weights,n_cluster=3)
tvscl,reform(cls,658,658)

and you should have the clusters in different grays (or colors, depending on
your settings)

>
>
> Has anybody worked on cluster analysis using IDL?
>

Your question showed me that such a command exists in IDL ...

--
Benno Puetz
Kernspintomographie
Max-Planck-Institut f. Psychiatrie Tel.: +49-89-30622-413
Kraepelinstr. 10 Fax : +49-89-30622-520
80804 Muenchen, Germany
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Communication between different widget bases
Next Topic: Re: JULDAY 5.4 not same as 5.3?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 23:52:20 PDT 2025

Total time taken to generate the page: 0.88183 seconds