<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Hi Jc,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks for the quick answer.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Unfortunately the fact that this works on Linux doesn't help me in my Windows environment.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Right now I have a working copy that refuses to build because it finds an external DCMTK (from a Slicer release mode superbuild tree) every time. I could try injecting a
DCMTK_DIR, but I guess it would rather be a workaround than a solution.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Probably if CMAKE_MODULE_PATH contained the DCMTK directory that the superbuild downloads and builds, besides CTK_CMAKE_UTILITIES_DIR, then the right DCMTK directory would
be found.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">If it's not clear, I would really appreciate if you could remote log. Probably you could find the source of the problem in no time.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">csaba<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Jean-Christophe Fillion-Robin [mailto:jchris.fillionr@kitware.com]
<br>
<b>Sent:</b> October 2, 2013 11:39<br>
<b>To:</b> Csaba Pinter<br>
<b>Cc:</b> CTK mailing list<br>
<b>Subject:</b> Re: [Ctk-developers] DCMTK_DIR is found incorrectly<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Csaba, <br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">In CTKConfig, the variable "CMAKE_MODULE_PATH" is a CMake global variable that is empty by default. On the other hand "CTK_CMAKE_UTILITIES_DIR" should not be empty as illustrated below:<br>
<br>
$ cat ../CTKConfig.cmake | ack -i "set\(CTK_CMAKE_UTILITIES_DIR"<br>
SET(CTK_CMAKE_UTILITIES_DIR "/home/jchris/Projects/CTK/Utilities/CMake")<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Otherwise, you will find below the result of my experiment. When configured, CTK found the expected DCMTK.<br>
<br>
<br>
On Ubuntu 13.04 using CMake 2.8.11.2, after installing the package "python2.7-dev" doing so the following works.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Note that I didn't enable CTK_ENABLE_ALL since I didn't the build system to build VTK or ITK components. Instead, I passed the following options:<br>
-DCTK_ENABLE_Python_Wrapping:BOOL=ON <br>
-DCTK_ENABLE_DICOM:BOOL=ON <br>
-DCTK_BUILD_EXAMPLES<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">$ git clone <a href="mailto:git@github.com:commontk/CTK">git@github.com:commontk/CTK</a><o:p></o:p></p>
</div>
<p class="MsoNormal">$ mkdir CTK-Debug<o:p></o:p></p>
</div>
<p class="MsoNormal">$ cd CTK-Debug<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">$ cmake -DQT_QMAKE_EXECUTABLE:FILEPATH=/home/jchris/Support/QtSDK-1.2.1/Desktop/Qt/4.8.1/gcc/bin/qmake -DCTK_ENABLE_Python_Wrapping:BOOL=ON -DCTK_ENABLE_DICOM:BOOL=ON -DCTK_BUILD_EXAMPLES:BOOL=ON ../CTK<br>
[...]<br>
-- Enabling [CTK_LIB_DICOM/Core] because of [ CTK_ENABLE_DICOM:1 OR ( CTK_ENABLE_DICOMApplicationHosting:0 AND CTK_BUILD_EXAMPLES:1 )] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOM] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOM2] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOMIndexer] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOMDemoSCU] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOMQuery] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOMRetrieve] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOMQueryRetrieve] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkCommandLineModuleExplorer] because of [ CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkDICOMObjectViewer] because of [ CTK_ENABLE_DICOM:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Enabling [CTK_APP_ctkSimplePythonShell] because of [ CTK_ENABLE_Python_Wrapping:1 AND CTK_BUILD_EXAMPLES:1] evaluates to True<br>
-- Generated: /home/jchris/Projects/CTK-Debug/DGraphInput-alldep.txt<br>
-- Generated: /home/jchris/Projects/CTK-Debug/DGraphInput-alldep-withext.txt<br>
-- Enabling option [CTK_LIB_DICOM/Widgets] required by [ctkDICOM]<br>
-- Enabling option [CTK_LIB_Widgets] required by [ctkDICOM]<br>
-- Enabling option [CTK_LIB_CommandLineModules/Frontend/QtGui] required by [ctkCommandLineModuleExplorer]<br>
-- Enabling option [CTK_LIB_CommandLineModules/Frontend/QtWebKit] required by [ctkCommandLineModuleExplorer]<br>
-- Enabling option [CTK_LIB_CommandLineModules/Backend/LocalProcess] required by [ctkCommandLineModuleExplorer]<br>
-- Enabling option [CTK_LIB_CommandLineModules/Backend/FunctionPointer] required by [ctkCommandLineModuleExplorer]<br>
-- Enabling option [CTK_LIB_CommandLineModules/Core] required by [ctkCommandLineModuleExplorer]<br>
-- Enabling option [CTK_LIB_Scripting/Python/Widgets] required by [ctkSimplePythonShell]<br>
-- Enabling option [CTK_LIB_Scripting/Python/Core] required by [ctkSimplePythonShell]<br>
-- Found PythonInterp: /usr/bin/python (found version "2.7.4") <br>
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/<a href="http://libpython2.7.so" target="_blank">libpython2.7.so</a> (found version "2.7.4")
<br>
-- Generated: /home/jchris/Projects/CTK-Debug/DGraphInput.txt<br>
-- Generated: /home/jchris/Projects/CTK-Debug/Project.xml<br>
-- Found Git: /usr/bin/git (found version "1.8.1.2") <br>
-- Configuring done<br>
-- Generating done<br>
-- Build files have been written to: /home/jchris/Projects/CTK-Debug<br>
<br>
<br>
<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">$ make -j6<br>
[...]<br>
[ 90%] Performing configure step for 'CTK-Configure'<br>
[...]<br>
-- Found PythonInterp: /usr/bin/python (found version "2.7.4") <br>
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/<a href="http://libpython2.7.so">libpython2.7.so</a> (found version "2.7.4")
<br>
-- Generated: /home/jchris/Projects/CTK-Debug/CTK-build/DGraphInput.txt<br>
-- Generated: /home/jchris/Projects/CTK-Debug/CTK-build/Project.xml<br>
-- Trying to find DCMTK expecting DCMTKConfig.cmake<br>
-- Trying to find DCMTK expecting DCMTKConfig.cmake - failed<br>
-- Trying to find DCMTK relying on FindDCMTK.cmake<br>
-- Looking for include file pthread.h<br>
-- Looking fothe r include file pthread.h - found<br>
-- Looking for pthread_create<br>
-- Looking for pthread_create - not found<br>
-- Looking for pthread_create in pthreads<br>
-- Looking for pthread_create in pthreads - not found<br>
-- Looking for pthread_create in pthread<br>
-- Looking for pthread_create in pthread - found<br>
-- Found Threads: TRUE <br>
-- Found DCMTK: /home/jchris/Projects/CTK-Debug/CMakeExternals/Install/include/dcmtk/config
<br>
-- Trying to find DCMTK relying on FindDCMTK.cmake - ok<br>
-- CTKCore: BFD support disabled<br>
-- Configuring done<br>
-- Generating done<br>
[...]<br>
-- Build files have been written to: /home/jchris/Projects/CTK-Debug/CTK-build<br>
<br>
[...]<br>
[100%] Built target CTKWidgetsCppTests<br>
[100%] Built target CTK-build<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">$ cd CTK-build<br>
$ $ cat CMakeCache.txt | ack DCMTK_DIR\:PATH<br>
DCMTK_DIR:PATH=/home/jchris/Projects/CTK-Debug/CMakeExternals/Install<br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Let's note that DCMTK couldn't be found using DCMTKConfig.cmake, this is explained by the fact the official DCMTK didn't integrate yet our latest and greatest contribution [1]<br>
<br>
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Hth<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Jc<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><br>
[1] <a href="https://github.com/commontk/DCMTK/commit/f461865d1759854db56e4c840991c81c77e45bb9">
https://github.com/commontk/DCMTK/commit/f461865d1759854db56e4c840991c81c77e45bb9</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Oct 2, 2013 at 10:18 AM, Csaba Pinter <<a href="mailto:csaba.pinter@queensu.ca" target="_blank">csaba.pinter@queensu.ca</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hi all,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I'm trying to build CTK separately, but I have problems with linking DCMTK.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">The way I build CTK:<o:p></o:p></p>
<p>-<span style="font-size:7.0pt"> </span>Turn on CTK_BUILD_ALL<o:p></o:p></p>
<p>-<span style="font-size:7.0pt"> </span>Turn on CTK_ENABLE_DICOM (I need this as I want to merge and test my changes in the CTK/Core/DICOM project)<o:p></o:p></p>
<p>-<span style="font-size:7.0pt"> </span>Set the qmake executable<o:p></o:p></p>
<p>-<span style="font-size:7.0pt"> </span>Configure<o:p></o:p></p>
<p>-<span style="font-size:7.0pt"> </span>CMake complains about python paths, I set those manually<o:p></o:p></p>
<p>-<span style="font-size:7.0pt"> </span>Configure, Generate<o:p></o:p></p>
<p>-<span style="font-size:7.0pt"> </span>Build superbuild<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Then DCMTK is downloaded and built by the superbuild, but later on, CTK projects find a completely different DCMTK directory (in my Slicer nightly build directory). I tried to manually
add the DCMTK directory to CMake, but this variable does not exist in the superbuild (it is also not passed down), and setting it to the inner CTK project doesn't work.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Basically no matter what I do, the DCMTK path is set to whatever find_project finds. This is what I found in CTKConfig.cmake:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"># Update CMake module path so that calling "find_package(DCMTK)" works as expected
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"># after calling "find_package(CTK)"<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"># Ideally projects like DCMTK or PythonQt should provide both "Config" and "Use" files.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">set(CMAKE_MODULE_PATH<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> ${CTK_CMAKE_UTILITIES_DIR}<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> ${CMAKE_MODULE_PATH}<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> )<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Now the problem with this is that ${CMAKE_MODULE_PATH} is empty, so there is no chance DCMTK is found correctly.<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Can someone please help with this?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks a lot,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">csaba<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">________________________________<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Csaba Pinter<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Medical Software Systems Engineer<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Laboratory for Percutanous Surgery<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">School of Computing<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Queen’s University<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Kingston, ON, Canada<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Email:
<a href="mailto:csaba.pinter@queensu.ca" target="_blank">csaba.pinter@queensu.ca</a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Web:
<a href="http://perk.cs.queensu.ca" target="_blank">http://perk.cs.queensu.ca</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@commontk.org">Ctk-developers@commontk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
+1 919 869 8849<o:p></o:p></p>
</div>
</div>
</body>
</html>