Skip to content
Commits on Source (6)
......@@ -138,6 +138,7 @@ if(APPLE)
${CTEST_CUSTOM_WARNING_EXCEPTION}
"warning -.: directory name .* does not exist"
"ld.*warning.*duplicate dylib.*"
"ld: warning: text-based stub file /System/Library/Frameworks/.*Falling back to library file for linking."
)
endif()
......
......@@ -316,6 +316,8 @@ foreach(itk-module ${ITK_MODULES_ENABLED})
init_module_vars()
endif()
include("${${itk-module}_SOURCE_DIR}/itk-module-init.cmake" OPTIONAL)
# Set CMP0048 to new in all modules
set(CMAKE_POLICY_DEFAULT_CMP0048 "NEW")
add_subdirectory("${${itk-module}_SOURCE_DIR}" "${${itk-module}_BINARY_DIR}")
endforeach()
......
......@@ -21,6 +21,10 @@
include(ITK_CheckCCompilerFlag)
include(ITK_CheckCXXCompilerFlag)
if(NOT CMAKE_VERSION VERSION_LESS 3.14.0)
include(CheckPIESupported)
check_pie_supported()
endif()
function(check_c_compiler_warning_flags c_flag_var)
set(local_c_flags "")
......
......@@ -90,7 +90,7 @@ else()
ExternalProject_add(fftwf
PREFIX fftwf
URL "${_fftw_url}"
URL_HASH SHA512="${_fftw_url_hash}"
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_HASH SHA512="${_fftw_url_hash}"
URL_HASH SHA512=${_fftw_url_hash}
DOWNLOAD_NAME "fftw-${_fftw_target_version}.tar.gz"
CONFIGURE_COMMAND
env
......
......@@ -9,6 +9,7 @@ foreach(p
CMP0056 # CMake 3.2
CMP0058 # CMake 3.3
CMP0063 # CMake 3.3.2
CMP0083 # CMake 3.14.0
)
if(POLICY ${p})
cmake_policy(SET ${p} NEW)
......@@ -22,7 +23,7 @@ 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_PATCH "2")
set(ITK_VERSION
"${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_PATCH}")
project(ITK
......@@ -98,10 +99,6 @@ include(itkCheckSourceTree)
set(main_project_name ${_ITKModuleMacros_DEFAULT_LABEL})
#-----------------------------------------------------------------------------
# ITK version number.
set(ITK_VERSION_MAJOR "4")
set(ITK_VERSION_MINOR "13")
set(ITK_VERSION_PATCH "0")
configure_file(CMake/ITKConfigVersion.cmake.in ITKConfigVersion.cmake @ONLY)
if(NOT ITK_INSTALL_RUNTIME_DIR)
......
01b8f1331be6b3f5239509c90e0aeb1a815f40de4bcd2f9cae4a69afbdc011f8311fbfc119e8ee144f7bce333bda7acf2c205ef801f3a3c2eaf718bb5267d359
......@@ -252,6 +252,8 @@ namespace itk
#define ITK_HAS_CPP11_ALIGNAS error "Replace ITK_HAS_CPP11_ALIGNAS with ITK_COMPILER_CXX_ALIGNAS"
#endif
// A macro for methods which are const in ITKv5, but not in ITKv4
#define ITKv5_CONST
#if ITK_COMPILER_CXX_CONSTEXPR
#define ITK_CONSTEXPR_FUNC constexpr
......
......@@ -151,8 +151,8 @@ protected:
void PrintJSONvar(std::ostream & os, const char* varName, T varValue,
unsigned indent = 4, bool comma = true);
/** Get System information */
virtual void GetSystemInformation();
/** Obsolete member function from ITK 4.8 - 4.13. Does not do anything anymore. */
itkLegacyMacro(virtual void GetSystemInformation());
private:
......@@ -174,22 +174,6 @@ private:
std::string m_TypeString;
std::string m_UnitString;
std::string m_SystemName;
std::string m_ProcessorName;
int m_ProcessorCacheSize;
float m_ProcessorClockFrequency;
unsigned int m_NumberOfPhysicalCPU;
unsigned int m_NumberOfLogicalCPU;
std::string m_OSName;
std::string m_OSRelease;
std::string m_OSVersion;
std::string m_OSPlatform;
bool m_Is64Bits;
std::string m_ITKVersion;
size_t m_TotalVirtualMemory;
size_t m_AvailableVirtualMemory;
size_t m_TotalPhysicalMemory;
size_t m_AvailablePhysicalMemory;
static ITK_CONSTEXPR_VAR unsigned int tabwidth = 15;
};
......
......@@ -49,7 +49,6 @@ ResourceProbe< ValueType, MeanType >
::ResourceProbe(const std::string & type, const std::string & unit):
m_TypeString(type), m_UnitString(unit)
{
this->GetSystemInformation();
this->Reset();
}
......@@ -261,30 +260,35 @@ void
ResourceProbe< ValueType, MeanType >
::PrintSystemInformation(std::ostream & os)
{
os << "System: " << m_SystemName << std::endl;
os << "Processor: " << m_ProcessorName << std::endl;
os << " Cache: " << m_ProcessorCacheSize << std::endl;
os << " Clock: " << m_ProcessorClockFrequency << std::endl;
os << " Physical CPUs: " << m_NumberOfPhysicalCPU << std::endl;
os << " Logical CPUs: " << m_NumberOfLogicalCPU << std::endl;
// Retrieve memory information in megabyte.
itksys::SystemInformation systeminfo;
systeminfo.RunCPUCheck();
systeminfo.RunMemoryCheck();
systeminfo.RunOSCheck();
os << "System: " << systeminfo.GetHostname() << std::endl;
os << "Processor: " << systeminfo.GetExtendedProcessorName() << std::endl;
os << " Cache: " << systeminfo.GetProcessorCacheSize() << std::endl;
os << " Clock: " << systeminfo.GetProcessorClockFrequency() << std::endl;
os << " Physical CPUs: " << systeminfo.GetNumberOfPhysicalCPU() << std::endl;
os << " Logical CPUs: " << systeminfo.GetNumberOfLogicalCPU() << std::endl;
// Retrieve memory information in mebibytes.
os << " Virtual Memory: Total: "
<< std::left << std::setw( tabwidth ) << m_TotalVirtualMemory
<<" Available: "<< m_AvailableVirtualMemory << std::endl;
<< std::left << std::setw( tabwidth ) << systeminfo.GetTotalVirtualMemory()
<<" Available: "<< systeminfo.GetAvailableVirtualMemory() << std::endl;
os << " Physical Memory: Total: "
<< std::left << std::setw( tabwidth ) << m_TotalPhysicalMemory
<<" Available: "<< m_AvailablePhysicalMemory << std::endl;
<< std::left << std::setw( tabwidth ) << systeminfo.GetTotalPhysicalMemory()
<<" Available: "<< systeminfo.GetAvailablePhysicalMemory() << std::endl;
os << "OSName: "<< m_OSName << std::endl;
os << " Release: "<< m_OSRelease << std::endl;
os << " Version: "<< m_OSVersion << std::endl;
os << " Platform: "<< m_OSPlatform << std::endl;
os << "OSName: "<< systeminfo.GetOSName() << std::endl;
os << " Release: "<< systeminfo.GetOSRelease() << std::endl;
os << " Version: "<< systeminfo.GetOSVersion() << std::endl;
os << " Platform: "<< systeminfo.GetOSPlatform() << std::endl;
os << " Operating System is "
<< (m_Is64Bits?"64 bit":"32 bit") << std::endl;
<< (systeminfo.Is64Bits()?"64 bit":"32 bit") << std::endl;
os << "ITK Version: "
<< m_ITKVersion << std::endl;
<< ITK_VERSION_STRING << "." << ITK_VERSION_PATCH << std::endl;
}
......@@ -574,66 +578,52 @@ void
ResourceProbe< ValueType, MeanType >
::PrintJSONSystemInformation(std::ostream & os)
{
itksys::SystemInformation systeminfo;
systeminfo.RunCPUCheck();
systeminfo.RunMemoryCheck();
systeminfo.RunOSCheck();
os << "{\n";
PrintJSONvar(os, "System", m_SystemName);
PrintJSONvar(os, "System", systeminfo.GetHostname());
os << " \"Processor\" :{\n";
PrintJSONvar(os, "Name", m_ProcessorName, 6);
PrintJSONvar(os, "Cache", m_ProcessorCacheSize, 6);
PrintJSONvar(os, "Clock", m_ProcessorClockFrequency, 6);
PrintJSONvar(os, "Physical CPUs", m_NumberOfPhysicalCPU, 6);
PrintJSONvar(os, "Logical CPUs", m_NumberOfLogicalCPU, 6);
PrintJSONvar(os, "Virtual Memory Total", m_TotalVirtualMemory, 6);
PrintJSONvar(os, "Virtual Memory Available", m_AvailableVirtualMemory, 6);
PrintJSONvar(os, "Physical Memory Total", m_TotalPhysicalMemory, 6);
PrintJSONvar(os, "Physical Memory Available", m_AvailablePhysicalMemory, 6, false);
PrintJSONvar(os, "Name", systeminfo.GetExtendedProcessorName(), 6);
PrintJSONvar(os, "Cache", systeminfo.GetProcessorCacheSize(), 6);
PrintJSONvar(os, "Clock", systeminfo.GetProcessorClockFrequency(), 6);
PrintJSONvar(os, "Physical CPUs", systeminfo.GetNumberOfPhysicalCPU(), 6);
PrintJSONvar(os, "Logical CPUs", systeminfo.GetNumberOfLogicalCPU(), 6);
PrintJSONvar(os, "Virtual Memory Total", systeminfo.GetTotalVirtualMemory(), 6);
PrintJSONvar(os, "Virtual Memory Available", systeminfo.GetAvailableVirtualMemory(), 6);
PrintJSONvar(os, "Physical Memory Total", systeminfo.GetTotalPhysicalMemory(), 6);
PrintJSONvar(os, "Physical Memory Available", systeminfo.GetAvailablePhysicalMemory(), 6, false);
os << " },\n";
os << " \"OperatingSystem\" :{\n";
PrintJSONvar(os, "Name", m_OSName, 6);
PrintJSONvar(os, "Release", m_OSRelease, 6);
PrintJSONvar(os, "Version", m_OSVersion, 6);
PrintJSONvar(os, "Platform", m_OSPlatform, 6);
PrintJSONvar(os, "Bitness", (m_Is64Bits ? "64 bit" : "32 bit"), 6, false);
PrintJSONvar(os, "Name", systeminfo.GetOSName(), 6);
PrintJSONvar(os, "Release", systeminfo.GetOSRelease(), 6);
PrintJSONvar(os, "Version", systeminfo.GetOSVersion(), 6);
PrintJSONvar(os, "Platform", systeminfo.GetOSPlatform(), 6);
PrintJSONvar(os, "Bitness", (systeminfo.Is64Bits() ? "64 bit" : "32 bit"), 6, false);
os << " },\n";
PrintJSONvar(os, "ITKVersion", m_ITKVersion, 4, false);
std::ostringstream itkVersionStringStream;
itkVersionStringStream << ITK_VERSION_STRING << "." << ITK_VERSION_PATCH;
PrintJSONvar(os, "ITKVersion", itkVersionStringStream.str(), 4, false);
os << " }";
}
// This protected member function that was introduced with ITK 4.8 has been deprecated
// as of ITK 5.0. Please do not call or override this member function.
#if !defined(ITK_LEGACY_REMOVE)
template< typename ValueType, typename MeanType >
void
ResourceProbe< ValueType, MeanType >
::GetSystemInformation()
{
itksys::SystemInformation systeminfo;
systeminfo.RunCPUCheck();
systeminfo.RunMemoryCheck();
systeminfo.RunOSCheck();
m_SystemName = systeminfo.GetHostname();
m_ProcessorName = systeminfo.GetExtendedProcessorName();
m_ProcessorCacheSize = systeminfo.GetProcessorCacheSize();
m_ProcessorClockFrequency = systeminfo.GetProcessorClockFrequency();
m_NumberOfPhysicalCPU = systeminfo.GetNumberOfPhysicalCPU();
m_NumberOfLogicalCPU = systeminfo.GetNumberOfLogicalCPU();
m_OSName = systeminfo.GetOSName();
m_OSRelease = systeminfo.GetOSRelease();
m_OSVersion = systeminfo.GetOSVersion();
m_OSPlatform = systeminfo.GetOSPlatform();
m_Is64Bits = systeminfo.Is64Bits();
std::ostringstream itkversion;
itkversion << ITK_VERSION_MAJOR << "." << ITK_VERSION_MINOR << "." << ITK_VERSION_PATCH;
m_ITKVersion = itkversion.str();
// Retrieve memory information in megabyte.
m_TotalVirtualMemory = systeminfo.GetTotalVirtualMemory();
m_AvailableVirtualMemory = systeminfo.GetAvailableVirtualMemory();
m_TotalPhysicalMemory = systeminfo.GetTotalPhysicalMemory();
m_AvailablePhysicalMemory = systeminfo.GetAvailablePhysicalMemory();
}
#endif
} // end namespace itk
......
......@@ -369,6 +369,27 @@ BSplineTransform<TParametersValueType, NDimensions, VSplineOrder>
this->m_CoefficientImages[i]->SetRegions(
this->m_CoefficientImages[0]->GetLargestPossibleRegion() );
}
// Update TransformDomain parameters.
this->m_TransformDomainDirection = this->m_CoefficientImages[0]->GetDirection();
typedef typename ImageType::PointType PointType;
PointType origin2;
origin2.Fill( 0.0 );
for( unsigned int i = 0; i < SpaceDimension; i++ )
{
this->m_TransformDomainMeshSize[i] =
this->m_CoefficientImages[0]->GetLargestPossibleRegion().GetSize()[i] - SplineOrder;
this->m_TransformDomainPhysicalDimensions[i] = static_cast<ScalarType>(
this->m_TransformDomainMeshSize[i] ) * this->m_CoefficientImages[0]->GetSpacing()[i];
origin2[i] += ( this->m_CoefficientImages[0]->GetSpacing()[i] * 0.5 * ( SplineOrder - 1 ) );
}
origin2 = this->m_TransformDomainDirection * origin2;
for( unsigned int j = 0; j < SpaceDimension; j++ )
{
this->m_TransformDomainOrigin[j] = this->m_CoefficientImages[0]->GetOrigin()[j] + origin2[j];
}
}
template<typename TParametersValueType, unsigned int NDimensions, unsigned int VSplineOrder>
......@@ -386,6 +407,9 @@ BSplineTransform<TParametersValueType, NDimensions, VSplineOrder>
if( validArrayOfImages )
{
typedef typename ImageType::PointType PointType;
this->m_TransformDomainDirection = images[0]->GetDirection();
PointType origin;
origin.Fill( 0.0 );
for( unsigned int i = 0; i < SpaceDimension; i++ )
......
91b22b2245c27caf0a12e7dc1a25d105d93779d5c4a317d62d0bf2b512fc5aec61b70c663e1dcfed4b984077d06dbad3bd8c08e3d0f3cc5822bac8635678c511
caae460e658f46c39b87fb365b9252955b0acce7fbb73727a719d40b0d89e181f42087dc6fff73ac6850478741e32c59e6b23a8026d82c1e37e26d3e9dd9744e
30e8d443c796e07feb3c22255478e0c934bcaaaed07d88efddad7671e99e7908d10e40524b3657fc0ffd399f10d11b58912b569fcd3bc0c46677cab66eef78bc
96e55cb9da8750570828d5fc0e4b8f1839f13e00d286dd0e2f415b62e6e3b8ae9524afde4e9daad38821d037a19ec118c3428497b36ad066e307540d1abf19a9
120130b1d131273469536b0b12c08fe719c555abf74e8978818efeb5baa07208dbdf88921da0f0cff6c3a7838a6f0a89be7482a293ecd846bcb4eaf2a07bfdaf
120130b1d131273469536b0b12c08fe719c555abf74e8978818efeb5baa07208dbdf88921da0f0cff6c3a7838a6f0a89be7482a293ecd846bcb4eaf2a07bfdaf
1360dccaaf243d274c767cab40c19084142819b60b359e0db06a27ca72f0572d0a45e02d98615934019a62628bd0e2c017656af94aea7ea4f8e3e0592f722a53
22cce0e1a67ce64fca6760c0b5ee2ecc411d0b809a4f00a9777018a6fb1c1ddf9b66991047ddf52cf1025f51b1f318a972ab37d1857e9a6db0fdc702b047764f
1e8056facbba9e4c6e5d7e1bd5cf4835a032edc1b14e2c3e2be142e0103a819909112e58771698f0b011e231d9ac430561ae8eae222de8cc33db22e7868bd436
e5a5a4616f5f128020246723bee28d0c66f5d0cd62541b93d0446deb321947161d9fddff6635384a862ac94c6257a4ada677e234af5b92b38d1a7dde8c40a3e1