[Insight-users] Add Zero member to NumericTraits<SymmetricSecondRankTensor>

Bryn Lloyd blloyd at bwh.harvard.edu
Fri Jun 10 06:25:21 EDT 2005


Hi Luis,


I am writing a points of interest (corner) detection filter, which will 
calculate structure tensors at each pixel location to find good 
landmarks for methods like blockmatching etc.
I wrote this filter using  Vector-Images (itk::Vector class), but would 
like to change it, so it uses the itk::SymmetricSecondRankTensor class.

One advantage of this, is that I could later also reuse the 
itkHessianRecursiveGaussianImageFilter, which has an itk::Image< 
SymmetricSecondRankTensor...> as output, to find blob like features.

My Problem is the following:

I use the MeanImageFilter (on my SymmetricSecondRankTensor Image), which 
in turn uses the NumericTraits::Zero member to calculate the mean.
The Zero member doesn't exist though.
Would it be possible to add the Zero member to the 
itkNumericTraits<SymmetricSecondRankTensor> class?

I guess a NumericTensorTraits.cxx would need to be added, with a couple 
of lines like:

const SymmetricSecondRankTensor<double , 2>  NumericTraits<SymmetricSecondRankTensor<double, 2> >::Zero = SymmetricSecondRankTensor<double , 2>( NumericTraits<double >::Zero );



That would be really nice!

Thanks

Bryn




More information about the Insight-users mailing list