[Insight-developers] GetNorm()

Karthik Krishnan karthik.krishnan at kitware.com
Mon Jan 21 12:48:18 EST 2008


Fixed in CVS.

/cvsroot/Insight/Insight/Code/Common/itkVariableLengthVector.h,v  <--
itkVariableLengthVector.h
new revision: 1.13; previous revision: 1.12
/cvsroot/Insight/Insight/Code/Common/itkVariableLengthVector.txx,v  <--
itkVariableLengthVector.txx
new revision: 1.6; previous revision: 1.5

Apologies for the long overdue reply.

--
karthik

On 1/21/08, Marius Staring <marius at isi.uu.nl> wrote:
>
> Hi,
>
> could one of the developers reply to this mail?
>
> Regards,
>
> Marius
>
> Marius Staring wrote:
> > Hi developers,
> >
> > I think the itk::VariableLengthVector is missing a function GetNorm(),
> > similar to itk::Vector
> >
> > This can be fixed by adding
> >
> >  /** Returns vector's Euclidean Norm  */
> >  RealValueType GetNorm() const;
> >
> > to the header file, and
> >
> > /**
> > * Returns vector's Euclidean Norm
> > */
> > template < typename TValueType >
> > typename VariableLengthVector< TValueType >::RealValueType
> > VariableLengthVector<TValueType >
> > ::GetNorm( void ) const
> > {
> >  return RealValueType( vcl_sqrt(double(this->GetSquaredNorm()) ));
> > }
> >
> > to the txx. I tested this code under windows xp and visual c++ 2003.
> >
> > The function GetNorm() is for example used in the
> > GradientToMagnitudeImageFilter, so currently this filter won't work
> > with images of VariableLengthVector pixel type.
> >
> > Regards,
> >
> > Marius
> >
>
> --
> Marius Staring
> Image Sciences Institute
> University Medical Centre Utrecht
> Heidelberglaan 100, 3584 CX Utrecht, The Netherlands
> phone: +31 (0)88 75 53186, fax: +31 (0)30 251 3399
> marius at isi.uu.nl, http://www.isi.uu.nl/People/Marius
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20080121/eb544050/attachment.htm


More information about the Insight-developers mailing list