[Insight-users] Problem with itkDenseFiniteDifferenceImageFilter

Luis Ibanez luis.ibanez@kitware.com
Wed, 04 Sep 2002 11:57:20 -0400


Hi Samuel,

 From the error message that you posted, it seems that you are
trying to connect an image of type:

                        Image<float, 3>

to a filter that is expecting

                        Image<unsigned short, 3>


The itkDenseFiniteDifferenceImageFilter and its relatives are designed
to work with float/double images. Please make sure that you instantiate
it with one of these two types. ('float' is probably what you want in
this case).

Please let us know if you encounter further problems,

  Thanks

    Luis


=========================================================

Samuel Rodríguez Bescos wrote:

> Hello everybody,
> 
> I'm migrating my examples of watershed segmentation of 3D images, based 
> on the watershed filter of ITK, from the ITK beta release2 to the CVS 
> version and I have compilation errors related with the 
> itkDenseFiniteDifferenceImageFilter. These are the errors:
> 
> ----------------------------------------------------------------------
> 
> 
> C:\Archivos de 
> programa\InsightLastVersion\CVS\Insight\Code\Common\itkDenseFiniteDifferenceImageFilter.txx(211) 
> : error C2664: '()' : cannot convert parameter 1 from 'class 
> itk::SmartPointer<class itk::Image<float,3> >' to 'const class itk::Image<un
> signed short,3> *'
>         No user-defined-conversion operator available that can perform 
> this conversion, or the operator cannot be called
> 
>  
> 
> Could anybody tell me what is the problem and how can I solve it?
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> Samuel
>