[Insight-users] Get Distance Map

Jordi Romagós Figueras neomad666 at hotmail.com
Thu Mar 15 06:10:41 EST 2007


Hello everybody,

I’m using the class EuclideanDistancePointMetric and I want to get 
DistanceMap Data, but I can’t assign this to any kind of Image. I look for 
this type at class euclidian class and it is this (I work in 2D images):

class TDistanceMap = ::itk::Image<unsigned 
short,::itk::GetPointSetDimension<TMovingPointSet>::PointDimension> >

Then I create the same kind of Image in my code, but compiler make this 
error:

error C2679: binary '=' : no operator found which takes a right-hand operand 
of type 'const itk::Image<TPixel,VImageDimension> *' (or there is no 
acceptable conversion)
        with
        [
            TPixel=unsigned short,
            VImageDimension=2
        ]
        c:\pfc\insighttoolkit-2.8.1\code\common\itkSmartPointer.h(113): 
could be 'itk::SmartPointer<TObjectType> 
&itk::SmartPointer<TObjectType>::operator =(const 
itk::SmartPointer<TObjectType> &)'
        with
        [
            TObjectType=itk::Image<unsigned short,2>
        ]
        c:\pfc\insighttoolkit-2.8.1\code\common\itkSmartPointer.h(117): or 
'itk::SmartPointer<TObjectType> &itk::SmartPointer<TObjectType>::operator 
=(itk::Image<TPixel,VImageDimension> *)'
        with
        [
            TObjectType=itk::Image<unsigned short,2>,
            TPixel=unsigned short,
            VImageDimension=2
        ]
        while trying to match the argument list 
'(itk::SmartPointer<TObjectType>, const itk::Image<TPixel,VImageDimension> 
*)'
        with
        [
            TObjectType=itk::Image<unsigned short,2>
        ]
        and
        [
            TPixel=unsigned short,
            VImageDimension=2
        ]

The code is this:

typedef itk::Image<unsigned short,2 > ExampleType;
		ExampleType::Pointer p;

		p = m_metrica->GetDistanceMap();

Someone has any idea the origin of this error?

Thank you!

_________________________________________________________________
Moda para esta temporada. Ponte al día de todas las tendencias. 
http://www.msn.es/Mujer/moda/default.asp



More information about the Insight-users mailing list