[Insight-users] LaplacianImageFiler
Bing Jian
bjian at cise . ufl . edu
Mon, 27 Oct 2003 17:14:40 -0500 (EST)
Hi Luis,
In your example, you only define a type for LaplacianImageFilter.
typedef itk::LaplacianImageFilter< OffsetImageAdaptorType,
LaplacianImageType > LaplacianFilterType;
It will not compile if you simply new an instance of it by adding
LaplacianFilterType::Pointer lapfilter = LaplacianFilterType::New();
--
Best wishes,
Bing Jian
bjian at cise . ufl . edu
On Mon, 27 Oct 2003, Luis Ibanez wrote:
>
> Hi Bing,
>
> The Laplacian filter does support the use of ImageAdaptors.
>
> Please look at the attached file that presents an example
> of adapting an Image of Offset to a Laplacian filter.
>
> ----
>
> Some of your typedef statements may be inconsistent.
>
> Could you please post the relevant sections from the
> original code. The code snippets in your previous email
> may not be enough for finding the source of the problem.
>
> Thanks
>
>
> Luis
>
>
> --------------------------
>
> 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!
> >
> >
>
>
>