[Insight-developers] GetNorm()
Marius Staring
marius at isi.uu.nl
Tue Jan 22 06:00:07 EST 2008
Hi Karthik,
thanks for the fix.
Marius
Karthik Krishnan wrote:
> 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
> <mailto: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 <mailto:marius at isi.uu.nl>,
> http://www.isi.uu.nl/People/Marius
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org <mailto:Insight-developers at itk.org>
> http://www.itk.org/mailman/listinfo/insight-developers
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20080122/91f100dd/attachment.html
More information about the Insight-developers
mailing list