[Insight-users] Re: matrix and vector
Luis Ibanez
luis . ibanez at kitware . com
Mon, 13 Oct 2003 22:26:23 -0400
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
(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
>