[Insight-users] Size of Jacobian?

Luis Ibanez luis.ibanez at kitware.com
Wed Sep 9 10:15:04 EDT 2009


Hi Motes,


        "Glimpsing at the source leaves no doubt"


If you look at itkTransform.h,

the type of the Jacobian matrix is an itkArray2D<double>

The itkArray2D<T> derives from the vnl_matrix<T>

When you call "size()" you are calling the "size()" method
of the vnl_matrix:


which is defined in:

Insight/Utilities/vxl/core/vnl/vnl_matrix.h  in line 157 as:

   unsigned size()    const { return rows()*cols(); }


So, yes,
The value returned by "size()" is the total number of
elements in the matrix.


    Regards,


           Luis


------------------------------------------------------------------------------------------
On Sun, Sep 6, 2009 at 6:24 AM, motes motes <mort.motes at gmail.com> wrote:

> I am using the BSplineDeformableTransform in a 2D registation application.
>
> I am using a cubic BSpline, order=3 and have choosen to cover the
> image with 5*5 nodes. The total nodes are 8*8 = 64 (3 boundary nodes
> in each dimension). Since I am working in 2D I get 64*2=128
> coefficients. And since I am using a third order BSpline I get
> (3+1)*(3+1) = 16 weights for each pixel.
>
> When I print the m_Jacobian:
>
>  std::cout << "m_Jacobian size = " << m_Jacobian.size() << std::endl;
>
> from the GetJacobian() function I get the size:
>
> 256.
>
> I thought that the jacobian was a matrix with number of rows equal to
> the dimension (2) and number of columns equal to the number of
> parameters (128). But maybe  the two rows are just concatenated into a
> flat array:
>
> [x0,x1,x2,...,xN, y0,y1,...,yN]
>
> like the parameters array?
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090909/6c2ea0ed/attachment.htm>


More information about the Insight-users mailing list