[Insight-users] CMake Stack size

Matthias Dodt matthias.dodt at mdc-berlin.de
Wed Oct 7 12:05:42 EDT 2009


Hey Guys!

I wrote a simple ITK ImageToImage filter using the floodfill algorithm 
and doing some more computation. Unfortunately it crashes with big 
images (floodfill works via recursion). Is there a way to increase the 
stack size in CMakeLists.txt? For now it looks as follows:

PROJECT(itk_tracker_project)

SET ( ITK_DIR /usr/local/lib/InsightToolkit )
SET ( CMAKE_MODULE_PATH /users/mat/Documents/InsightToolkit-3.14.0/CMake )

FIND_PACKAGE(ITK)
IF(ITK_FOUND)
  INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
  MESSAGE(FATAL_ERROR "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)

LINK_LIBRARIES(
    ITKAlgorithms ITKCommon ITKNumerics ITKIO ITKBasicFilters )

SET(AutoRegistration
src/main.cpp
src/HuangWangLiuThinner.h
src/DattaPauriThinner.h
src/Skeletonizer.h
)

ADD_EXECUTABLE ( itk_tracker_project_main ${AutoRegistration} )
INSTALL_TARGETS ( /itk_build itk_tracker_project_main  )


I konw there is although a connected-components filter- but i need to 
know the number of pixels in a label (area) and it seems to me 
connectedComponents doesnt return this...

Thanks!

Greetings

Mat


More information about the Insight-users mailing list