<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RE: [Insight-users] Applying labels from KmeansModelEstimator toinput image pixels</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>I would suggest that you look at itkScalarImageKmeansImageFilter.txx. This is essentially performing this classification using scalar images. A ListSampleAdaptor is used to classify the image. The algorithm then iterates over the Samples setting the image. Since this is a Adaptor class, it is assumed that the ordering of the samples is the same as the image.<BR>
<BR>
Vince<BR>
<BR>
<BR>
----------------------<BR>
Associate Professor<BR>
Department of Radiology<BR>
0453-D JCP<BR>
200 Hawkins Drive<BR>
Iowa City, IA 52242<BR>
E-mail: vincent-magnotta@uiowa.edu<BR>
Phone: 319-356-8255 Fax: 319-353-6275<BR>
Website: <A HREF="http://www.radiology.uiowa.edu">http://www.radiology.uiowa.edu</A><BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: insight-users-bounces@itk.org on behalf of Dawood Masslawi<BR>
Sent: Thu 11/11/2010 7:33 PM<BR>
To: insight-users@itk.org<BR>
Subject: Re: [Insight-users] Applying labels from KmeansModelEstimator toinput image pixels<BR>
<BR>
Dear David,<BR>
I think using the ImageToListSampleAdaptor seems reasonable since you can easily <BR>
access the coordination of the pixels using an IteratorWithIndex after the labeling process<BR>
is done, this way you can input the ListSampleAdaptor all at once instead of iterating over <BR>
the image. <BR>
Another approach could be using the itkScalarImageKmeansImageFilter and then <BR>
using a IteratorWithIndex to access the coordination of the pixels but I'm not sure <BR>
how would a decision rule fit in that scenario.<BR>
Regards,<BR>
Dawood Masslawi<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>