[Insight-users] Error MRIBiasFieldCorrectionFilter.

Jisung Kim bahrahm@yahoo.com
Mon, 28 Oct 2002 07:29:24 -0800 (PST)


I was wrong. 

FYI, suresh. the CorrectionFilter is derived from the
ImageToImageFilter and the SetInput method is
inherited from the ImageToImageFilter and the
CorrectionFilter doesn't provide any overriding
method. Since ITK has many filters derived from the
ImageToImageFilter and work fine, our converter's
ImagePointer type definition might be wrong.

If you still have the problem, please send me your
whole code so that I can reproduce the problem. 

Thanks,

Jisung.

--- Bill Hoffman <bill.hoffman@kitware.com> wrote:
> 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
> 
> 
> 


=====
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/