[Insight-users] Gatens Label Object Representation and Manipulation

Christian Werner christian.werner at rwth-aachen.de
Sat Feb 27 14:24:25 EST 2010


Hello!

I am off to make some serious object labling and manipulation. 
Unfortunately some very basic code does not compile:

#include "itkBinaryImageToLabelMapFilter.h"
int main( int argc, char * argv[] )
{
}

christian at trinity:~/programming/itk/labeling/bin$ make -j2
Scanning dependencies of target testITK
[100%] Building CXX object CMakeFiles/testITK.dir/testITK.o
In file included from 
/home/christian/programming/itk/labeling/testITK.cxx:2:
/opt/InsightToolkit-3.16.0/Code/Review/itkBinaryImageToLabelMapFilter.h:54: 
error: expected type-specifier before ‘LabelMap’
/opt/InsightToolkit-3.16.0/Code/Review/itkBinaryImageToLabelMapFilter.h:54: 
error: expected ‘>’ before ‘LabelMap’
make[2]: *** [CMakeFiles/testITK.dir/testITK.o] Error 1
make[1]: *** [CMakeFiles/testITK.dir/all] Error 2
make: *** [all] Error 2

I can fix this, when I edit (and this already feels bad) the 
itkBinaryImageToLabelMapFilter.h by adding

#include "itkLabelMap.h"
#include "itkLabelObject.h"

The above code compiles this way. However if I actually use some 
functions out of the itkBinaryImageToLabelMapFilter.h I get errors over 
errors.

My CMakeLists looks like this:

cmake_minimum_required(VERSION 2.4)

PROJECT(testITK)

FIND_PACKAGE(ITK REQUIRED)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)

ADD_EXECUTABLE(testITK testITK.cxx)

TARGET_LINK_LIBRARIES(testITK ITKCommon ITKIO ITKBasicFilters ITKStatistics)


General ITK programming works without trouble. I must be doing something 
totally wrong, any suggestions?


Best regards,
Christian




More information about the Insight-users mailing list