[Insight-users] ImageToImageFilter for the watershed transformation

Cameron Burnett w_e_b_m_a_s_t_e_r_6_9 at hotmail.com
Thu Apr 10 05:13:12 EDT 2008


Hi Edgar,

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.

Hope that helps a bit.

Cameron.




> Date: Thu, 10 Apr 2008 09:47:57 +0200
> From: edgar.andrasch at gmx.de
> To: insight-users at itk.org
> Subject: [Insight-users] ImageToImageFilter for the watershed transformation
> 
> Hello,
> 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?
> 
> typedef itk::Image <pixelType, 3> ItkImageType;
> 
> typedef itk::FixedArray< float, 1 > MeasurementVectorType;
> typedef itk::Image< MeasurementVectorType, 2 > ArrayImageType;
> typedef itk::ScalarToArrayCastImageFilter< FloatImage2DType, ArrayImageType > CasterType;
> 			
> typedef itk::ImageToImageFilter< ItkImageType, ArrayImageType > FilterType1;
> FilterType1::Pointer filter1 = FilterType1::New();<-error C2440: 'initializing' : cannot convert from 'itk::Object::Pointer' to 'itk::SmartPointer<TObjectType>'
> filter1->SetInput(itkImage);
> 				
> CasterType::Pointer caster = CasterType::New();
> caster->SetInput(filter1->GetOutput());
> diffusion->SetInput(caster->GetOutput());
> 
> Thanks for all responses
> -- 
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users

_________________________________________________________________
Are you paid what you're worth? Find out: SEEK Salary Centre
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080410/4c07c5e7/attachment.htm>


More information about the Insight-users mailing list