You can specify the specific module you need. For example:

set(ITK_IO_MODULES_USED "ITKIONRRD;ITKIOPNG;ITKIONIFTI")
find_package(ITK COMPONENTS
  ITKCommon
  ITKIOImageBase
  ITKImageGrid
  ITKImageStatistics
  ITKVtkGlue
  ${ITK_IO_MODULES_USED}
)
include(${ITK_USE_FILE})


AND
you can find the modules used by your app with
ITK/Utilities/Maintenance/WhatModulesITK.py

On Tue, Sep 15, 2015 at 12:02 PM, Mathieu Malaterre
<[email protected]> wrote:
> Hi Brad,
>
> ITK_USE_SYSTEM_GDCM is not an option for me. I am given an already
> compiled ITK version (statically if that matters).
>
> I understand now the need for GDCM deep down in the build settings. I
> think I should be able to tweak `include(${ITK_USE_FILE})` to remove
> automatic io factory registration and drop "*GDCM*" from
> ${ITK_LIBRARIES}.
>
> Will let you know how it goes. Thanks for your help.
>
> -M
>
> On Fri, Sep 4, 2015 at 9:21 PM, Bradley Lowekamp <[email protected]> 
> wrote:
>> Hello,
>>
>> Have you looking into "ITK_USE_SYSTEM_GDCM", this should allow ITK to use 
>> the same version of GDCM that the rest of your application is?
>>
>> For the modular build, have you looked into disabling "BUILD_TESTING"? Also 
>> please keep in mind that the a module's status is cached in CMake. So you 
>> must start with a fresh directory then configure from the command line which 
>> modules are on and off.
>>
>> Many ImageIOs are needed to do testing [1], supporting DICOM and DICOM 
>> metadata are of core importance for ITK, so we do test with it in many 
>> places.The modularization works really good without the ITK testing enabled. 
>> But the interdependency of testing that everything works does enable most 
>> modules.
>>
>> HTH,
>> Brad
>>
>> [1] 
>> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/TestKernel/itk-module.cmake
>>
>> On Sep 4, 2015, at 3:55 AM, Mathieu Malaterre <[email protected]> 
>> wrote:
>>
>>> Dear all,
>>>
>>> My goal is to be able to compile ITK without the GDCM module.
>>>
>>> Long story short, GDCM toolkit is not being mangled, which means very
>>> complex build setup to be able to use GDCM and ITK in an application.
>>>
>>> So far I have tried setting:
>>>
>>> Module_ITKIOGDCM:INTERNAL=OFF
>>>
>>> with no luck
>>>
>>> I suspect that GDCM is activated by ITK_BUILD_DEFAULT_MODULES, so I tried:
>>>
>>> $ cmake -DITK_BUILD_DEFAULT_MODULES:BOOL=OFF
>>>
>>> this leads to:
>>>
>>> -- Check if the system is big endian - little endian
>>> CMake Error at Examples/CMakeLists.txt:2 (message):
>>>  BUILD_EXAMPLES requires ITK_BUILD_DEFAULT_MODULES to be ON
>>>
>>>
>>> -- Configuring incomplete, errors occurred!
>>>
>>>
>>> Later I tried:
>>>
>>> $ cmake -DITK_BUILD_DEFAULT_MODULES:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF ..
>>>
>>> which states:
>>>
>>> -- Enabled ITKIOGDCM, needed by [ITKTestKernel].
>>> and
>>> -- Enabled ITKTestKernel, needed by [ITKGroup_Core].
>>>
>>>
>>> However I do not want to set -DITKGroup_Core:BOOL=OFF (obvisouly).
>>>
>>> Is there any particular reason to have GDCM be part of the core group ?
>>>
>>>
>>>
>>> Thanks,
>>> --
>>> Mathieu
>>> _______________________________________________
>>> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers
>>
>
>
>
> --
> Mathieu
> _______________________________________________
> Powered by 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://public.kitware.com/mailman/listinfo/insight-developers



-- 
Unpaid intern in BillsBasement at noware dot com
_______________________________________________
Powered by 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://public.kitware.com/mailman/listinfo/insight-developers

Reply via email to