Skip to content

Commit

Permalink
ENH: reorganize to ease removal of PhasedArray3DSpecialCoordinatesImage
Browse files Browse the repository at this point in the history
  • Loading branch information
dzenanz committed Jul 14, 2023
1 parent 027b982 commit 11b0ec8
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
6 changes: 3 additions & 3 deletions wrapping/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ endif()

itk_wrap_module(Ultrasound)
set(WRAPPER_SUBMODULE_ORDER
itkSpecialCoordinatesImage
itkCurvilinearArraySpecialCoordinatesImage
itkImageUltrasound # Extra itk::Image wrappings for SupportWindow filters
itkCurvilinearArraySpecialCoordinatesImageFilters
itkPhasedArray3DSpecialCoordinatesImage # CASCI needs to come before
itkAttenuationImageFilter
itkBlockMatchingMetricImageFilter
itkBlockMatchingNormalizedCrossCorrelationMetricImageFilter
itkBlockMatchingNormalizedCrossCorrelationFFTMetricImageFilter
itkBlockMatchingNormalizedCrossCorrelationNeighborhoodIteratorMetricImageFilter
itkImageUltrasound # must come before Spectra1DSupportWindow
itkSpectra1DSupportWindowImageFilter
itkSpectra1DSupportWindowToMaskImageFilter
itkSpectra1DSupportWindowToMaskImageFilter # must come after CASCI
itkFrequencyDomain1DFilterFunction
itkFrequencyDomain1DImageFilter
itkRegionFromReferenceImageFilter
Expand Down
14 changes: 0 additions & 14 deletions wrapping/itkCurvilinearArraySpecialCoordinatesImage.wrap
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
itk_wrap_include("list")
itk_wrap_include("complex")

# Wrap underlying class hierarchy
itk_wrap_class("itk::SpecialCoordinatesImage" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_SCALAR})
itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}")
endforeach()
foreach(t3 ${WRAP_ITK_COMPLEX_REAL})
itk_wrap_template("${ITKM_${t3}}${d}" "${ITKT_${t3}}, ${d}")
endforeach()
endforeach()
itk_end_wrap_class()


# Explicitly override template method wrappings so that implicit
# scalar type is always `double` for greatest precision.
# Adds wrapping overrides to `itkCurvilinearArraySpecialCoordinatesImage_ext.i` configured with
Expand Down
12 changes: 1 addition & 11 deletions wrapping/itkCurvilinearArraySpecialCoordinatesImageFilters.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER)
endforeach()
itk_end_wrap_class()

itk_wrap_class("itk::ImageFileReader" POINTER_WITH_SUPERCLASS)
itk_wrap_class("itk::ImageFileReader" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_SCALAR})
itk_wrap_template("CASCI${ITKM_${t}}${d}"
Expand Down Expand Up @@ -93,16 +93,6 @@ itk_wrap_class("itk::RescaleIntensityImageFilter" POINTER_WITH_2_SUPERCLASSES)
endforeach()
itk_end_wrap_class()

itk_wrap_include("itkSpectra1DSupportWindowToMaskImageFilter.h")
itk_wrap_class("itk::Spectra1DSupportWindowToMaskImageFilter" POINTER_WITH_2_SUPERCLASSES)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_INT})
itk_wrap_template("IlistitkIndex${d}${d}CASCI${ITKM_${t}}${d}"
"itk::Image< std::list< itk::Index< ${d} > >, ${d} >, itk::CurvilinearArraySpecialCoordinatesImage< ${ITKT_${t}}, ${d} >")
endforeach()
endforeach()
itk_end_wrap_class()

# The rest is needed for ResampleImageFilter and interpolator functions
set(resample_filter_dimensions 2 3)
set(resample_filter_pixel_types "F")
Expand Down
1 change: 1 addition & 0 deletions wrapping/itkImageUltrasound.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

itk_wrap_include("list")
itk_wrap_include("itkIndex.h")

set(TEMPLATE_LIST_INDEX "")
foreach(d ${ITK_WRAP_IMAGE_DIMS})
set(TEMPLATE_LIST_INDEX "${TEMPLATE_LIST_INDEX}
Expand Down
13 changes: 13 additions & 0 deletions wrapping/itkSpecialCoordinatesImage.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
itk_wrap_include("complex")

# Wrap underlying class hierarchy
itk_wrap_class("itk::SpecialCoordinatesImage" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_SCALAR})
itk_wrap_template("${ITKM_${t}}${d}" "${ITKT_${t}}, ${d}")
endforeach()
foreach(t3 ${WRAP_ITK_COMPLEX_REAL})
itk_wrap_template("${ITKM_${t3}}${d}" "${ITKT_${t3}}, ${d}")
endforeach()
endforeach()
itk_end_wrap_class()
8 changes: 8 additions & 0 deletions wrapping/itkSpectra1DSupportWindowToMaskImageFilter.wrap
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
itk_wrap_include("list")
itk_wrap_include("itkIndex.h")
itk_wrap_include("itkImage.h")
itk_wrap_include("itkCurvilinearArraySpecialCoordinatesImage.h")

itk_wrap_class("itk::Spectra1DSupportWindowToMaskImageFilter" POINTER_WITH_2_SUPERCLASSES)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_INT})
itk_wrap_template("IlistitkIndex${d}${d}${ITKM_I${t}${d}}" "itk::Image< std::list< itk::Index< ${d} > >, ${d} >, ${ITKT_I${t}${d}}")
endforeach(t)
endforeach(d)

foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_INT})
itk_wrap_template("IlistitkIndex${d}${d}CASCI${ITKM_${t}}${d}"
"itk::Image< std::list< itk::Index< ${d} > >, ${d} >, itk::CurvilinearArraySpecialCoordinatesImage< ${ITKT_${t}}, ${d} >")
endforeach()
endforeach()
itk_end_wrap_class()

0 comments on commit 11b0ec8

Please sign in to comment.