[Insight-users] Re: LaplacianImageFiler

Bing Jian bjian at cise . ufl . edu
Mon, 27 Oct 2003 13:08:50 -0500 (EST)


  Now I have to insert a rescaler into the pipeline between
adaptor and laplacian. So I have sth. like:

        typedef itk::RescaleIntensityImageFilter< ImageAdaptorType,
RealImageType> RescalerType;
        RescalerType::Pointer rescaler = RescalerType::New();
        typedef itk::LaplacianImageFilter<
                RealImageType,
                RealImageType >    LaplacianFilter;

Then
        rescaler->SetInput( adaptor );
        //rescaler->SetOutputMinimum(  0  );
        //rescaler->SetOutputMaximum( 255 );
        lapFilter->SetInput(rescaler->GetOutput() );

   One question comes up with the rescaler, seems I have to
set the max and min for the rescaler, otherwise, the program
will terminate at this stage. Is there anyway to setup the
rescaler to keep the orginal scale?

   Thanks!


-- 
Best wishes,
Bing Jian
bjian at cise . ufl . edu


On Mon, 27 Oct 2003, Bing Jian wrote:

>
> Hi, Everyone,
>
>    Does anybody attemp to let LaplacianFilter accept an adaptor which
> extracts one component from vector image as input and produce scalar
> image as output? I have following code to do such thing, but got
> errors.
>
>    typedef itk::ImageAdaptor <VectorImageType,
> 		VectorPixelAccessor > ImageAdaptorType;
>    ImageAdaptorType::Pointer adaptor = ImageAdaptorType::New();
>
>  where VectorImageType is defined as Image<vector<double,2>,2>
>        And in VectorPixelAccessor
> 	typedef itk::Vector<double,2>   InternalType;
> 	typedef       double      ExternalType;
>
>  Then I try to apply LaplacianFilter on the output of adaptor.
>
>    typedef itk::Image<double,2> RealImageType;
>
>    typedef itk::LaplacianImageFilter<
> 		ImageAdaptorType,
> 		RealImageType >    LaplacianFilter;
>    LaplacianFilter::Pointer lapFilter = LaplacianFilter::New();
>
>  The error I got is:
>
> D:\Library\repository\itk\Insight\Code\Common\itkZeroFluxNeumannBoundaryCondition.txx(36)
> : error C2440: 'return' : cannot convert from 'class itk::Vector<double,2>' to 'double'
>         No user-defined-conversion operator available that can perform
> this conversion, or the operator cannot be called
>
>    Does laplacianFilter require the input and output to be same type?
>
>    Thanks in advance!
>
>
>