# How to disable particular default module

**URL:** https://discourse.itk.org/t/how-to-disable-particular-default-module/1840
**Category:** Beginner Questions
**Created:** [May 6, 2019, 1:58am UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840 "2019-05-06T01:58:17Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mihail.isakov](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@mihail.isakov](https://discourse.itk.org/u/mihail.isakov)
#### Post date: [May 6, 2019, 1:58am UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/1 "2019-05-06T01:58:17Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![fbudin](https://discourse.itk.org/user_avatar/discourse.itk.org/fbudin/32/14_2.png) [@fbudin](https://discourse.itk.org/u/fbudin)
#### Post date: [May 6, 2019, 12:36pm UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/2 "2019-05-06T12:36:45Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [May 6, 2019, 2:08pm UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/3 "2019-05-06T14:08:33Z")

</div>

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

---

<div class="post-metadata">

### Author: ![mihail.isakov](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@mihail.isakov](https://discourse.itk.org/u/mihail.isakov)
#### Post date: [May 8, 2019, 11:01am UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/4 "2019-05-08T11:01:52Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![phcerdan](https://discourse.itk.org/user_avatar/discourse.itk.org/phcerdan/32/286_2.png) [@phcerdan](https://discourse.itk.org/u/phcerdan)
#### Post date: [May 8, 2019, 12:54pm UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/5 "2019-05-08T12:54:38Z")

</div>

It is [a module](https://github.com/InsightSoftwareConsortium/ITK/blob/bcd84009f1bcad2dc5baeae5798ae267f4cff644/Modules/IO/GDCM/itk-module.cmake). 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

---

<div class="post-metadata">

### Author: ![mihail.isakov](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@mihail.isakov](https://discourse.itk.org/u/mihail.isakov)
#### Post date: [May 8, 2019, 1:21pm UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/6 "2019-05-08T13:21:53Z")

</div>

-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

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [May 8, 2019, 1:24pm UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/7 "2019-05-08T13:24:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![phcerdan](https://discourse.itk.org/user_avatar/discourse.itk.org/phcerdan/32/286_2.png) [@phcerdan](https://discourse.itk.org/u/phcerdan)
#### Post date: [May 8, 2019, 1:35pm UTC](https://discourse.itk.org/t/how-to-disable-particular-default-module/1840/8 "2019-05-08T13:35:44Z")

</div>

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

(correcting the top post too)
