[Insight-users] Error MRIBiasFieldCorrectionFilter.

Jisung Kim bahrahm@yahoo.com
Mon, 28 Oct 2002 06:44:59 -0800 (PST)


Hi suresh,

Did you try to change the SetInput(imageMRI) to
SetInput(imageMRI.GetPointer())?

The error message says you are trying to assign a
smart pointer to a normal pointer. If the imageMRI is
a smart pointer, you can get the normal pointer from
the imageMRI by calling GetPointer method.

Thanks,

Jisung.
--- suresh  <suresh_kb@rediffmail.com> wrote:
> 
> 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
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
>
http://public.kitware.com/mailman/listinfo/insight-users


=====
Jisung Kim
bahrahm@yahoo.com
106 Mason Farm Rd.
129 Radiology Research Lab., CB# 7515
Univ. of North Carolina at Chapel Hill
Chapel Hill, NC 27599-7515

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/