[Insight-users] LaplacianImageFiler

Luis Ibanez luis . ibanez at kitware . com
Tue, 28 Oct 2003 13:24:32 -0500


Hi Bing,

Thanks for pointing this out.

You are right, once the ::New() method is instantiated
it brings up a number of compilation errors.

The fundamental reason seems to be that the
LaplacianImageFilter is based on the use of
Neighborhood iterators. This family of iterator
do not support the use of ImageAdaptors and
PixelAccessors.  We are looking into the trade-off
issues involved in modifying these iterators for
making them suitable to accept ImageAdaptors.

In the meantime your best option seems to be to
use the   VectorIndexSelectionCastImageFilter

http://www . itk . org/Insight/Doxygen/html/classitk_1_1VectorIndexSelectionCastImageFilter . html

This filter will accept as input an image of vector
pixel type and generate an image of  scalar pixel type.

You could connect your Vector image as input to this
filter, and then take the output of the filter and
pass it as input to the LaplacianImageFilter.

Please let us know if you encounter any problem
while doing this.


Thanks


   Luis


----------------------
Bing Jian wrote:
> 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();
> 
> 
> 
>