Skip to content

Commit 5ba9c46

Browse files
committed
BUG: Resolve Python module load warnings
Resolves wrapping warnings previously seen at `itk-ultrasound` module load time resulting from wrappings for `itk::AttenuationImageFilter` and `itk::Spectra1DSupportWindowToMaskImageFilter`. Resolves #200.
1 parent 9db680e commit 5ba9c46

6 files changed

Lines changed: 31 additions & 25 deletions

wrapping/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ endif()
99
itk_wrap_module(Ultrasound)
1010
set(WRAPPER_SUBMODULE_ORDER
1111
itkCurvilinearArraySpecialCoordinatesImage
12+
itkImageUltrasound # Extra itk::Image wrappings for SupportWindow filters
1213
itkCurvilinearArraySpecialCoordinatesImageFilters
1314
itkAttenuationImageFilter
1415
itkBlockMatchingMetricImageFilter
1516
itkBlockMatchingNormalizedCrossCorrelationMetricImageFilter
1617
itkBlockMatchingNormalizedCrossCorrelationFFTMetricImageFilter
1718
itkBlockMatchingNormalizedCrossCorrelationNeighborhoodIteratorMetricImageFilter
1819
itkSpectra1DSupportWindowImageFilter
20+
itkSpectra1DSupportWindowToMaskImageFilter
1921
itkFrequencyDomain1DFilterFunction
2022
itkFrequencyDomain1DImageFilter
2123
itkRegionFromReferenceImageFilter
2224
itkAnalyticSignalImageFilter
2325
itkBModeImageFilter
2426
itkSpeckleReducingAnisotropicDiffusionImageFilter
25-
itkImageToImageFilter # Extra wrappings for Spectra1D filters
27+
itkImageToImageFilterUltrasound # Extra wrappings for Spectra1D filters
2628
itkSpectra1DAveragingImageFilter
2729
itkSpectra1DNormalizeImageFilter
2830
)

wrapping/itkAttenuationImageFilter.wrap

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ itk_wrap_include("itkVectorImage.h")
22
itk_wrap_class("itk::AttenuationImageFilter" POINTER)
33
foreach(d ${ITK_WRAP_IMAGE_DIMS})
44
foreach(rt ${WRAP_ITK_REAL})
5-
foreach(vt ${WRAP_ITK_REAL})
6-
itk_wrap_template("VI${ITKM_${rt}}${d}I${ITKM_${rt}}${d}IUC${d}"
5+
itk_wrap_template("VI${ITKM_${rt}}${d}I${ITKM_${rt}}${d}"
76
"itk::VectorImage<${ITKT_${rt}}, ${d}>, itk::Image<${ITKT_${rt}}, ${d}>")
8-
endforeach()
97
endforeach()
108
endforeach()
119
itk_end_wrap_class()
File renamed without changes.

wrapping/itkImageUltrasound.wrap

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Wrap underlying `itk::Image` type for list-of-indices pixel types
2+
# required in itk::Spectra1DSupportWindowImageFilter and
3+
# itk::Spectra1DSupportWindowToMaskImageFilter
4+
5+
itk_wrap_include("list")
6+
itk_wrap_include("itkIndex.h")
7+
set(TEMPLATE_LIST_INDEX "")
8+
foreach(d ${ITK_WRAP_IMAGE_DIMS})
9+
set(TEMPLATE_LIST_INDEX "${TEMPLATE_LIST_INDEX}
10+
%template(listIndex${d}) std::list< itk::Index< ${d} > >;
11+
")
12+
ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "listIndex${d}" "itk::Index< ${d} >")
13+
endforeach()
14+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/stdlistitkIndex.i.in
15+
${CMAKE_CURRENT_BINARY_DIR}/stdlistitkIndex.i
16+
@ONLY
17+
)
18+
set(WRAPPER_SWIG_LIBRARY_FILES ${WRAPPER_SWIG_LIBRARY_FILES}
19+
"${CMAKE_CURRENT_BINARY_DIR}/stdlistitkIndex.i")
20+
21+
itk_wrap_class("itk::Image" POINTER)
22+
foreach(d ${ITK_WRAP_IMAGE_DIMS})
23+
itk_wrap_template("listitkIndex${d}${d}" "std::list< itk::Index< ${d} > >, ${d}")
24+
endforeach(d)
25+
itk_end_wrap_class()
Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
itk_wrap_include("list")
2-
set(TEMPLATE_LIST_INDEX "")
3-
foreach(d ${ITK_WRAP_IMAGE_DIMS})
4-
set(TEMPLATE_LIST_INDEX "${TEMPLATE_LIST_INDEX}
5-
%template(listIndex${d}) std::list< itk::Index< ${d} > >;
6-
")
7-
ADD_PYTHON_CONFIG_TEMPLATE("list" "std::list" "listIndex${d}" "itk::Index< ${d} >")
8-
endforeach()
9-
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/stdlistitkIndex.i.in
10-
${CMAKE_CURRENT_BINARY_DIR}/stdlistitkIndex.i
11-
@ONLY
12-
)
13-
set(WRAPPER_SWIG_LIBRARY_FILES ${WRAPPER_SWIG_LIBRARY_FILES}
14-
"${CMAKE_CURRENT_BINARY_DIR}/stdlistitkIndex.i")
15-
16-
itk_wrap_class("itk::Image" POINTER)
17-
foreach(d ${ITK_WRAP_IMAGE_DIMS})
18-
itk_wrap_template("listitkIndex${d}${d}" "std::list< itk::Index< ${d} > >, ${d}")
19-
endforeach(d)
20-
itk_end_wrap_class()
21-
221
itk_wrap_class("itk::Spectra1DSupportWindowImageFilter" POINTER_WITH_2_SUPERCLASSES)
232
itk_wrap_image_filter("${WRAP_ITK_INT}" 1)
243
itk_end_wrap_class()

wrapping/itkSpectra1DSupportWindowToMaskImageFilter.wrap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
itk_wrap_include("list")
2+
itk_wrap_include("itkIndex.h")
3+
itk_wrap_include("itkImage.h")
24

35
itk_wrap_class("itk::Spectra1DSupportWindowToMaskImageFilter" POINTER_WITH_2_SUPERCLASSES)
46
foreach(d ${ITK_WRAP_IMAGE_DIMS})

0 commit comments

Comments
 (0)