How to disable particular default module

Hello,
I would like disable some default modules, specially GDCM / GDCMIO, in my application i use own stuff for DICOM and also GDCM-clone library, so i don’t need the module.
Is it possible with some command line argument? Tried in cmake-gui, but it was somewhat complicated, many click are required, i need this for 4 builds.
Thanks.

Hi Mihail,

You have to first disable ITK_BUILD_DEFAULT_MODULES. Then you will see the modules and groups that you can enable or disable based on your needs.

Francois

1 Like

You can also enable ITK_USE_SYSTEM_GDCM and other ITK_USE_SYSTEM_* options and provide path to your versions of those libraries.

1 Like

Thanks, i used ITK_USE_SYSTEM_GDCM earlier, don’t want, i use another DICOM IO. I am surprised how difficult is to get rid of it. In the past, in earlier v4 versions it was possible, i remember, there were options, now there is no option, even if “default modules off” is set, now it is not a module, it is hard-coded as dependency, mostly for testing stuff. Could remove only with destructive editing.

It is a module. Have you tried setting the CMake options (in the terminal):
-DModule_ITKGDCM:BOOL=OFF
-DModule_ITKIOGDCM:BOOL=OFF

or maybe you just want to get rid off the IO with the second option.

If you have your own clone/version of GDCM, you can point to that one with the ITK_USE_SYSTEM_GDCM and then disable the IO module if not interested.

Hope it helps

1 Like

-DModule_ITKGDCM:BOOL=OFF -DModule_ITKGDCMIO:BOOL=OFF

Thank you! Tried. May be it will work, not sure, shall look closer, currently GDCM was build with all dependencies i don’t want: openjpeg, socketxx, charls, jpeg

<…>
– Configuring done
– Generating done
CMake Warning:
Manually-specified variables were not used by the project:

Module_ITKGDCMIO

– Build files have been written to: /home/r/itk/bITK
r@deb:~/itk/bITK$ make
<…>
[ 41%] Built target gdcmsocketxx
[ 42%] Built target gdcmCommon
[ 44%] Built target gdcmDSED
[ 45%] Built target gdcmIOD
[ 46%] Built target gdcmDICT
[ 47%] Built target itkgdcmopenjp2
[ 47%] Built target gdcmcharls
[ 47%] Built target gdcmuuid
[ 50%] Built target gdcmjpeg8
[ 53%] Built target gdcmjpeg12
[ 56%] Built target gdcmjpeg16
[ 61%] Built target gdcmMSFF
[ 64%] Built target gdcmMEXD
<…>
[ 81%] Built target ITKIOGDCM
[ 81%] Built target ITKIOGDCM-all

GDCM might be requested by one of its dependencies. When configuring ITK, there is a list of all enabled modules along with the explanation what module/option requires it. For example Enabled ITKGDCM, requested by ITK_BUILD_DEFAULT_MODULES. Look for what is requesting GDCM for you.

2 Likes

Oh, the IO module name is the other way around, sorry! Try:
-DModule_ITKIOGDCM:BOOL=OFF

(correcting the top post too)

2 Likes