<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<PixelType, Dimension > ImageType;<BR> typedef itk::ImageFileReader< ImageType > ReaderType;<BR><BR> ReaderType::Pointer reader = ReaderType::New();<BR> reader->SetFileName( inputImageFileName );<BR><BR>typedef itk::SliceBySliceImageFilter< ImageType, ImageType> FilterType;<BR>FilterType::Pointer filter = FilterType::New();<BR>filter->SetInput(reader->GetOutput());<BR><BR>typedef itk::ScalarImageKmeansImageFilter<FilterType::InternalInputImageType> KMeansFilterType;<BR>KMeansFilterType::Pointer kmeansFilter = KMeansFilterType::New();<BR><BR>filter->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>..\skin\skin.cxx(47) : error C2664: 'itk::SliceBySliceImageFilter<TInputImage,TOutputImage>::SetFilter' : cannot convert parameter 1 from 'itk::SmartPointer<TObjectType>' to 'itk::ImageToImageFilter<TInputImage,TOutputImage> *'<BR>2> with<BR>2> [<BR>2> TInputImage=ImageType,<BR>2> TOutputImage=ImageType<BR>2> ]<BR>2> and<BR>2> [<BR>2> TObjectType=itk::ScalarImageKmeansImageFilter<itk::Image<float,2>><BR>2> ]<BR>2> and<BR>2> [<BR>2> TInputImage=itk::Image<float,2>,<BR>2> TOutputImage=itk::Image<float,2><BR>2> ]<BR>2> 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>