[Insight-users] Compilation error with NarrowBandLevelSetImageFilter

Luis Ibanez luis.ibanez at kitware.com
Fri Jan 20 10:46:40 EST 2006



Hi Susana,


The class

       itk::NarrowBandLevelSetImageFilter


is an abstract class.


It is not intended to be instantiated with a New() operator.


You can have a Pointer to this class, but you need to assign to it
the instantiation of one of its derived classes.


     - itkNarrowBandThresholdSegmentationLevelSetImageFilter
     - itkNarrowBandCurvesLevelSetImageFilter


http://www.itk.org/Insight/Doxygen/html/classitk_1_1NarrowBandThresholdSegmentationLevelSetImageFilter.html
http://www.itk.org/Insight/Doxygen/html/classitk_1_1NarrowBandCurvesLevelSetImageFilter.html


   Regards,


     Luis



-----------------------
sumercav at ono.com wrote:
> 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,
>                              InternalImageType,
>                              InternalPixelType,
>                              InternalImageType> NarrowBandFilterType;
> 
>     NarrowBandFilterType::Pointer narrowband = NarrowBandFilterType::New();
> 
>     narrowband->SetFeatureImage( ImagenFiltrada );
>        ...etc...
> 
> 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
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 



More information about the Insight-users mailing list