# proper dir. structure for ITK installation on VS

**URL:** <https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491>\
**Category:** Beginner Questions\
**Created:** [December 6, 2017, 3:35pm UTC](https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491 "2017-12-06T15:35:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![siddys](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@siddys](https://discourse.itk.org/u/siddys)\
**Post date:** [December 6, 2017, 3:35pm UTC](https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491/1 "2017-12-06T15:35:58Z")

</div>

Hi everyone, I am posting as a newbie since I am using ITK on a windows environment for the first  
time, and due to restrictions on binary installation in my workplace, I am trying to install ITK by compiling from source.  
Regarding this, I have a few questions, and would be happy to get some help on this matter.

1. After configure and generate, which solution should be built for a proper install: BUILD\_ALL, or INSTALL?
2. After a error free compilation, what should the proper directory structure look like? I git the source in dir (say) c:\TKit\ITK,  
what should be the proper level of the build directory?
3. There are some components that fail, specially in the thirdparty directory, most frequently, gdcm\* related and openjpeg. How can I ensure that these work?  
Thanks, and any additional comments would help too…

---

<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:** [December 6, 2017, 4:39pm UTC](https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491/2 "2017-12-06T16:39:32Z")

</div>

You should build BUILD\_ALL. If you don’t plan on doing any debugging, you could “build” INSTALL (which copies headers and libraries into install prefix, C:\Program Files\ by default) and the remove the source and build folders.

If you check out the sources to `c:\TKit\ITK`, you could put the build directory to `c:\TKit\ITK-build`, or `c:\TKit\ITK\build`, or `c:\TKit\ITK-vs2017x64` etc.

What do you mean by “fail”? Using the most recent (stable or master) ITK version usually helps, in terms of less bugs present.

---

<div class="post-metadata">

**Author:** ![siddys](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@siddys](https://discourse.itk.org/u/siddys)\
**Post date:** [December 8, 2017, 3:28pm UTC](https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491/3 "2017-12-08T15:28:06Z")

</div>

Thanks for your reply.  
By Fail, I mean that the “Configure” step fails with errors on finding the required CMake files  
for some thirdparty components, specially gdcm\*

---

<div class="post-metadata">

**Author:** ![siddys](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@siddys](https://discourse.itk.org/u/siddys)\
**Post date:** [December 8, 2017, 9:13pm UTC](https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491/4 "2017-12-08T21:13:00Z")

</div>

Since I had already started the INSTALL, I did not want to interrupt the process (I have to  
do this over a shared network drive due to institutional policies, and this takes a while…).  
The process finally finished last night, and I found the following in the ITKBin\lib  
folder. Is it normal that all the libraries have the 4.13 postfix? Do you think that if i  
do the “ALL\_BUILD”, the final lib.s will be stripped of this extension ? It has been a  
while (~ 3 years) since I last used ITK and I do not remember the libraries having any version  
extension on them.  
Thanks,  
Sid.

12/07/2017 03:46 PM 117,376 ITKPolynomials-4.13.lib  
12/07/2017 03:44 PM 40,586 ITKBiasCorrection-4.13.lib  
12/07/2017 03:46 PM 390,644 ITKBioCell-4.13.lib  
12/07/2017 02:42 PM 1,837,888 ITKDICOMParser-4.13.lib  
12/07/2017 03:37 PM 959,712 ITKIOXML-4.13.lib  
12/07/2017 03:46 PM 1,066,042 ITKIOSpatialObjects-4.13.lib  
12/07/2017 04:05 PM 5,897,380 ITKFEM-4.13.lib  
12/07/2017 02:40 PM 519,344 ITKgiftiio-4.13.lib  
12/07/2017 03:44 PM 4,802,588 ITKIOMesh-4.13.lib  
12/07/2017 12:11 PM 2,581 libhdf5.settings  
12/07/2017 02:38 PM 7,544,094 libitkhdf5.lib  
12/07/2017 02:39 PM 2,159,098 libitkhdf5\_cpp.lib  
12/07/2017 03:45 PM 271,844 ITKIOBioRad-4.13.lib  
12/07/2017 03:46 PM 699,028 ITKIOBruker-4.13.lib  
12/07/2017 03:46 PM 208,622 ITKIOCSV-4.13.lib  
12/07/2017 03:35 PM 362,568 ITKIOIPL-4.13.lib  
12/07/2017 03:44 PM 609,236 ITKIOGE-4.13.lib  
12/07/2017 03:39 PM 187,284 ITKIOSiemens-4.13.lib  
12/07/2017 03:42 PM 1,045,682 ITKIOHDF5-4.13.lib  
12/07/2017 03:45 PM 183,946 ITKIOLSM-4.13.lib  
12/07/2017 02:41 PM 1,048,094 itkminc2-4.13.lib  
11/29/2017 12:02 PM 359 UseitkLIBMINC.cmake  
12/07/2017 12:14 PM 1,238 itkLIBMINCConfig.cmake  
12/07/2017 03:41 PM 368,322 ITKIOMINC-4.13.lib  
12/07/2017 03:40 PM 447,136 ITKIOMRC-4.13.lib  
12/07/2017 03:47 PM 302,202 ITKIOStimulate-4.13.lib  
12/07/2017 03:35 PM 22,009,272 ITKTransformFactory-4.13.lib  
12/07/2017 03:37 PM 1,769,626 ITKIOTransformBase-4.13.lib  
12/07/2017 03:46 PM 535,232 ITKIOTransformHDF5-4.13.lib

---

<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:** [December 8, 2017, 9:46pm UTC](https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491/5 "2017-12-08T21:46:42Z")

</div>

The libraries will always have their version number as a suffix. You should not worry about it as the easiest way to use ITK in your project is to use CMake and CMake will manage all of the details for you. You simply have to call `find_package(ITK REQUIRED)` and also probably `include(${ITK_USE_FILE})`.

---

<div class="post-metadata">

**Author:** ![siddys](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/ea5d25/32.png) [@siddys](https://discourse.itk.org/u/siddys)\
**Post date:** [December 9, 2017, 1:05am UTC](https://discourse.itk.org/t/proper-dir-structure-for-itk-installation-on-vs/491/6 "2017-12-09T01:05:02Z")

</div>

ah yes, indeed… thanks for this.
