[Insight-users] itkEucledianDistance

kumar MaKumartr@netscape.net
Wed, 22 Jan 2003 18:57:49 -0100


Hello Everyone
I am wanting to compute the Eucledian Distance between two vectors and
I thought I could use the class EucledianDistance from the itk::Statistics
It is templated over TVector

So I tried to declare
 itk::Statistics::EuclideanDistance<vnl_vector<double> > Distance_Computer;

But that did not help me as the class TVector needs some functions to be 
implemented
by it  as seen in the following functions

itkStaticConstMacro(VectorLength, unsigned int, TVector::Length);
  typedef typename TVector::ValueType ValueType ;

So the class needs a variable called Length and also a variable called 
ValueType
Since these are not there in vnl_vector this class cannot be used in 
instantiating Eucledian class with vnl_vector

What could be done in  this case ( A new derived class could be created 
, but that leads to lot of rework for just that case)

And also what shoudl be the structure of TVector that is wanted b 
yEucledian class is not known easily

Any feedback on this is welcome

Thanks and Warm Regards
Kumar


-- 
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/