[Insight-developers] ITK + find_package(DCMTK NO_MODULE) progress/success

Williams, Norman K norman-k-williams at uiowa.edu
Mon Feb 25 10:15:07 EST 2013


It's ready to be tested, in my opinion.  The changes to DCMTK are a
compatible addition to the generated CMake configuration files; there's
nothing about them that would break a program that did not use
find_package(DCMTK NO_MODULE).

The main reason to move to NO_MODULE is that FindDCMTK.cmake as
distributed with CMake is inadequate, complicated and fragile.

This repository & branch contains the work I've done:

https://github.com/InsightSoftwareConsortium/DCMTK/tree/AddProperConfig



The ITK branch is here:

https://github.com/Chaircrusher/ITK/commits/DCMTK_NO_MODULE


I'm still testing, as this involves a lot of moving parts.  In particular,
ITK needs to still work with the pre-NO_MODULE DCMTK.  That is what Brad
King & I were discussing how to implement.

His suggestion was to fix FindDCMTK.cmake -- ITK has its own version in
Modules/ThirdParty/DCMTK/CMake.  I did a bunch of work on this a few weeks
back, to get it to handle building against a DCMTK build tree instead of
an install tree.

I'm lobbying with the Offis people to get the NO_MODULE work integrated
with the official DCMTK source.  We can move forward without them, since
at this point, ITK uses a github branch of DCMTK already (see above). This
will likely continue to be the case, especially for the
USE_SYSTEM_DCMTK=OFF case; the github version incorporates some minor
patches to the Offis DCMTK so that it will work with ITK's ZLIB, TIFF, and
JPEG.


On 2/22/13 6:45 PM, "Jean-Christophe Fillion-Robin"
<jchris.fillionr at kitware.com> wrote:

>Hi Kent,
>
>
>Excellent. Thanks for working on this. Let me know when it's ready to be
>tested and will give a try within Slicer and CTK.
>
>
>Is the generated DCMTKConfig.cmake  available in either the build or
>installed tree ?
>
>
>Thanks
>Jc
>
>
>On Fri, Feb 22, 2013 at 4:31 PM, Brad King
><brad.king at kitware.com> wrote:
>
>On 02/22/2013 02:47 PM, Williams, Norman K wrote:
>> My patch for ITK depends on the patched DCMTK.  It might be possible to
>> maintain backwards compatibility with the old find_package and unpatched
>> DCMTK, but I'm not sure how to implement that.  Would it be as simple as
>> this?
>>
>> find_package(DCMTK NO_MODULE QUIET)
>> if(NOT DCMTK_FOUND)
>>   find_package(DCMTK REQUIRED QUIET)
>>   if(NOT DCMTK_FOUND)
>>     message(FATAL_ERROR "DCMTK package not found. Please set DCMTK_DIR
>>and
>> re-run CMake")
>>   endif()
>> endif()
>
>
>You can teach FindDCMTK to try the NO_MODULE mode first and then
>fall back to the rest of its implementation.  Add something like
>this at the top of FindDCMTK in ITK (untested):
>
> if(NOT DCMTK_FOUND)
>   find_package(DCMTK NO_MODULE QUIET)
> endif()
> if(DCMTK_FOUND)
>   return()
> endif()
>
>Of course the rest of the logic for exports will have to be
>conditional on how DCMTK was found.
>
>-Brad
>_______________________________________________
>Powered by www.kitware.com <http://www.kitware.com>
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://kitware.com/products/protraining.php
>
>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-developers
>
>
>
>
>
>
>
>
>
>--
>+1 919 869 8849 <tel:%2B1%20919%20869%208849>
>
>



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list