From ad077cc35fe5207f8f336dd13ccae5ee47dc4752 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 5 Nov 2018 14:54:56 -0500 Subject: [PATCH 1/2] COMP: Remove vcl_complex.h from Python builds Change-Id: Id948fe1f110d276e3e17f55b75bbb379e31c1bb4 --- Modules/Core/Common/wrapping/vnl_c_vector.wrap | 2 +- Modules/Core/Common/wrapping/vnl_diag_matrix.wrap | 2 +- Modules/Core/Common/wrapping/vnl_matrix.wrap | 2 +- Modules/Core/Common/wrapping/vnl_vector.wrap | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Modules/Core/Common/wrapping/vnl_c_vector.wrap b/Modules/Core/Common/wrapping/vnl_c_vector.wrap index fac4fe706bf..47d104b071e 100644 --- a/Modules/Core/Common/wrapping/vnl_c_vector.wrap +++ b/Modules/Core/Common/wrapping/vnl_c_vector.wrap @@ -1,7 +1,7 @@ # auto include feature must be disable because the class is not in the file # with the same name set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) -itk_wrap_include("vcl_complex.h") +itk_wrap_include("complex") itk_wrap_include("vnl/vnl_c_vector.h") itk_wrap_class("vnl_c_vector" EXPLICIT_SPECIALIZATION) diff --git a/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap b/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap index c25a7cfd601..0c7b82a1770 100644 --- a/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap +++ b/Modules/Core/Common/wrapping/vnl_diag_matrix.wrap @@ -1,7 +1,7 @@ # auto include feature must be disable because the class is not in the file # with the same name set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) -itk_wrap_include("vcl_complex.h") +itk_wrap_include("complex") itk_wrap_include("vnl/vnl_diag_matrix.h") itk_wrap_class("vnl_diag_matrix" EXPLICIT_SPECIALIZATION) diff --git a/Modules/Core/Common/wrapping/vnl_matrix.wrap b/Modules/Core/Common/wrapping/vnl_matrix.wrap index 6443cc323d4..6ca982d3ae3 100644 --- a/Modules/Core/Common/wrapping/vnl_matrix.wrap +++ b/Modules/Core/Common/wrapping/vnl_matrix.wrap @@ -1,7 +1,7 @@ # auto include feature must be disable because the class is not in the file # with the same name set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) -itk_wrap_include("vcl_complex.h") +itk_wrap_include("complex") itk_wrap_include("vnl/vnl_vector.h") itk_wrap_include("vnl/vnl_matrix.h") diff --git a/Modules/Core/Common/wrapping/vnl_vector.wrap b/Modules/Core/Common/wrapping/vnl_vector.wrap index f23486f8dac..c38d2cc1ac0 100644 --- a/Modules/Core/Common/wrapping/vnl_vector.wrap +++ b/Modules/Core/Common/wrapping/vnl_vector.wrap @@ -1,7 +1,7 @@ # auto include feature must be disable because the class is not in the file # with the same name set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) -itk_wrap_include("vcl_complex.h") +itk_wrap_include("complex") itk_wrap_include("vnl/vnl_matrix.h") itk_wrap_include("vnl/vnl_vector.h") From 803fc9b4f32dddee7faf6a9783f5e4d49defa246 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 5 Nov 2018 15:06:37 -0500 Subject: [PATCH 2/2] BUG: Remove vcl_complex support from itkTemplate.py Use itk.complex for the corresponding C++ std::complex type, instead. Change-Id: I4435d2085710d02326b717f6eccf9b82a9980bff --- Wrapping/Generators/Python/itkTemplate.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Wrapping/Generators/Python/itkTemplate.py b/Wrapping/Generators/Python/itkTemplate.py index 4d7c21850f5..02404e8a240 100644 --- a/Wrapping/Generators/Python/itkTemplate.py +++ b/Wrapping/Generators/Python/itkTemplate.py @@ -148,11 +148,6 @@ def __add__(self, paramSetString, cl): # itk::Numerics::Sample -> itkSample shortNameSize = len(re.sub(r':.*:', '', self.__name__)) attributeName = cl.__name__[shortNameSize:] - elif cl.__name__.startswith("vcl_complex"): - raise AttributeError('former vcl_complex, handling ' + str(cl.__name__)) - # C++ name is likely to be std::complex here, instead of the - # expected vcl_complex - attributeName = cl.__name__[len("vcl_complex"):] else: shortName = re.sub(r':.*:', '', self.__name__)