[Insight-users] How to create an array of itk::Matrix

David Doria daviddoria at gmail.com
Mon Nov 26 19:39:53 EST 2012


On Mon, Nov 26, 2012 at 6:47 PM, Tanweer Rashid <trash001 at odu.edu> wrote:
> Hi,
>
> I am trying to create an array of itk::Matrix. My code is as follows:

Please try to simplify examples as much as you can. I can reproduce the error:
error: undefined reference to `vnl_matrix_fixed<double, 512u, 3u>::fill(double)'

with the following:

TestITK.cpp
----------------
#include "itkMatrix.h"

int main()
{
  typedef itk::Matrix<double, 512, 3> MatrixShapeType;
  MatrixShapeType mShapes[10];
  mShapes[0].Fill(0);
}

CMakeLists.txt
---------------------

cmake_minimum_required(VERSION 2.6)

project(TestITK)

FIND_PACKAGE(ITK REQUIRED ITKCommon ITKVNL)
INCLUDE(${ITK_USE_FILE})

add_executable(TestITK TestITK.cpp)
target_link_libraries(TestITK ${ITK_LIBRARIES})

Anyone know what the problem could be?

David


More information about the Insight-users mailing list