[Insight-users] Array of vnl_matrix's

Arvind Rao arvind.sbia at gmail.com
Sat Mar 31 14:58:30 EDT 2012


Hi All,

I'm having trouble instantiating vnl_matrices which are elements of an
array. When I use the code below, I get a segmentation fault after
one iteration. I don't understand why the standard ways to construct
vnl_matrix's don't work.

------
   typedef vnl_matrix< float >    MatrixType;
   MatrixType hessianMat[size];
   VectorType a, b, c;

   //then I've tried things like

   for(int j=0; j < size; j++)
    {
        ComponentType temp[4] = { a.get(j), b.get(j), b.get(j), c.get(j)};
        hessianMat[j].copy_in(temp );
   }
------

Any ideas? Let me know what you think:)

-- 
*Arvind S. Rao, PhD*
Section of Biomedical Image Analysis
Department of Radiology
University of Pennsylvania
3600 Market Street, Suite 380
Philadelphia, PA 19104
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120331/ff2e1856/attachment.htm>


More information about the Insight-users mailing list