[Insight-users] Error MRIBiasFieldCorrectionFilter.

Bill Hoffman bill.hoffman@kitware.com
Mon, 28 Oct 2002 10:01:00 -0500


I don't think this is a smart normal pointer problem.
The problem is an image of float vs. an image of uchar:
itk::SmartPointer<class itk::Image<float,3> >' to
'class itk::Image<unsigned char,3> *'


-Bill

At 06:44 AM 10/28/2002 -0800, Jisung Kim wrote:
>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/
>_______________________________________________
>Insight-users mailing list
>Insight-users@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-users