<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">Hi Edgar,<br><br>I don't think you can actually use the ImageToImageFilter like that. I think its just a function that other filters use. For that reason, the New() function just returns and object pointer and not a smart pointer. If you want to convert your image types you should be able to use a casting filter of some sort. Maybe like the one you already have included? I'm not exactly sure because I've only been using ITK for about a month.<br><br>Hope that helps a bit.<br><br>Cameron.<br><br></div><br><div></div><br><br><hr id="stopSpelling">> Date: Thu, 10 Apr 2008 09:47:57 +0200<br>> From: edgar.andrasch@gmx.de<br>> To: insight-users@itk.org<br>> Subject: [Insight-users] ImageToImageFilter for the watershed transformation<br>> <br>> Hello,<br>> I want to achieve the watershed transformation on my image. The problem is my ImageToImageFilter function. How can I use this the right way to use later the watershed transformation?<br>> <br>> typedef itk::Image <pixelType, 3> ItkImageType;<br>> <br>> typedef itk::FixedArray< float, 1 > MeasurementVectorType;<br>> typedef itk::Image< MeasurementVectorType, 2 > ArrayImageType;<br>> typedef itk::ScalarToArrayCastImageFilter< FloatImage2DType, ArrayImageType > CasterType;<br>>                         <br>> typedef itk::ImageToImageFilter< ItkImageType, ArrayImageType > FilterType1;<br>> FilterType1::Pointer filter1 = FilterType1::New();<-error C2440: 'initializing' : cannot convert from 'itk::Object::Pointer' to 'itk::SmartPointer<TObjectType>'<br>> filter1->SetInput(itkImage);<br>>                                 <br>> CasterType::Pointer caster = CasterType::New();<br>> caster->SetInput(filter1->GetOutput());<br>> diffusion->SetInput(caster->GetOutput());<br>> <br>> Thanks for all responses<br>> -- <br>> Psssst! Schon vom neuen GMX MultiMessenger gehört?<br>> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger<br>> _______________________________________________<br>> Insight-users mailing list<br>> Insight-users@itk.org<br>> http://www.itk.org/mailman/listinfo/insight-users<br><br /><hr />Find out: SEEK Salary Centre <a href='http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2Fcareer%2Dresources%2Fsalary%2Dcentre%2F%3Ftracking%3Dsk%3Ahet%3Asc%3Anine%3A0%3Ahot%3Atext&_t=764565661&_r=OCT07_endtext_salary&_m=EXT' target='_new'>Are you paid what you're worth?</a></body>
</html>