Skip to content
Commits on Source (10)
......@@ -35,8 +35,7 @@ jobs:
command: |
sudo apt-get install -y rsync ninja-build ccache
sudo pip install --upgrade pip
sudo pip install scikit-ci-addons
ci_addons circle/install_cmake.py 3.7.2
sudo pip install cmake==3.7.2 scikit-ci-addons
- run:
name: CCache initialization
command: |
......
......@@ -37,9 +37,6 @@ if(NOT ITK_FORBID_DOWNLOADS)
# Data published on Girder
"https://data.kitware.com:443/api/v1/file/hashsum/%(algo)/%(hash)/download"
# Data published on MIDAS
"https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"
# Data published by developers using git-gerrit-push.
"https://itk.org/files/ExternalData/%(algo)/%(hash)"
......
......@@ -331,12 +331,22 @@ macro(itk_module_test)
endmacro()
macro(itk_module_examples)
cmake_dependent_option(Module_${itk-module}_BUILD_EXAMPLES "Build the examples" OFF "BUILD_EXAMPLES" OFF)
set(_build_examples_default OFF)
if(BUILD_EXAMPLES OR ITK_BUILD_EXAMPLES)
set(_build_examples_default ON)
endif()
set(Module_${itk-module}_BUILD_EXAMPLES ${_build_examples_default} CACHE BOOL "Build the examples for Module_${itk-module}")
if(Module_${itk-module}_BUILD_EXAMPLES)
if(ITK_SOURCE_DIR)
# If configuration is done from within ITK,
# point to internal ITKConfig.cmake
set(ITK_DIR ${ITK_BINARY_DIR}/CMakeTmp)
else()
# Ensure that executables get added to the current build tree instead of
# ITK's build tree when building as an external module.
if(CMAKE_RUNTIME_OUTPUT_DIRECTORY STREQUAL "${ITK_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
endif()
endif()
# Adds example subdirectory
add_subdirectory( examples )
......
......@@ -46,10 +46,11 @@ endfunction()
# desired revision and only performs a fetch and checkout if needed.
function(_git_update git_executable git_repository git_tag module_dir)
execute_process(
COMMAND "${git_executable}" rev-parse --verify ${git_tag}
COMMAND "${git_executable}" rev-parse --verify "${git_tag}"
WORKING_DIRECTORY "${module_dir}"
RESULT_VARIABLE error_code
OUTPUT_VARIABLE tag_hash
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(error_code)
message(FATAL_ERROR "Failed to get the hash for tag '${module_dir}'")
......@@ -59,6 +60,7 @@ function(_git_update git_executable git_repository git_tag module_dir)
WORKING_DIRECTORY "${module_dir}"
RESULT_VARIABLE error_code
OUTPUT_VARIABLE head_hash
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(error_code)
message(FATAL_ERROR "Failed to get the hash for ${git_repository} HEAD")
......
......@@ -82,15 +82,15 @@ else()
endif()
set(_fftw_target_version 3.3.4)
set(_fftw_url_md5 "2edab8c06b24feeb3b82bbb3ebf3e7b3")
set(_fftw_url "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=${_fftw_url_md5}&name=fftw-${_fftw_target_version}.tar.gz")
set(_fftw_url_hash "1ee2c7bec3657f6846e63c6dfa71410563830d2b951966bf0123bd8f4f2f5d6b50f13b76d9a7b0eae70e44856f829ca6ceb3d080bb01649d1572c9f3f68e8eb1")
set(_fftw_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_fftw_url_hash}/download")
if(ITK_USE_FFTWF)
itk_download_attempt_check(FFTW)
ExternalProject_add(fftwf
PREFIX fftwf
URL "${_fftw_url}"
URL_MD5 "${_fftw_url_md5}"
URL_HASH SHA512="${_fftw_url_hash}"
DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz"
CONFIGURE_COMMAND
env
......@@ -118,7 +118,7 @@ else()
ExternalProject_add(fftwd
PREFIX fftwd
URL "${_fftw_url}"
URL_MD5 "${_fftw_url_md5}"
URL_HASH SHA512="${_fftw_url_hash}"
DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz"
CONFIGURE_COMMAND
env
......
......@@ -4,6 +4,7 @@ foreach(p
CMP0025 # CMake 3.0
CMP0028
CMP0042 # CMake 3.0
CMP0048
CMP0054 # CMake 3.1
CMP0056 # CMake 3.2
CMP0058 # CMake 3.3
......@@ -14,7 +15,22 @@ foreach(p
endif()
endforeach()
project(ITK NONE)
include(${CMAKE_CURRENT_SOURCE_DIR}/CMake/ITKInitializeBuildType.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH})
# ITK version number components.
set(ITK_VERSION_MAJOR "4")
set(ITK_VERSION_MINOR "13")
set(ITK_VERSION_PATCH "1")
set(ITK_VERSION
"${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
project(ITK
VERSION ${ITK_VERSION}
LANGUAGES CXX C)
set(ITK_CMAKE_DIR "${ITK_SOURCE_DIR}/CMake")
# Configure CMake variables that will be used in the module macros
# ITK_USE_FILE is used when a remote module includes an example directory
# that can be configured as an independent project.
......@@ -197,6 +213,11 @@ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${ITK_REQUIRED_LINK_
if(NOT CMAKE_POSITION_INDEPENDENT_CODE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif()
# Because GoogleTest sets CMAKE_DEBUG_POSTFIX CMake CACHE variable to "d" when it is
# built in debug, we preemptively set it to an empty string to avoid having a postfix
# added to the ITK library names.
set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Generate debug library name with a postfix.")
mark_as_advanced(CMAKE_DEBUG_POSTFIX)
# Setup build locations.
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
......
01b8f1331be6b3f5239509c90e0aeb1a815f40de4bcd2f9cae4a69afbdc011f8311fbfc119e8ee144f7bce333bda7acf2c205ef801f3a3c2eaf718bb5267d359
......@@ -14,7 +14,7 @@ set(ITK_USE_PTHREADS 0)
set(ITK_HP_PTHREADS 0)
if(CMAKE_USE_WIN32_THREADS_INIT)
set(ITK_USE_WIN32_THREADS 1)
elseif(CMAKE_USE_PTHREADS_INIT AND NOT EMSCRIPTEN)
elseif(CMAKE_USE_PTHREADS_INIT)
set(ITK_USE_PTHREADS 1)
elseif(CMAKE_HP_PTHREADS_INIT)
set(ITK_HP_PTHREADS 1)
......
......@@ -116,7 +116,10 @@ void BSplineInterpolationWeightFunction< TCoordRep, VSpaceDimension,
// Find the starting index of the support region
for ( j = 0; j < SpaceDimension; j++ )
{
startIndex[j] = Math::Floor< IndexValueType >(index[j] - static_cast< double >( SplineOrder - 1 ) / 2.0);
// Note that the expression passed to Math::Floor is adapted to work around
// a compiler bug which caused endless compilations (apparently), by
// Visual C++ 2015 Update 3, on 64-bit builds of Release configurations.
startIndex[j] = Math::Floor< IndexValueType >(index[j] + 0.5 - SplineOrder/2.0);
}
// Compute the weights
......
......@@ -79,7 +79,7 @@ protected:
};
#endif // defined(WIN32) || defined(_WIN32)
#ifdef linux
#ifdef __linux__
class ITKCommon_EXPORT LinuxMemoryUsageObserver:public MemoryUsageObserverBase
{
public:
......@@ -87,7 +87,7 @@ public:
virtual ~LinuxMemoryUsageObserver();
virtual MemoryLoadType GetMemoryUsage();
};
#endif // linux
#endif // __linux__
#if defined( __APPLE__ )
class ITKCommon_EXPORT MacOSXMemoryUsageObserver:public MemoryUsageObserverBase
......@@ -143,7 +143,7 @@ public:
class ITKCommon_EXPORT MemoryUsageObserver:
#if defined( WIN32 ) || defined( _WIN32 )
public WindowsMemoryUsageObserver
#elif defined( linux )
#elif defined( __linux__ )
public LinuxMemoryUsageObserver
#elif defined( __SUNPRO_CC ) || defined ( __sun__ )
public SunSolarisMemoryUsageObserver
......
......@@ -42,7 +42,7 @@
#include <stdlib.h>
#endif
#ifdef linux
#ifdef __linux__
#include <fstream>
#include <unistd.h>
#endif
......@@ -270,7 +270,7 @@ WindowsMemoryUsageObserver::GetMemoryUsage()
#endif // WIN32
#if defined(linux)
#if defined(__linux__)
/** ---- Linux Memory Usage Observer ---- */
......
......@@ -47,8 +47,6 @@ ThreadPool
itksys::SystemInformation mySys;
mySys.RunCPUCheck();
mySys.RunOSCheck();
mySys.RunMemoryCheck();
int result = mySys.GetNumberOfPhysicalCPU(); // Avoid using hyperthreading cores.
if( result == -1 )
{
......
......@@ -18,6 +18,13 @@
#include "itkBSplineInterpolationWeightFunction.h"
// Test template instantiation for TCoordRep = float and VSplineOrder = 1.
// Note that this particular template instantiation would take forever to
// compile on VS2015 Update 3 64-bit Release when using ITK 4.13, but
// itkBSplineInterpolationWeightFunction.hxx can now handle this Visual C++
// compiler bug.
template class itk::BSplineInterpolationWeightFunction<float, 2U, 1U>;
/*
* This test exercises methods in the
* BSplineInterpolationWeightFunction class.
......
......@@ -2,19 +2,19 @@ itk_wrap_class("itk::SimpleDataObjectDecorator" POINTER)
itk_wrap_template("${ITKM_D}" "${ITKT_D}")
itk_wrap_template("${ITKM_F}" "${ITKT_F}")
itk_wrap_template("${ITKM_UL}" "${ITKT_UL}")
itk_wrap_template("${ITKM_ULL}" "${ITKT_ULL}")
itk_wrap_template("${ITKM_US}" "${ITKT_US}")
itk_wrap_template("${ITKM_UC}" "${ITKT_UC}")
itk_wrap_template("${ITKM_SL}" "${ITKT_SL}")
itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}")
itk_wrap_template("${ITKM_SS}" "${ITKT_SS}")
itk_wrap_template("${ITKM_SC}" "${ITKT_SC}")
itk_wrap_template("${ITKM_B}" "${ITKT_B}")
itk_wrap_template("${ITKM_AD}" "${ITKT_AD}")
itk_wrap_template("${ITKM_AF}" "${ITKT_AF}")
if(WIN32 AND ITK_USE_64BITS_IDS)
# For ImageToHistogramFilter
itk_wrap_template("${ITKM_AULL}" "${ITKT_AULL}")
else()
itk_wrap_template("${ITKM_AUL}" "${ITKT_AUL}")
endif()
# non scalar types
foreach(t ${WRAP_ITK_VECTOR})
foreach(d ${ITK_WRAP_VECTOR_COMPONENTS})
......
......@@ -9,11 +9,13 @@ itk_wrap_class("vnl_c_vector" EXPLICIT_SPECIALIZATION)
itk_wrap_template("${ITKM_F}" "${ITKT_F}")
itk_wrap_template("${ITKM_SI}" "${ITKT_SI}")
itk_wrap_template("${ITKM_SL}" "${ITKT_SL}")
itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}")
itk_wrap_template("${ITKM_LD}" "${ITKT_LD}")
itk_wrap_template("${ITKM_SC}" "${ITKT_SC}")
itk_wrap_template("${ITKM_UC}" "un${ITKT_SC}")
itk_wrap_template("${ITKM_UI}" "un${ITKT_SI}")
itk_wrap_template("${ITKM_UL}" "un${ITKT_SL}")
itk_wrap_template("${ITKM_ULL}" "un${ITKT_SLL}")
foreach(t ${WRAP_ITK_COMPLEX_REAL})
itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
endforeach()
......
......@@ -10,11 +10,13 @@ itk_wrap_class("vnl_matrix" EXPLICIT_SPECIALIZATION)
itk_wrap_template("${ITKM_F}" "${ITKT_F}")
itk_wrap_template("${ITKM_SI}" "${ITKT_SI}")
itk_wrap_template("${ITKM_SL}" "${ITKT_SL}")
itk_wrap_template("${ITKM_SLL}" "${ITKT_SLL}")
itk_wrap_template("${ITKM_LD}" "${ITKT_LD}")
itk_wrap_template("${ITKM_SC}" "${ITKT_SC}")
itk_wrap_template("${ITKM_UC}" "un${ITKT_SC}")
itk_wrap_template("${ITKM_UI}" "un${ITKT_SI}")
itk_wrap_template("${ITKM_UL}" "un${ITKT_SL}")
itk_wrap_template("${ITKM_ULL}" "un${ITKT_SLL}")
itk_wrap_template("${ITKM_SS}" "${ITKT_SS}")
itk_wrap_template("${ITKM_US}" "${ITKT_US}")
foreach(t ${WRAP_ITK_COMPLEX_REAL})
......
......@@ -6,7 +6,7 @@ itk_wrap_include("vnl/vnl_matrix.h")
itk_wrap_include("vnl/vnl_vector.h")
itk_wrap_class("vnl_vector" EXPLICIT_SPECIALIZATION)
UNIQUE(vector_types "D;F;SI;SL;LD;SC;UC;US;UI;UL;${ITKM_IT};${ITKM_OT};${WRAP_ITK_SCALAR}")
UNIQUE(vector_types "D;F;SI;SL;SLL;LD;SC;UC;US;UI;UL;ULL;${ITKM_IT};${ITKM_OT};${WRAP_ITK_SCALAR}")
foreach(t ${vector_types})
itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
endforeach()
......
......@@ -4,7 +4,7 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
itk_wrap_include("vnl/vnl_vector_ref.h")
itk_wrap_class("vnl_vector_ref" EXPLICIT_SPECIALIZATION)
UNIQUE(vector_types "D;F;SI;SL;LD;SC;UC;US;UI;UL;${WRAP_ITK_SCALAR}")
UNIQUE(vector_types "D;F;SI;SL;SLL;LD;SC;UC;US;UI;UL;ULL;${WRAP_ITK_SCALAR}")
foreach(t ${vector_types})
itk_wrap_template("${ITKM_${t}}" "${ITKT_${t}}")
endforeach()
......
......@@ -134,7 +134,7 @@ Euler3DTransform<TParametersValueType>
// array, we ignore the returned data and add the additional
// information to the updated array.
Superclass::GetFixedParameters();
this->m_FixedParameters[3] = this-> m_ComputeZYX;
this->m_FixedParameters[3] = this->m_ComputeZYX ? 1.0 : 0.0;
return this->m_FixedParameters;
}
......@@ -155,7 +155,7 @@ Euler3DTransform<TParametersValueType>
if( parameters.Size() == 4 )
{
this->m_FixedParameters[3] = parameters[3];
this->SetComputeZYX(this->m_FixedParameters[3]);
this->SetComputeZYX(this->m_FixedParameters[3] != 0.0);
}
}
......
itk_wrap_class("itk::BSplineBaseTransform" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
itk_wrap_template("${ITKM_D}${d}${d}" "${ITKT_D},${d},${d}")
itk_wrap_template("${ITKM_D}${d}3" "${ITKT_D},${d},3")
endforeach()
itk_end_wrap_class()