proper dir. structure for ITK installation on VS

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…

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.

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*

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.

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

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}).

1 Like

ah yes, indeed… thanks for this.