[Insight-users] Error MRIBiasFieldCorrectionFilter.

suresh suresh " <suresh_kb@rediffmail.com
26 Oct 2002 12:21:08 -0000


Hi Luis,

I'm facing a compilation problem with 
MRIBiasFieldCorrectionFilter.
this template accpets ImageTYpe as tempalte  parameters. But when 
compile code like this the compiler throws a erroras following

F:\itk\include\Algorithms\itkMRIBiasFieldCorrectionFilter.txx(233) 
: error C2664: 'SetImage' : cannot convert parameter 1 from 'class 
itk::SmartPointer<class itk::Image<float,3> >' to 'class 
itk::Image<unsigned char,3> *'



typedef itk::Image<unsigned char, 3> ConverterType;
typedef itk::MRIBiasFieldCorrectionFilter <ImageType, ImageType, 
ImageType>    Corrector;
filter->SetInput(imageMRI);
filter->IsBiasFieldMultiplicative(true) ;
filter->SetTissueClassStatistics(classMeans,classSigma) ;
filter->SetUsingInterSliceIntensityCorrection(true);
filter->SetSlicingDirection(2) ;
ProgressUpdate(35, "Apply filter ", MRIVolumeName);
filter->Update();

please help me in fixing this error.

regards,
suresh