An additional piece of information. This worked for VV but when I tried to compile another software that does not have the command<br>  FIND_PACKAGE(GDCM REQUIRED)<br>  include(${GDCM_USE_FILE})<br>I got the error <br>ld: library not found for -lgdcmDICT<br>

<br>This is because Modules/ThirdParty/GDCM/itk-module-init.cmake does not include ${GDCM_USE_FILE}, as shown in ${GDCM_SOURCE_DIR}/Examples/CMakeLists.txt.<br>Simon<br><br><div class="gmail_quote">On Wed, Jul 24, 2013 at 10:08 PM, Simon Rit <span dir="ltr">&lt;<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, after merging your two branches, everything compiles fine.<span class="HOEnZb"><font color="#888888"><br>Simon</font></span><div class="HOEnZb">

<div class="h5"><br><br><div class="gmail_quote">On Wed, Jul 24, 2013 at 8:55 PM, Xiaoxiao Liu <span dir="ltr">&lt;<a href="mailto:xiaoxiao.liu@kitware.com" target="_blank">xiaoxiao.liu@kitware.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">and this one to exclude ITKReview from building when ITK_USE_REVIEW is turned OFF:<div><a href="http://review.source.kitware.com/#/c/12084/" target="_blank">http://review.source.kitware.com/#/c/12084/</a><br>


</div></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jul 24, 2013 at 1:58 PM, Xiaoxiao Liu <span dir="ltr">&lt;<a href="mailto:xiaoxiao.liu@kitware.com" target="_blank">xiaoxiao.liu@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div dir="ltr"><div>Will this help?</div><a href="http://review.source.kitware.com/#/c/12083/" target="_blank">http://review.source.kitware.com/#/c/12083/</a><br><div><br></div></div><div class="gmail_extra"><div><div>
<br><br><div class="gmail_quote">
On Wed, Jul 24, 2013 at 12:47 PM, Simon Rit <span dir="ltr">&lt;<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




Thanks! But itt&#39;s not sufficient. The cmake command gives<br>-- Enabled ITKOpenJPEG, needed by [ITKGDCM].<br><br>I have been a bit further. If I manually remove the dependency to OpenJPEG:<br>diff --git a/Modules/ThirdParty/GDCM/itk-module.cmake b/Modules/ThirdParty/GDCM/itk-module.cmake<br>







index 37ba9e4..c67a8f5 100644<br>--- a/Modules/ThirdParty/GDCM/itk-module.cmake<br>+++ b/Modules/ThirdParty/GDCM/itk-module.cmake<br>@@ -6,7 +6,6 @@ itk_module(ITKGDCM<br>   DEPENDS<br>     ITKZLIB<br>     ITKExpat<br>-    ITKOpenJPEG<br>







   DESCRIPTION<br>     &quot;${DOCUMENTATION}&quot;<br> )<br><br>I get :<br>/Users/srit/src/itk4/itk/Modules/Nonunit/Review/src/itkJPEG2000ImageIO.cxx:29:12: fatal error: <br>      &#39;openjpeg.h&#39; file not found<br>






  #include &quot;openjpeg.h&quot;<br>
<br>I&#39;m quite surprised because ITK_USE_REVIEW and BUILD_TESTING are OFF... Anyway, I ignored this (make -k) and I can then compile my software. So the dependency to ITKOpenJPEG would have to be removed in ITKGDCM if ITK_USE_SYSTEM_GDCM is ON.<br>






<br>As a side note, I tried to remove the compilation of the module ITKGDCM but that failed. I also tried to use gdcm as described in its documentation but that failed too:<br><br>diff --git a/Modules/ThirdParty/GDCM/itk-module-init.cmake b/Modules/ThirdParty/GDCM/itk-module-init.cmak<br>






index c04c639..90cea5f 100644<br>--- a/Modules/ThirdParty/GDCM/itk-module-init.cmake<br>+++ b/Modules/ThirdParty/GDCM/itk-module-init.cmake<br>@@ -3,4 +3,5 @@ mark_as_advanced(ITK_USE_SYSTEM_GDCM)<br> <br> if(ITK_USE_SYSTEM_GDCM)<br>






   find_package(GDCM REQUIRED)<br>+  include(${GDCM_USE_FILE})<br> endif()<br><br>I hope this (mess) helps...<span><font color="#888888"><br>Simon</font></span><div><div><br><br><div class="gmail_quote">
On Wed, Jul 24, 2013 at 5:43 PM, Matt McCormick <span dir="ltr">&lt;<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Simon,<br>
<br>
Please try this patch:<br>
<br>
  <a href="http://review.source.kitware.com/#/c/12078/" target="_blank">http://review.source.kitware.com/#/c/12078/</a><br>
<br>
Thanks,<br>
Matt<br>
<div><div><br>
On Wed, Jul 24, 2013 at 9:40 AM, Simon Rit<br>
&lt;<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt; I am trying to build an application (<a href="http://vv.creatis.insa-lyon.fr/" target="_blank">http://vv.creatis.insa-lyon.fr/</a>) under<br>
&gt; MacOS with system GDCM (latest version from git) and ITK 4.4. At link time,<br>
&gt; I get duplicate symbol errors because itk and gdcm both compile openjpeg,<br>
&gt; for example :<br>
&gt;<br>
&gt; duplicate symbol _j2k_convert_progression_order in:<br>
&gt;     /Users/srit/src/itk4/mac64/lib/libitkopenjpeg-4.4.a(j2k.c.o)<br>
&gt;     /Users/srit/src/gdcm/mac64-install/lib/libgdcmopenjpeg.a(j2k.c.o)<br>
&gt;<br>
&gt; I did not find an easy way to fix this. Is there a way to disable the build<br>
&gt; of OpenJPEG when gdcm system is used? No matter what I do, the module<br>
&gt; ITKOpenJPEG is built when ITK IOs are built...<br>
&gt; Thanks in advance,<br>
&gt; Simon<br>
&gt;<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
</blockquote></div><br>
</div></div><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></div></div><span><font color="#888888">-- <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: <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-family:arial,sans-serif;font-size:13px"><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>
</font></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: <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-family:arial,sans-serif;font-size:13px"><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><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>
</div></div></blockquote></div><br>