[Insight-users] ImageToImageFilter for the watershed transformation

Edgar Andrasch edgar.andrasch at gmx.de
Thu Apr 10 03:47:57 EDT 2008


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


More information about the Insight-users mailing list