<br><br><div class="gmail_quote">On Mon, Feb 25, 2013 at 6:57 PM, Nikhil Chandra <span dir="ltr">&lt;<a href="mailto:nsc2124@columbia.edu" target="_blank">nsc2124@columbia.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif"><div style>Hi Xiaoxiao,</div><div style><br></div><div style>Thank you for your help – I added the additional line to my CMakeLists.txt file and now everything compiles correctly.</div>
<div style><br></div><div style>Is there any significant advantage to using v4 over v3?</div><div style><br></div></div></blockquote><div><b><br></b></div><div><b>&gt;&gt; You can find some details here: </b></div><div><a href="http://www.cmake.org/Wiki/ITK/Release_4/Why_Switch_to_ITKv4"><b>http://www.cmake.org/Wiki/ITK/Release_4/Why_Switch_to_ITKv4</b></a></div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif"><div style>
</div><div style>Also, in InsightToolkit/Examples there is a large collection of sample programs that demonstrate how to perform various tasks using ITK, such as registration, input/output, etc. I have noticed that the code samples are embedded with documentation snippets. For example, in /Examples/Registration/ImageRegistration1.cxx, this is near the top:</div>
<div style><br></div><div><i><font color="#235e8c">// Software Guide : BeginLatex</font></i></div><div><i><font color="#235e8c">//</font></i></div><div><i><font color="#235e8c">// This example illustrates the use of the image registration framework in </font></i></div>
<div><i><font color="#235e8c">// Insight.  It should be read as a &quot;Hello World&quot; for ITK registration.  Which</font></i></div><div><i><font color="#235e8c">// means that for now, you don&#39;t ask ``why?&#39;&#39;. Instead, use the example as an </font></i></div>
<div><i><font color="#235e8c">// introduction to the elements that are typically involved in solving an image</font></i></div><div><i><font color="#235e8c">// registration problem.</font></i></div><div><i><font color="#235e8c">// </font></i></div>
<div><i><font color="#235e8c">// \index{itk::Image!Instantiation}</font></i></div><div><i><font color="#235e8c">// \index{itk::Image!Header}</font></i></div><div><i><font color="#235e8c">//</font></i></div><div><i><font color="#235e8c">// A registration method requires the following set of components: two input</font></i></div>
<div><i><font color="#235e8c">// images, a transform, a metric, an interpolator and an optimizer. Some of</font></i></div><div><i><font color="#235e8c">// these components are parameterized by the image type for which the </font></i></div>
<div><i><font color="#235e8c">// registration is intended. The following header files provide declarations </font></i></div><div><i><font color="#235e8c">// of common types used for these components.</font></i></div><div>
<i><font color="#235e8c">//</font></i></div><div><i><font color="#235e8c">// Software Guide : EndLatex</font></i></div><div style><br></div><div style>My question is this: how do I extract all of the LaTeX documentation from all of the example programs, and put it into a PDF document? Is there a readily available mechanism for doing this? Is it somehow related to Doxygen? </div>
<div style><br></div></div></blockquote><div><b>&gt;&gt; Yes. The code and the latex magics  in Examples are used to generate the SoftwareGuide book: <a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a></b></div>
<div><b><br></b></div><div><b>The doxygen is generated from the actual ITK source code documentations, which is independent from the  the software guide.</b></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;font-size:14px;font-family:Calibri,sans-serif"><div style></div><div style>Thanks,</div><div style>Nikhil</div><div style><br></div><span style><div style="border-right:medium none;padding-right:0in;padding-left:0in;padding-top:3pt;text-align:left;font-size:11pt;border-bottom:medium none;font-family:Calibri;border-top:#b5c4df 1pt solid;padding-bottom:0in;border-left:medium none">
<span style="font-weight:bold">From: </span> Xiaoxiao Liu &lt;<a href="mailto:xiaoxiao.liu@kitware.com" target="_blank">xiaoxiao.liu@kitware.com</a>&gt;<br><span style="font-weight:bold">Date: </span> Fri, 22 Feb 2013 13:37:01 -0500<br>
<span style="font-weight:bold">To: </span> Nikhil Chandra &lt;<a href="mailto:nsc2124@columbia.edu" target="_blank">nsc2124@columbia.edu</a>&gt;<br><span style="font-weight:bold">Cc: </span> &lt;<a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a>&gt;<br>
<span style="font-weight:bold">Subject: </span> Re: [Insight-users] Trouble setting up ITK project<br></div><div><div class="h5"><div><br></div><div>Hi Nikhil, </div><div>Here is an example of building a &quot;hello world&quot; project with ITK:</div>
<a href="http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/ITK/HelloWorld/index.html" target="_blank">http://insightsoftwareconsortium.github.com/ITKBarCamp-doc/ITK/HelloWorld/index.html</a><div>
Looks like you are missing:         <b>include( ${ITK_USE_FILE} )</b></div><div><b><br></b></div><div>Highly encourage you to use ITK v4:<a href="http://sourceforge.net/projects/itk/files/itk/4.3/InsightToolkit-4.3.1.tar.gz/download" target="_blank">http://sourceforge.net/projects/itk/files/itk/4.3/InsightToolkit-4.3.1.tar.gz/download</a></div>
<div><br></div><div>Hope this helps.</div><div>-Xiaoxiao<br><br><div class="gmail_quote">On Fri, Feb 22, 2013 at 12:55 PM, Nikhil Chandra <span dir="ltr">&lt;<a href="mailto:nsc2124@columbia.edu" target="_blank">nsc2124@columbia.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="font-family:&#39;courier new&#39;,monospace">Hello,</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">
<span style="font-family:&#39;courier new&#39;,monospace">I recently installed ITK v3 on a CentOS 6 machine using ccmake with the following options:</span><br style="font-family:courier new,monospace"><br style="font-family:courier new,monospace">
<span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">BUILD_DOXYGEN                         OFF</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)"><span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">BUILD_EXAMPLES                        ON</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">
<span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">BUILD_SHARED_LIBS                     ON</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)"><span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">BUILD_TESTING                         OFF</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">
<span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">CMAKE_BACKWARDS_COMPATIBILITY         2.0</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)"><span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">CMAKE_BUILD_TYPE                      Release</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">
<span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">CMAKE_INSTALL_PREFIX                  /usr/local</span><br style="font-family:courier new,monospace;color:rgb(51,51,255)"><span style="font-family:&#39;courier new&#39;,monospace"><span style="color:rgb(51,51,255)">ITK_USE_KWSTYLE                       OFF</span><br>
<br>After pressing c + g inside ccmake, I followed this up with sudo make, and sudo make install.<br><br>I next installed VTK with the following options:<br><br><span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">BUILD_EXAMPLES</span><span style="color:rgb(51,51,255)">                      ON</span></span><br style="font-family:courier new,monospace;color:rgb(51,51,255)">
<span style="color:rgb(51,51,255);font-family:&#39;courier new&#39;,monospace">BUILD_SHARED_LIBS                   ON<br>BUILD_TESTING                       ON<br>CMAKE_BACKWARDS_COMPATIBILITY       2.0<br>CMAKE_BUILD_TYPE                    Debug<br>




CMAKE_INSTALL_PREFIX                /usr/local<br>OpenQube_DIR                        OpenQube_DIR_NOTFOUND<br>QT_QMAKE_EXECUTABLE                 QT_QMAKE_EXECUTABLE-NOTFOUND<br>VTKMY_WRAP_TCL                      ON<br>




VTK_DATA_ROOT                       VTK_DATA_ROOT-NOTFOUND<br>VTK_EXTRA_COMPILER_WARNINGS         OFF<br>VTK_LARGE_DATA_ROOT                 VTK_LARGE_DATA_ROOT-NOTFOUND<br>VTK_USE_CHARTS                      ON<br>VTK_USE_CHEMISTRY                   ON<br>




VTK_USE_GEOVIS                      ON<br>VTK_USE_INFOVIS                     ON<br>VTK_USE_N_WAY_ARRAYS                ON<br>VTK_USE_PARALLEL                    ON<br>VTK_USE_QT                          OFF<br>VTK_USE_QTCHARTS                    OFF<br>




VTK_USE_RENDERING                   ON<br>VTK_USE_TEXT_ANALYSIS               OFF<br>VTK_USE_VIEWS                       ON<br>VTK_WRAP_JAVA                       OFF<br>VTK_WRAP_PYTHON                     OFF<br>VTK_WRAP_PYTHON_SIP                 OFF<br>




VTK_WRAP_TCL</span><span style="font-family:&#39;courier new&#39;,monospace"><span style="color:rgb(51,51,255)">                        ON</span><br><br>Again, after pressing c + g inside ccmake, I ran sudo make, and sudo make install. In retrospect, I probably should have set BUILD_TESTING to OFF and CMAKE_BUILD_TYPE to Release, but I don&#39;t think that this would have any bearing on the problem I am facing currently.<br>
<br>My next action was to create a new C++ project called ITKRegistration1 in my home directory, using NetBeans. Here is the code that is currently in main.cpp:<br><br><span style="color:rgb(51,51,255)">#include &lt;cstdlib&gt;</span><br style="color:rgb(51,51,255)">
<br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">using namespace std;</span><br style="color:rgb(51,51,255)"><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">/*</span><br style="color:rgb(51,51,255)">
<span style="color:rgb(51,51,255)"> * </span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)"> */</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">int main(int argc, char** argv) {</span><br style="color:rgb(51,51,255)">
<br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">    return 0;</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">}</span><br><br>I then tried to create a new Makefile using ccmake, by writing the following code in CMakeLists.txt:<br>
<br style="color:rgb(255,0,0)"><span style="color:rgb(51,51,255)">cmake_minimum_required(VERSION 2.8)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">project(ITKRegistration1)</span><br style="color:rgb(51,51,255)">
<span style="color:rgb(51,51,255)">add_executable(ITKRegistration1 main.cpp)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">find_package(ITK)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">if (ITK_FOUND)</span><br style="color:rgb(51,51,255)">
<span style="color:rgb(51,51,255)">    include_directories(${ITK_INCLUDE_DIRS})</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">
    target_link_libraries (ITKRegistration1 ${ITK_LIBRARIES})</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">endif (ITK_FOUND)</span><br style="color:rgb(51,51,255)"><br style="color:rgb(51,51,255)">
<span style="color:rgb(51,51,255)">find_package(VTK)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">if (VTK_FOUND)</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">    include_directories(${VTK_INCLUDE_DIRS})</span><br style="color:rgb(51,51,255)">
<span style="color:rgb(51,51,255)">
    target_link_libraries (ITKRegistration1 ${VTK_LIBRARIES})</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">endif (VTK_FOUND)</span><br style="color:rgb(51,51,255)"><br>After hitting c + g, I tried running make, and I got the following error message:<br>
<br><span style="color:rgb(51,51,255)">Scanning dependencies of target ITKRegistration1</span><br style="color:rgb(51,51,255)"><span style="color:rgb(51,51,255)">[100%] Building CXX object CMakeFiles/ITKRegistration1.dir/main.cpp.o</span><br style="color:rgb(51,51,255)">
<span style="color:rgb(51,51,255)">Linking CXX executable ITKRegistration1</span><br style="color:rgb(51,51,255)"><span style="color:rgb(255,0,0)">/usr/bin/ld: cannot find -lITKAlgorithms</span><br style="color:rgb(255,0,0)">
<span style="color:rgb(255,0,0)">collect2: ld returned 1 exit status</span><br style="color:rgb(255,0,0)"><span style="color:rgb(255,0,0)">make[2]: *** [ITKRegistration1] Error 1</span><br style="color:rgb(255,0,0)"><span style="color:rgb(255,0,0)">make[1]: *** [CMakeFiles/ITKRegistration1.dir/all] Error 2</span><br style="color:rgb(255,0,0)">
<span style="color:rgb(255,0,0)">make: *** [all] Error 2</span><br style="color:rgb(255,0,0)"><br>In terminal, I ran the command: find /usr/local/itk -iname &quot;*.so&quot;, and there is a file called libITKAlgorithms.so located in /usr/local/itk/bin, so I am not sure why this error message is taking place. Have I missed a step during the installation of ITK? Is there something wrong with the code I wrote for CMakeLists.txt?<br>
<br>Any input would be appreciated, and thanks.<span><font color="#888888"><br><br>Nikhil Chandra<br></font></span></span><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br><br>
Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br><br>
Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br><br>
Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>
Follow this link to subscribe/unsubscribe:<br><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br><br></blockquote></div><br><br clear="all">
<div><br></div>-- <br><div><br></div><div><br></div>---------------------------------------------<br><b>Xiaoxiao Liu</b>, Ph.D.<div><div><div><font face="arial,sans-serif"><span style="border-collapse:collapse">R &amp; D Engineer</span></font></div>
<div><div><a href="http://www.kitware.com/" target="_blank">Kitware Inc</a>.</div></div><div><span style="border-collapse:collapse;font-size:13px;font-family:arial,sans-serif">Clifton Park, NY</span><div><div>Phone: <a href="tel:%28518%29%20881-4924" value="+15188814924" target="_blank">(518) 881-4924</a>  or  <span style="border-collapse:collapse;color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif"><a href="tel:%28518%29%20371-3971%20x124" value="+15183713971" target="_blank">(518) 371-3971 x124</a></span></div>
<div><font face="Verdana,Arial,Helvetica,sans-serif"><span style="line-height:31px;font-size:x-small"><br></span></font></div></div></div></div></div></div></div></div></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br></div><div><br></div>---------------------------------------------<br><b>Xiaoxiao Liu</b>, Ph.D.<div><div><div><font face="arial, sans-serif"><span style="border-collapse:collapse">R &amp; D Engineer</span></font></div>
<div><div><a href="http://www.kitware.com/" target="_blank">Kitware Inc</a>.</div></div><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Clifton Park, NY</span><div><div>Phone: (518) 881-4924  or  <span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px">(518) 371-3971 x124</span></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><span style="line-height:31px;font-size:x-small"><br></span></font></div></div></div></div></div>