<div dir="ltr"><div><div><div>Dear Ruturaj,<br></div>if you don't need FLTK (as you mentioned, you don't need a GUI), then you need to modify the CMakeLists accordingly, i.e. remove all FLTK-related CMake variables in your new, fresh CMakeLists.txt<br>
<br></div>You will just need to tell CMake that your projects depends only on ITK.<br><br></div>In the ITK wiki, you will find quite a few examples on how to do this [1]. You even have a segmentation section there.<br><div>
<br>HTH,<br>JON HAITZ<br><br>[1] <a href="http://www.itk.org/Wiki/ITK/Examples#About_the_Examples">http://www.itk.org/Wiki/ITK/Examples#About_the_Examples</a><br><br><br><div class="gmail_extra"><br><div class="gmail_quote">
On 7 February 2014 12:36, Girish, Gavaskar Ruturaj <span dir="ltr"><<a href="mailto:gavaskar.ruturaj.girish@philips.com" target="_blank">gavaskar.ruturaj.girish@philips.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">






<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">Dear Friends,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">I am not able to build the app RegionGrowingSegmentation separately without using Superbuild. I have already installed Superbuild once. Here is what I did:<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">In cmake, I gave the source directory as ITKApps/RegionGrowingSegmentation and hit ‘Configure’, upon which CMake showed me the following error.<span style="color:rgb(31,73,125)"><u></u><u></u></span></span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><i><span style="color:red">CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.<br>
Missing variable is:<br>
FLTK_FLUID_EXECUTABLE</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="color:red">CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.<br>
Missing variable is:<br>
FLTK_FLUID_EXECUTABLE</span></i><u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12pt"><i><span style="color:red">CMake Error at CMakeLists.txt:42 (ITK_DISABLE_FLTK_GENERATED_WARNINGS):<br>
Unknown CMake command "ITK_DISABLE_FLTK_GENERATED_WARNINGS".</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="color:red">CMake Warning (dev) in CMakeLists.txt:<br>
No cmake_minimum_required command is present. A line of code such as<br>
<br>
cmake_minimum_required(VERSION 2.8)<br>
<br>
should be added at the top of the file. The version specified may be lower<br>
if you wish to support older CMake versions for this project. For more<br>
information run "cmake --help-policy CMP0000".<br>
This warning is for project developers. Use -Wno-dev to suppress it.</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="color:red">FLTK_WRAP_UI was called with a target that was never created: RegionGrowingSegmentation. The problem was found while processing the source directory: D:/ITKApps-27-01-2014/RegionGrowingSegmentation. This FLTK_WRAP_UI
 call will be ignored.</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="color:red">FLTK_WRAP_UI was called with a target that was never created: RegionGrowingSegmentation2D. The problem was found while processing the source directory: D:/ITKApps-27-01-2014/RegionGrowingSegmentation. This FLTK_WRAP_UI
 call will be ignored.</span></i><u></u><u></u></p>
<p class="MsoNormal"><i>Configuring incomplete, errors occurred!</i><u></u><u></u></p>
<p class="MsoNormal"><i>See also "D:/RegionGrowingSegmentation-Build/CMakeFiles/CMakeOutput.log".</i><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">So I added the following 3 commands to CMakeLists.txt:<u></u><u></u></span></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p><span style="font-family:"Courier New"">1)</span><span style="font-size:7pt;font-family:"Courier New"">     
</span><span style="font-family:"Courier New"">SET(FLTK_FLUID_EXECUTABLE "C:/Program Files/FLTK/bin/fluid.exe")<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">2)</span><span style="font-size:7pt;font-family:"Courier New"">     
</span><span style="font-family:"Courier New"">CMAKE_MINIMUM_REQUIRED(VERSION 2.8)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">3)</span><span style="font-size:7pt;font-family:"Courier New"">     
</span>(<i>Copied from ITKApps/CMakeLists.txt</i>)<span style="font-family:"Courier New""><u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">MACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS files)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">  IF(CMAKE_COMPILER_IS_GNUCXX)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">    FOREACH(f ${files})<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">      STRING(REGEX REPLACE "<a>\\.fl$</a>" ".cxx" SRC "${f}")<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">      STRING(REGEX REPLACE ".*/([^/]*)$" "<a>\\1</a>" SRC "${SRC}")<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">      SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS -w)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">    ENDFOREACH(f)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">  ENDIF(CMAKE_COMPILER_IS_GNUCXX)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">  IF(MSVC)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">    FOREACH(f ${files})<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">      STRING(REGEX REPLACE "<a>\\.fl$</a>" ".cxx" SRC "${f}")<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">      STRING(REGEX REPLACE ".*/([^/]*)$" "<a>\\1</a>" SRC "${SRC}")<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">      SET_SOURCE_FILES_PROPERTIES(${SRC} PROPERTIES COMPILE_FLAGS /w)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">    ENDFOREACH(f)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">  ENDIF(MSVC)<u></u><u></u></span></p>
<p><span style="font-family:"Courier New"">ENDMACRO(ITK_DISABLE_FLTK_GENERATED_WARNINGS)<u></u><u></u></span></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">Then I got the following error in cmake:<u></u><u></u></span></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12pt"><i><span style="color:red">CMake Error at CMakeLists.txt:82 (ADD_GUI_EXECUTABLE):<br>
Unknown CMake command "ADD_GUI_EXECUTABLE".</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="color:red">FLTK_WRAP_UI was called with a target that was never created: RegionGrowingSegmentation. The problem was found while processing the source directory: D:/ITKApps-27-01-2014/RegionGrowingSegmentation. This FLTK_WRAP_UI
 call will be ignored.</span></i><u></u><u></u></p>
<p class="MsoNormal"><i><span style="color:red">FLTK_WRAP_UI was called with a target that was never created: RegionGrowingSegmentation2D. The problem was found while processing the source directory: D:/ITKApps-27-01-2014/RegionGrowingSegmentation. This FLTK_WRAP_UI
 call will be ignored.</span></i><u></u><u></u></p>
<p class="MsoNormal"><i>Configuring incomplete, errors occurred!</i><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">Please tell me if I did anything wrong and what I need to do to build this app. I need to find a way to build it separately since I wish to modify it a little. Thanks.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif"">Ruturaj<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<div>
<div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(181,196,223) -moz-use-text-color -moz-use-text-color;padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10pt;font-family:"Tahoma","sans-serif""> Community [mailto:<a href="mailto:community-bounces@itk.org" target="_blank">community-bounces@itk.org</a>]
<b>On Behalf Of </b>Girish, Gavaskar Ruturaj<br>
<b>Sent:</b> Friday, February 07, 2014 1:37 PM<br>
<b>To:</b> Jon Haitz Legarreta</span></p><div><div class="h5"><br>
<b>Cc:</b> <a href="mailto:community@itk.org" target="_blank">community@itk.org</a><br>
<b>Subject:</b> Re: [ITK Community] Some questions about RegionGrowingSegmentation<u></u><u></u></div></div><p></p>
</div>
</div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Dear Jon,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Thanks for your suggestion. I am looking to modify the source code to accept multiple seed points so that more than one region can be segmented. I find it much
 easier without a GUI as I never worked with developing a GUI before. I will go through the links you posted.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Regards<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">Ruturaj<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10pt;font-family:"Tahoma","sans-serif""> Jon Haitz Legarreta [<a href="mailto:jhlegarreta@vicomtech.org" target="_blank">mailto:jhlegarreta@vicomtech.org</a>]
<br>
<b>Sent:</b> Friday, February 07, 2014 1:15 PM<br>
<b>To:</b> Girish, Gavaskar Ruturaj<br>
<b>Cc:</b> <a href="mailto:community@itk.org" target="_blank">community@itk.org</a><br>
<b>Subject:</b> Re: [ITK Community] Some questions about RegionGrowingSegmentation<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt">Dear Ruturaj,<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">1.- Haven't got the example with me, but if you intend to use a region growing segmentation filter a good point to start is the ITK software guide, chapter 9.1 [1]. There, you will be able to see which are the
 available build-in algorithms/strategies, and you will see which are the methods you need to call in order to make them work. Please, bear in mind that segmentation is highly application-specific, and you may need to at least adjust the parameters, when it's
 not to develop your own strategy based on what's available in ITK, for example. Nevertheless, the available examples in ITK are quite useful.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt">2.- Sure. The seed point can be read from wherever you need (user interaction, program arguments, external file). The seed-setting method (or whichever method actually requiring the seed point) will only require
 a vector/array or individual coordinates, regardless of where you picked up them.
<u></u><u></u></p>
</div>
<p class="MsoNormal">3.- As said, haven't got the app in front of me, but surely you will be able to build your own application for region growing segmentation without any GUI. ITK is independent of any GUI (now, the apps may use a specific one); you can just
 build an application with the GUI library that you most like. Having said, that, may be the most common and easiest choice is Qt [2], which has an open source version.<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12pt"><br>
<br>
[1] <a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>
[2] <a href="http://qt-project.org/" target="_blank">http://qt-project.org/</a><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On 7 February 2014 06:27, Girish, Gavaskar Ruturaj <<a href="mailto:gavaskar.ruturaj.girish@philips.com" target="_blank">gavaskar.ruturaj.girish@philips.com</a>> wrote:<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal">Hello All,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I am new to ITK & C++ and I have some questions related to the ITK app RegionGrowingSegmentation:<u></u><u></u></p>
<p>1.<span style="font-size:7pt">       </span>Please explain to me the purpose of the function RegionGrowingSegmentation:: ClickSelectCallback(float x, float y, float z, float itkNotUsed(value), void * args), along with the meaning of the arguments (Line
 451 in RegionGrowingSegmentation.cxx)<u></u><u></u></p>
<p>2.<span style="font-size:7pt">       </span>Is it possible to pass the coordinates of the seed point without user interaction (for example, as arguments or by storing them in a file etc.) ?<u></u><u></u></p>
<p>3.<span style="font-size:7pt">       </span>Can this app be built without a GUI, so that the coordinates of the seed point, along with other parameters, can be directly passed from the command line? If yes, what is the procedure to build it?<u></u><u></u></p>

<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Thanks.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Regards<u></u><u></u></p>
<p class="MsoNormal">Ruturaj<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div class="MsoNormal" style="text-align:center" align="center">
<hr align="center" size="2" width="100%">
</div>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray">The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If
 you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail
 and destroy all copies of the original message.</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12pt"><br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org">Community@itk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div></div></div>