[Insight-users] Compilation error with NarrowBandLevelSetImageFilter

sumercav at ono.com sumercav at ono.com
Fri Jan 20 07:16:14 EST 2006

Dear ITK users,

I have been using ITK a couple of months for segmenting images using level
sets, and I have trouble creating an itk::NarrowBandLevelSetImageFilter.
The conflicting source code is:

    typedef itk::NarrowBandLevelSetImageFilter<
                             InternalImageType> NarrowBandFilterType;

    NarrowBandFilterType::Pointer narrowband = NarrowBandFilterType::New();

    narrowband->SetFeatureImage( ImagenFiltrada );

And I get the error:

Building dependencies cmake.check_depends...
Building object file itkServidorSegmentacion.o...
/home/export/pfc/smercav/TODOJUNTO/itkServidorSegmentacion.cxx: In member
function `void ServidorSegmentacion::SegmentarImagen()':
/home/export/pfc/smercav/TODOJUNTO/itkServidorSegmentacion.cxx:247: error:
conversion from `itk::SmartPointer<itk::Object>' to non-scalar type`itk::SmartPointer<itk::NarrowBandLevelSetImageFilter<itk::Image<float,
2u>, itk::Image<float, 2u>, float, itk::Image<float, 2u> > >' requested
make[1]: *** [itkServidorSegmentacion.o] Error 1
make: *** [default_target] Error 2

I'm using ITK 2.0.1 and cmake 2.0 with linux Red Hat x86-64. I tried to see
if it was because it's an older version of ITK, but I didn't find anything.
Could you point out what I'm doing wrong?

Thanks in advance,

Susana Merino

More information about the Insight-users mailing list