[Insight-users] Re: vnl_matrix of itk:Vectors

Reinhard Hameeteman reinhard.afstuderen at gmail.com
Wed May 24 05:50:49 EDT 2006


Apperantly you also have to include some txx files:

#include "vnl/vnl_matrix.txx"
#include "vnl/vnl_c_vector.txx"

Reinhard

2006/5/23, Reinhard Hameeteman <reinhard.afstuderen at gmail.com>:
> Hi,
>
> How can you construct a vnl_matrix with itk:Vector elements?
> I tried it in the following way:
>
> #include "vnl/vnl_matrix.h"
> #include "itkVector.h"
>
> int main(int argc, char* argv[]) {
>
>  typedef itk::Vector<float,3> VectorPixelType;
>
>  typedef vnl_matrix< VectorPixelType> VectorMatrixType;
>
>  VectorMatrixType m_matrix;
>
> }
>
> But this results in linker errors:
> simpleITKapp.obj : error LNK2001: unresolved external symbol "public:
> static void __cdecl vnl_c_vector<class itk::Vector<float,3>
> >::deallocate(class itk::Vector<float,3> * *,int)"
> (?deallocate@?$vnl_c_vector at V?$Vector at M$02 at itk@@@@SAXPAPAV?$Vector at M
>
> Which I do not really understand because as I see it the vnl_matrix<
> VectorPixelType> should be a new instantiation made using
> vnl_matrix.txx and should not be fetched from a linked library. If I
> am I talking nonsense now, please say so. I'm not an expert in this
> field.
>
> Thanks,
> Reinhard
>


More information about the Insight-users mailing list