[Insight-users] CMake Stack size

Daniel Blezek Blezek.Daniel at mayo.edu
Wed Oct 7 12:26:38 EDT 2009


Hi Mat,

  Flood fills don't have to be recursive.  It is much more efficient to
manage a stack (using stl::vector) of voxels than to use recursion.  Then no
worries about stack size for recursion.

  If you just want to figure out the area of a given object, you can use the
itkShapeLabelObject in the Review directory.

-dan


On 10/7/09 11:05 AM, "Matthias Dodt" <matthias.dodt at mdc-berlin.de> wrote:

> 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
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users

-- 
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center

P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu

Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org




More information about the Insight-users mailing list