<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello Itk users,<BR>i try to run the SliceBySliceImageFilter but i don't understand how it work. I have look at the pdf publication in the midas journal with examples and in the forum without success. <BR>I have a compile problem , when i try to compile it with the ScalaImageKmeansImageFilter ( i want to run slice by slice because i have a ram problem otherwise). <BR>I will show you a part of the code where is implemented it and the error reported in vs2008.<BR><BR><BR>...<BR>const char * inputImageFileName = argv[1];<BR><BR>  typedef float       PixelType;<BR>  const unsigned int         Dimension = 3;<BR><BR>  typedef itk::Image&lt;PixelType, Dimension &gt; ImageType;<BR>  typedef itk::ImageFileReader&lt; ImageType &gt; ReaderType;<BR><BR>  ReaderType::Pointer reader = ReaderType::New();<BR>  reader-&gt;SetFileName( inputImageFileName );<BR><BR>typedef itk::SliceBySliceImageFilter&lt; ImageType, ImageType&gt; FilterType;<BR>FilterType::Pointer filter = FilterType::New();<BR>filter-&gt;SetInput(reader-&gt;GetOutput());<BR><BR>typedef itk::ScalarImageKmeansImageFilter&lt;FilterType::InternalInputImageType&gt; KMeansFilterType;<BR>KMeansFilterType::Pointer kmeansFilter = KMeansFilterType::New();<BR><BR>filter-&gt;SetFilter(kmeansFilter);<BR>  <BR>  const unsigned int numberOfInitialClasses = atoi( argv[4] );<BR><BR><BR>...<BR><BR><BR>The error is :<BR><BR><BR>skin.cxx<BR>2&gt;..\skin\skin.cxx(47) : error C2664: 'itk::SliceBySliceImageFilter&lt;TInputImage,TOutputImage&gt;::SetFilter' : cannot convert parameter 1 from 'itk::SmartPointer&lt;TObjectType&gt;' to 'itk::ImageToImageFilter&lt;TInputImage,TOutputImage&gt; *'<BR>2&gt;        with<BR>2&gt;        [<BR>2&gt;            TInputImage=ImageType,<BR>2&gt;            TOutputImage=ImageType<BR>2&gt;        ]<BR>2&gt;        and<BR>2&gt;        [<BR>2&gt;            TObjectType=itk::ScalarImageKmeansImageFilter&lt;itk::Image&lt;float,2&gt;&gt;<BR>2&gt;        ]<BR>2&gt;        and<BR>2&gt;        [<BR>2&gt;            TInputImage=itk::Image&lt;float,2&gt;,<BR>2&gt;            TOutputImage=itk::Image&lt;float,2&gt;<BR>2&gt;        ]<BR>2&gt;        No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called<BR><BR><BR><BR>Does anyone can solve this problem?? <BR>Thank you, best<BR>Samuele<BR>                                               <br /><hr />Windows Live: tieni aggiornati i tuoi amici <a href='http://www.microsoft.com/italy/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:it-it:SI_SB_1:092009' target='_new'>sulle tue attivitą in linea.</a></body>
</html>