[Insight-users] Re: matrix and vector

Bing Jian bjian at cise . ufl . edu
Tue, 14 Oct 2003 09:26:05 -0400 (EDT)


Thanks Luis.

On Mon, 13 Oct 2003, Luis Ibanez wrote:

> Hi Bing,
>
> (0) The operator [] in the itk::Matrix return a row of the matrix.
>      http://www . itk . org/Insight/Doxygen/html/classitk_1_1Matrix . html#a9
>      the vnl_matrix has similar access methods (with the operator[]).
>      Please look at
>      http://www . robots . ox . ac . uk/~awf/vxl/book/book_5 . html

According to itkMatrix.h
inline T * operator[]( unsigned int i )
     { return m_Matrix[i]; }

the operator does return a row of the matrix, but not a object  of
or pointer to a vector.  So I cannot apply methods of vector class
directly.


>
> (1) You can interpolate an image of Vector using the
>      VectorLinearInterpolateImageFunction class:
> http://www . itk . org/Insight/Doxygen/html/classitk_1_1VectorLinearInterpolateImageFunction . html
>
>
> (2) Yes,
>      You just need to write the appropriate PixelAccessor.
>
>
>
>
> Regards,
>
>
>     Luis
>
>
> ---------------
> Bing Jian wrote:
> > Hello,
> >
> >   Can anybody help me following questions?
> >
> > (0) Is there an easy way to read/write one column or row vector
> > of a matrix?
> > (1) Does interpolater accept vector or matrix image as input?
> > (2) Can we extract vector image from matrix image
> > in the same way as VectorPixelAccessor?
> >
> >   Thanks in  advance!
> >
> >
> > On Thu, 9 Oct 2003, Bing Jian wrote:
> >
> >
> >>Hello,
> >>
> >>   Is there an easy way to assign a vector to ith row or col of
> >>matrix?
> >>   e.g.
> >>        itk::Matrix<T, m, n> A;
> >>        itk::Vector<T, n> x;
> >>        A[i] = x;
> >>
> >>  I looked through the reference page of itk::Matrix, only found
> >>
> >>T *  operator[] (unsigned int i)
> >>const T *  operator[] (unsigned int i) const
> >>
> >>  So do we need to use GetVnlMatrix()?
> >>
> >>
> >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk . org
> > http://www . itk . org/mailman/listinfo/insight-users
> >
>
>
>
>
>