diff --git a/wrapping/CMakeLists.txt b/wrapping/CMakeLists.txt index 83eb5617e..04f9a7b24 100644 --- a/wrapping/CMakeLists.txt +++ b/wrapping/CMakeLists.txt @@ -5,7 +5,7 @@ set(WRAPPER_SUBMODULE_ORDER itkVectorRTK itkCovariantVectorRTK itkPointRTK - #itkContinuousIndexRTK + itkContinuousIndexRTK itkMatrixRTK itkVariableLengthVectorRTK itkImageBaseRTK diff --git a/wrapping/itkContinuousIndexRTK.nowrap b/wrapping/itkContinuousIndexRTK.nowrap deleted file mode 100644 index d608d1a7a..000000000 --- a/wrapping/itkContinuousIndexRTK.nowrap +++ /dev/null @@ -1,17 +0,0 @@ -itk_wrap_class("itk::ContinuousIndex") - - # Wrap ITK double missing types - if (NOT ITK_WRAP_double) - itk_wrap_template("${ITKM_D}1" "${ITKT_D}, 1") - endif() - - # Wrap ITK dimension 1 missing types - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) - if (ITK_WRAP_double) - itk_wrap_template("${ITKM_D}1" "double, 1") - endif() - endif() - -itk_end_wrap_class() - diff --git a/wrapping/itkContinuousIndexRTK.wrap b/wrapping/itkContinuousIndexRTK.wrap new file mode 100644 index 000000000..59d823ae2 --- /dev/null +++ b/wrapping/itkContinuousIndexRTK.wrap @@ -0,0 +1,6 @@ +list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) +if (${_index} EQUAL -1) + itk_wrap_class("itk::ContinuousIndex") + itk_wrap_template("${ITKM_D}1" "double, 1") + itk_end_wrap_class() +endif() diff --git a/wrapping/itkCovariantVectorRTK.wrap b/wrapping/itkCovariantVectorRTK.wrap index 9f9ae8903..a65ad88ea 100644 --- a/wrapping/itkCovariantVectorRTK.wrap +++ b/wrapping/itkCovariantVectorRTK.wrap @@ -1,16 +1,7 @@ -itk_wrap_class("itk::CovariantVector") +list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) +if (${_index} EQUAL -1) + itk_wrap_class("itk::CovariantVector") + itk_wrap_template("${ITKM_D}1" "${ITKT_D}, 1") + itk_end_wrap_class() +endif() - # Wrap ITK double missing types - if (NOT ITK_WRAP_double) - itk_wrap_template("D1" "${ITKT_D}, 1") - endif() - - # Wrap ITK dimension 1 missing types - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) - if (ITK_WRAP_double) - itk_wrap_template("D1" "double, 1") - endif() - endif() - -itk_end_wrap_class() diff --git a/wrapping/itkImageBaseRTK.wrap b/wrapping/itkImageBaseRTK.wrap index c13c0625a..5acefefe0 100644 --- a/wrapping/itkImageBaseRTK.wrap +++ b/wrapping/itkImageBaseRTK.wrap @@ -1,24 +1,15 @@ -itk_wrap_class("itk::ContinuousIndex") - - # Wrap ITK double missing types - if (NOT ITK_WRAP_double) - itk_wrap_template("${ITKM_D}1" "${ITKT_D}, 1") - endif() - - # Wrap ITK dimension 1 missing types - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) - if (ITK_WRAP_double) - itk_wrap_template("${ITKM_D}1" "double, 1") +list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) +if (${_index} EQUAL -1) + itk_wrap_class("itk::ImageBase" POINTER) + # See ITK_DIR/Wrapping/Generators/Python/CMakeLists.txt to understand the next 3 lines + set(ITK_WRAP_PYTHON_SWIG_EXT "${ITK_WRAP_PYTHON_SWIG_EXT}%inline %{\n") + set(ITK_WRAP_PYTHON_SWIG_EXT "${ITK_WRAP_PYTHON_SWIG_EXT}#include \"itkContinuousIndexRTKSwigInterface.h\"\n") + set(ITK_WRAP_PYTHON_SWIG_EXT "${ITK_WRAP_PYTHON_SWIG_EXT}%}\n") + + list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) + if (${_index} EQUAL -1) + itk_wrap_template("1" "1") endif() - endif() - -itk_end_wrap_class() -itk_wrap_class("itk::ImageBase" POINTER) - - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) - itk_wrap_template("1" "1") - endif() + itk_end_wrap_class() +endif() -itk_end_wrap_class() diff --git a/wrapping/itkImageDuplicatorRTK.wrap b/wrapping/itkImageDuplicatorRTK.wrap index 9ed43c7d4..c6b70aa0d 100644 --- a/wrapping/itkImageDuplicatorRTK.wrap +++ b/wrapping/itkImageDuplicatorRTK.wrap @@ -1,12 +1,13 @@ -itk_wrap_class("itk::ImageDuplicator" POINTER) - # Making sure that all types wrapped in PyBuffer are also wrapped for ImageDuplicator - # as this filter is used in the Python NumPy bridge. - UNIQUE(types "D;UC;US;${WRAP_ITK_REAL}") - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - foreach(t ${types}) - if (${_index} EQUAL -1) - itk_wrap_template("I${ITKM_${t}}1" "itk::Image<${ITKT_${t}}, 1>") - endif() - endforeach() +list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) +if (${_index} EQUAL -1) + itk_wrap_class("itk::ImageDuplicator" POINTER) + # Making sure that all types wrapped in PyBuffer are also wrapped for ImageDuplicator + # as this filter is used in the Python NumPy bridge. + UNIQUE(types "D;UC;US;${WRAP_ITK_REAL}") + foreach(t ${types}) + itk_wrap_template("I${ITKM_${t}}1" "itk::Image<${ITKT_${t}}, 1>") + endforeach() + + itk_end_wrap_class() +endif() -itk_end_wrap_class() \ No newline at end of file diff --git a/wrapping/itkImageRTK.wrap b/wrapping/itkImageRTK.wrap index 2f89025b1..e9480edd2 100644 --- a/wrapping/itkImageRTK.wrap +++ b/wrapping/itkImageRTK.wrap @@ -1,41 +1,32 @@ itk_wrap_class("itk::Image" POINTER) - # Wrap ITK double missing types - if (NOT ITK_WRAP_double) - itk_wrap_template("D1" "${ITKT_D}, 1") - endif() - - # Wrap ITK unsigned char missing types - if (NOT ITK_WRAP_unsigned_char) - itk_wrap_template("UC1" "${ITKT_UC}, 1") - endif() - # Wrap ITK unsigned short missing types - if (NOT ITK_WRAP_unsigned_short) - itk_wrap_template("US1" "${ITKT_US}, 1") - itk_wrap_template("US2" "${ITKT_US}, 2") - itk_wrap_template("US3" "${ITKT_US}, 3") - itk_wrap_template("US4" "${ITKT_US}, 4") - endif() + foreach(d 1 2 3 4) + list(FIND ITK_WRAP_IMAGE_DIMS ${d} _index) + if (${_index} EQUAL -1 OR NOT ITK_WRAP_unsigned_short) + itk_wrap_template("US${d}" "${ITKT_US}, ${d}") + endif() + endforeach() + + # Wrap ITK unsigned int missing types + itk_wrap_template("UI2" "${ITKT_UI}, 2") + itk_wrap_template("UI3" "${ITKT_UI}, 3") - # Wrap ITK short combination (required by : rtkLookupTableImageFilter) + # Wrap ITK short combination (required by: rtkLookupTableImageFilter) if (NOT ITK_WRAP_signed_short) itk_wrap_template("SS3" "${ITKT_SS}, 3") endif() # Wrap ITK dimension 1 missing types list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) + if (${_index} EQUAL -1 OR NOT ITK_WRAP_unsigned_char) + itk_wrap_template("UC1" "${ITKT_UC}, 1") + endif() + if (${_index} EQUAL -1 OR NOT ITK_WRAP_float) itk_wrap_template("F1" "${ITKT_F}, 1") - if (ITK_WRAP_double) - itk_wrap_template("D1" "${ITKT_D}, 1") - endif() - if (ITK_WRAP_unsigned_char) - itk_wrap_template("UC1" "${ITKT_UC}, 1") - endif() - if (ITK_WRAP_unsigned_short) - itk_wrap_template("US1" "${ITKT_US}, 1") - endif() + endif() + if (${_index} EQUAL -1) + itk_wrap_template("D1" "${ITKT_D}, 1") endif() # Wrap ITK dimension 4 missing types @@ -45,9 +36,6 @@ itk_wrap_class("itk::Image" POINTER) if (ITK_WRAP_double) itk_wrap_template("D4" "${ITKT_D}, 4") endif() - if (ITK_WRAP_unsigned_short) - itk_wrap_template("US4" "${ITKT_US}, 4") - endif() endif() # Force ITK_WRAP_IMAGE_DIMS to contain "2;3;4" diff --git a/wrapping/itkImageRegionRTK.wrap b/wrapping/itkImageRegionRTK.wrap index 9492d73d0..5452f9144 100644 --- a/wrapping/itkImageRegionRTK.wrap +++ b/wrapping/itkImageRegionRTK.wrap @@ -1,6 +1,7 @@ -itk_wrap_class("itk::ImageRegion") - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) +list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) +if (${_index} EQUAL -1) + itk_wrap_class("itk::ImageRegion") itk_wrap_template(1 1) - endif() -itk_end_wrap_class() + itk_end_wrap_class() +endif() + diff --git a/wrapping/itkImageToImageFilterRTK.wrap b/wrapping/itkImageToImageFilterRTK.wrap index 342a200ec..6bfa5ab84 100644 --- a/wrapping/itkImageToImageFilterRTK.wrap +++ b/wrapping/itkImageToImageFilterRTK.wrap @@ -6,6 +6,15 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER) itk_wrap_template("ID3ID2" "itk::Image<${ITKT_D}, 3>, itk::Image<${ITKT_D}, 2>") endif() + # Wrap ITK dimension 1 missing types + list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) + if (${_index} EQUAL -1) + itk_wrap_template("IF1IF1" "itk::Image<${ITKT_F}, 1>, itk::Image<${ITKT_F}, 1>") + if (ITK_WRAP_double) + itk_wrap_template("ID1ID1" "itk::Image<${ITKT_D}, 1>, itk::Image<${ITKT_D}, 1>") + endif() + endif() + # Wrap ITK unsigned short missing types if (NOT ITK_WRAP_unsigned_short) itk_wrap_template("IUS2IUS2" "itk::Image<${ITKT_US}, 2>, itk::Image<${ITKT_US}, 2>") @@ -14,18 +23,22 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER) # Wrap ITK unsigned short combination (required by : rtkLookupTableImageFilter) if (NOT ITK_WRAP_unsigned_short) - if (NOT ITK_WRAP_double) - itk_wrap_template("IUS3ID3" "itk::Image<${ITKT_US}, 3>, itk::Image<${ITKT_D}, 3>") - endif() - itk_wrap_template("IUS4IF4" "itk::Image<${ITKT_US}, 4>, itk::Image<${ITKT_F}, 4>") - itk_wrap_template("IUS3IF3" "itk::Image<${ITKT_US}, 3>, itk::Image<${ITKT_F}, 3>") - itk_wrap_template("IUS2IF2" "itk::Image<${ITKT_US}, 2>, itk::Image<${ITKT_F}, 2>") + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("IUS2I${ITKM_${t}}2" "itk::Image<${ITKT_US}, 2>, itk::Image<${ITKT_${t}}, 2>") + itk_wrap_template("IUS3I${ITKM_${t}}3" "itk::Image<${ITKT_US}, 3>, itk::Image<${ITKT_${t}}, 3>") + endforeach() list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) if (NOT ${_index} EQUAL -1) itk_wrap_template("IUS1IF1" "itk::Image<${ITKT_US}, 1>, itk::Image<${ITKT_F}, 1>") endif() endif() + # Wrap ITK unsigned int missing types + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("IUI2I${ITKM_${t}}2" "itk::Image<${ITKT_UI}, 2>, itk::Image<${ITKT_${t}}, 2>") + itk_wrap_template("IUI3I${ITKM_${t}}3" "itk::Image<${ITKT_UI}, 3>, itk::Image<${ITKT_${t}}, 3>") + endforeach() + # Wrap ITK short combination (required by : rtkLookupTableImageFilter) if (NOT ITK_WRAP_signed_short) itk_wrap_template("ISS3IF3" "itk::Image<${ITKT_SS}, 3>, itk::Image<${ITKT_F}, 3>") @@ -34,15 +47,6 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER) # Wrap ITK real type combination itk_wrap_template("IF3ID2" "itk::Image<${ITKT_F}, 3>, itk::Image<${ITKT_D}, 2>") - # Wrap ITK dimension 1 missing types - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) - itk_wrap_template("IF1IF1" "itk::Image<${ITKT_F}, 1>, itk::Image<${ITKT_F}, 1>") - if (ITK_WRAP_double) - itk_wrap_template("ID1ID1" "itk::Image<${ITKT_D}, 1>, itk::Image<${ITKT_D}, 1>") - endif() - endif() - # Wrap ITK dimension 4 missing types list(FIND ITK_WRAP_IMAGE_DIMS "4" _index) if (${_index} EQUAL -1) @@ -81,21 +85,18 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER) endif() - # Force ITK_WRAP_IMAGE_DIMS to contain "2;3;4" UNIQUE(imageDimensions "${ITK_WRAP_IMAGE_DIMS};2;3;4") set(vectorComponents 2 3 4 5) foreach(component ${vectorComponents}) list(FIND ITK_WRAP_VECTOR_COMPONENTS "${component}" _index) - if (${_index} EQUAL -1) - - foreach(vt ${WRAP_ITK_VECTOR_REAL}) + if (${_index} EQUAL -1) + foreach(vt ${WRAP_ITK_VECTOR_REAL}) foreach(d ${imageDimensions}) itk_wrap_template("I${ITKM_${vt}${component}}${d}I${ITKM_${vt}${component}}${d}" "itk::Image<${ITKT_${vt}${component}}, ${d}>, itk::Image<${ITKT_${vt}${component}}, ${d}>") endforeach() - endforeach() - + endforeach() endif() endforeach() @@ -136,8 +137,11 @@ itk_wrap_class("itk::ImageToImageFilter" POINTER) endif() + list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) foreach(t ${WRAP_ITK_REAL}) - itk_wrap_template("I${ITKM_${t}}2I${ITKM_${t}}1" "itk::Image<${ITKT_${t}}, 2>, itk::Image<${ITKT_${t}}, 1>") + if (${_index} EQUAL -1) + itk_wrap_template("I${ITKM_${t}}2I${ITKM_${t}}1" "itk::Image<${ITKT_${t}}, 2>, itk::Image<${ITKT_${t}}, 1>") + endif() itk_wrap_template("I${ITKM_${t}}3VI${ITKM_${t}}2" "itk::Image<${ITKT_${t}}, 3>, itk::VectorImage<${ITKT_${t}}, 2>") itk_wrap_template("VI${ITKM_${t}}2I${ITKM_${t}}3" "itk::VectorImage<${ITKT_${t}}, 2>, itk::Image<${ITKT_${t}}, 3>") itk_wrap_template("VI${ITKM_${t}}3I${ITKM_${t}}4" "itk::VectorImage<${ITKT_${t}}, 3>, itk::Image<${ITKT_${t}}, 4>") diff --git a/wrapping/itkInPlaceImageFilterRTK.wrap b/wrapping/itkInPlaceImageFilterRTK.wrap index 3b7bde960..58c1b6189 100644 --- a/wrapping/itkInPlaceImageFilterRTK.wrap +++ b/wrapping/itkInPlaceImageFilterRTK.wrap @@ -17,23 +17,28 @@ itk_wrap_class("itk::InPlaceImageFilter" POINTER) # Wrap ITK unsigned short missing types if (NOT ITK_WRAP_unsigned_short) + itk_wrap_template("IUS2IUS2" "itk::Image<${ITKT_US}, 2>, itk::Image<${ITKT_US}, 2>") itk_wrap_template("IUS3IUS3" "itk::Image<${ITKT_US}, 3>, itk::Image<${ITKT_US}, 3>") endif() # Wrap ITK unsigned short combination (required by : rtkLookupTableImageFilter) if (NOT ITK_WRAP_unsigned_short) - if (NOT ITK_WRAP_double) - itk_wrap_template("IUS3ID3" "itk::Image<${ITKT_US}, 3>, itk::Image<${ITKT_D}, 3>") - endif() - itk_wrap_template("IUS4IF4" "itk::Image<${ITKT_US}, 4>, itk::Image<${ITKT_F}, 4>") - itk_wrap_template("IUS3IF3" "itk::Image<${ITKT_US}, 3>, itk::Image<${ITKT_F}, 3>") - itk_wrap_template("IUS2IF2" "itk::Image<${ITKT_US}, 2>, itk::Image<${ITKT_F}, 2>") + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("IUS2I${ITKM_${t}}2" "itk::Image<${ITKT_US}, 2>, itk::Image<${ITKT_${t}}, 2>") + itk_wrap_template("IUS3I${ITKM_${t}}3" "itk::Image<${ITKT_US}, 3>, itk::Image<${ITKT_${t}}, 3>") + endforeach() list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) if (NOT ${_index} EQUAL -1) itk_wrap_template("IUS1IF1" "itk::Image<${ITKT_US}, 1>, itk::Image<${ITKT_F}, 1>") endif() endif() + # Wrap ITK unsigned int missing types + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("IUI2I${ITKM_${t}}2" "itk::Image<${ITKT_UI}, 2>, itk::Image<${ITKT_${t}}, 2>") + itk_wrap_template("IUI3I${ITKM_${t}}3" "itk::Image<${ITKT_UI}, 3>, itk::Image<${ITKT_${t}}, 3>") + endforeach() + # Wrap ITK short combination (required by : rtkLookupTableImageFilter) if (NOT ITK_WRAP_signed_short) itk_wrap_template("ISS3IF3" "itk::Image<${ITKT_SS}, 3>, itk::Image<${ITKT_F}, 3>") diff --git a/wrapping/itkMatrixRTK.wrap b/wrapping/itkMatrixRTK.wrap index 181e357a4..c8b5fb049 100644 --- a/wrapping/itkMatrixRTK.wrap +++ b/wrapping/itkMatrixRTK.wrap @@ -1,16 +1,7 @@ -itk_wrap_class("itk::Matrix") +list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) +if (${_index} EQUAL -1) + itk_wrap_class("itk::Matrix") + itk_wrap_template("${ITKM_D}11" "${ITKT_D}, 1, 1") + itk_end_wrap_class() +endif() - # Wrap ITK double missing types -- - if (NOT ITK_WRAP_double) - itk_wrap_template("D11" "${ITKT_D}, 1, 1") - endif() - - # Wrap ITK dimension 1 missing types - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) - if (ITK_WRAP_double) - itk_wrap_template("D11" "${ITKT_D}, 1, 1") - endif() - endif() - -itk_end_wrap_class() diff --git a/wrapping/itkPointRTK.wrap b/wrapping/itkPointRTK.wrap index fbf1a72bc..879bd5682 100644 --- a/wrapping/itkPointRTK.wrap +++ b/wrapping/itkPointRTK.wrap @@ -1,12 +1,7 @@ -itk_wrap_class("itk::Point") - if (NOT ITK_WRAP_double) - itk_wrap_template("D1" "${ITKT_D}, 1") - endif() +list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) +if (${_index} EQUAL -1) + itk_wrap_class("itk::Point") + itk_wrap_template("${ITKM_D}1" "${ITKT_D}, 1") + itk_end_wrap_class() +endif() - list(FIND ITK_WRAP_IMAGE_DIMS "1" _index) - if (${_index} EQUAL -1) - if (ITK_WRAP_double) - itk_wrap_template("D1" "double, 1") - endif() - endif() -itk_end_wrap_class() diff --git a/wrapping/rtkDaubechiesWaveletsDenoiseSequenceImageFilter.wrap b/wrapping/rtkDaubechiesWaveletsDenoiseSequenceImageFilter.wrap index 91c50860c..2e8a01fd7 100644 --- a/wrapping/rtkDaubechiesWaveletsDenoiseSequenceImageFilter.wrap +++ b/wrapping/rtkDaubechiesWaveletsDenoiseSequenceImageFilter.wrap @@ -1,3 +1,6 @@ -itk_wrap_class("rtk::DaubechiesWaveletsDenoiseSequenceImageFilter" POINTER) - itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 4) -itk_end_wrap_class() +list(FIND ITK_WRAP_IMAGE_DIMS "4" _index) +if (NOT ${_index} EQUAL -1) + itk_wrap_class("rtk::DaubechiesWaveletsDenoiseSequenceImageFilter" POINTER) + itk_wrap_image_filter("${WRAP_ITK_REAL}" 1 4) + itk_end_wrap_class() +endif() diff --git a/wrapping/rtkElektaSynergyRawLookupTableImageFilter.wrap b/wrapping/rtkElektaSynergyRawLookupTableImageFilter.wrap index c2639a8e8..afd6d4775 100644 --- a/wrapping/rtkElektaSynergyRawLookupTableImageFilter.wrap +++ b/wrapping/rtkElektaSynergyRawLookupTableImageFilter.wrap @@ -1,3 +1,5 @@ itk_wrap_class("rtk::ElektaSynergyRawLookupTableImageFilter" POINTER) - itk_wrap_image_filter("${US}" 2 2+) + foreach(d 2 3) + itk_wrap_template("IUS${d}IUS${d}" "itk::Image<${ITKT_US}, ${d}>, itk::Image<${ITKT_US}, ${d}>") + endforeach() itk_end_wrap_class() diff --git a/wrapping/rtkLookupTableImageFilter.wrap b/wrapping/rtkLookupTableImageFilter.wrap index 8b8889084..2da27f14a 100644 --- a/wrapping/rtkLookupTableImageFilter.wrap +++ b/wrapping/rtkLookupTableImageFilter.wrap @@ -2,19 +2,18 @@ # rtk::Functor< int, float > #----------------------------------------------------------------------------- set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) +set(WRAP_RTK_INT "UI;US") +set(RTK_WRAP_IMAGE_DIMS 2 3) itk_wrap_named_class("rtk::Functor::LUT" "rtkFunctorLUT") - foreach(i ${WRAP_ITK_INT}) + foreach(i ${WRAP_RTK_INT}) foreach(t ${WRAP_ITK_REAL}) itk_wrap_template("${ITKM_${i}}${ITKM_${t}}" "${ITKT_${i}}, ${ITKT_${t}}") endforeach() endforeach() - # Wrap ITK unsigned short missing types -- required by LUTbasedVariableI0RawToAttenuationImageFilter - if (NOT ITK_WRAP_unsigned_short) - itk_wrap_template("${ITKM_US}${ITKM_F}" "${ITKT_US}, ${ITKT_F}") - endif() - + # For ElektaSynergyRawLookupTableImageFilter + itk_wrap_template("${ITKM_US}${d}${ITKM_US}${d}" "${ITKT_US}, ${ITKT_US}") itk_end_wrap_class() set(WRAPPER_AUTO_INCLUDE_HEADERS ON) @@ -24,22 +23,20 @@ set(WRAPPER_AUTO_INCLUDE_HEADERS ON) #----------------------------------------------------------------------------- itk_wrap_class("itk::UnaryFunctorImageFilter" POINTER) - foreach(i ${WRAP_ITK_INT}) + foreach(i ${WRAP_RTK_INT}) foreach(t ${WRAP_ITK_REAL}) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(d ${RTK_WRAP_IMAGE_DIMS}) itk_wrap_template("I${ITKM_${i}}${d}I${ITKM_${t}}${d}LUT${ITKM_${i}}${ITKM_${t}}" - "itk::Image<${ITKT_${i}}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>, rtk::Functor::LUT< ${ITKT_${i}}, ${ITKT_${t}} >") + "itk::Image<${ITKT_${i}}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>, rtk::Functor::LUT< ${ITKT_${i}}, ${ITKT_${t}} >") endforeach() endforeach() endforeach() - # Wrap ITK unsigned short missing types -- required by LUTbasedVariableI0RawToAttenuationImageFilter - if (NOT ITK_WRAP_unsigned_short) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("I${ITKM_US}${d}I${ITKM_F}${d}LUT${ITKM_US}${ITKM_F}" - "itk::Image<${ITKT_US}, ${d}>, itk::Image<${ITKT_F}, ${d}>, rtk::Functor::LUT< ${ITKT_US}, ${ITKT_F} >") - endforeach() - endif() + # For ElektaSynergyRawLookupTableImageFilter + foreach(d 2 3) + itk_wrap_template("I${ITKM_US}${d}I${ITKM_US}${d}LUT${ITKM_US}${ITKM_US}" + "itk::Image<${ITKT_US}, ${d}>, itk::Image<${ITKT_US}, ${d}>, rtk::Functor::LUT< ${ITKT_US}, ${ITKT_US}>") + endforeach() itk_end_wrap_class() #----------------------------------------------------------------------------- @@ -47,13 +44,17 @@ itk_end_wrap_class() #----------------------------------------------------------------------------- itk_wrap_class("rtk::LookupTableImageFilter" POINTER) - itk_wrap_image_filter_combinations("${WRAP_ITK_INT}" "${WRAP_ITK_REAL}" 2+) - - # Wrap ITK unsigned short missing types -- required by LUTbasedVariableI0RawToAttenuationImageFilter - if (NOT ITK_WRAP_unsigned_short) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) - itk_wrap_template("IUS${d}IF${d}" "itk::Image<${ITKT_US}, ${d}>, itk::Image<${ITKT_F}, ${d}>") + foreach(i ${WRAP_RTK_INT}) + foreach(t ${WRAP_ITK_REAL}) + foreach(d ${RTK_WRAP_IMAGE_DIMS}) + itk_wrap_template("I${ITKM_${i}}${d}I${ITKM_${t}}${d}" "itk::Image<${ITKT_${i}}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>") + endforeach() endforeach() - endif() + endforeach() + # For ElektaSynergyRawLookupTableImageFilter + foreach(d 2 3) + itk_wrap_template("I${ITKM_US}${d}I${ITKM_US}${d}" "itk::Image<${ITKT_US}, ${d}>, itk::Image<${ITKT_US}, ${d}>") + endforeach() itk_end_wrap_class() + diff --git a/wrapping/rtkVarianObiRawImageFilter.wrap b/wrapping/rtkVarianObiRawImageFilter.wrap index eb601c0c2..543b56bbc 100644 --- a/wrapping/rtkVarianObiRawImageFilter.wrap +++ b/wrapping/rtkVarianObiRawImageFilter.wrap @@ -1,29 +1,24 @@ -#----------------------------------------------------------------------------- -# itk::UnaryFunctorImageFilter, itk::Image, -# rtk::Function::ObiAttenuation> -#----------------------------------------------------------------------------- +set(WRAPPER_AUTO_INCLUDE_HEADERS OFF) +itk_wrap_named_class("rtk::Function::ObiAttenuation" "rtkFunctionObiAttenuation") + foreach(t ${WRAP_ITK_REAL}) + itk_wrap_template("${ITKM_UI}${ITKM_${t}}" "${ITKT_UI}, ${ITKT_${t}}") + endforeach() +itk_end_wrap_class() +set(WRAPPER_AUTO_INCLUDE_HEADERS ON) + itk_wrap_class("itk::UnaryFunctorImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(d 2 3) foreach(t ${WRAP_ITK_REAL}) - foreach(u ${WRAP_ITK_SCALARS}) - itk_wrap_template("I${ITKM_${u}}${d}I${ITKM_${t}}${d}OA${ITKM_${u}}${ITKM_${t}}" "itk::Image<${ITKT_${u}}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>, rtk::Function::ObiAttenuation< ${ITKM_${u}},${ITKM_${t}} >") - endforeach() + itk_wrap_template("I${ITKM_UI}${d}I${ITKM_${t}}${d}OA${ITKM_UI}${ITKM_${t}}" + "itk::Image<${ITKT_UI}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>, rtk::Function::ObiAttenuation< ${ITKT_UI},${ITKT_${t}} >") endforeach() endforeach() itk_end_wrap_class() -#----------------------------------------------------------------------------- -# rtk::VarianObiRawImageFilter -#----------------------------------------------------------------------------- -# TInputImage must have integer pixel type because of internal -# rtkI0EstimationProjectionFilter concept checking - itk_wrap_class("rtk::VarianObiRawImageFilter" POINTER) - foreach(d ${ITK_WRAP_IMAGE_DIMS}) + foreach(d 2 3) foreach(t ${WRAP_ITK_REAL}) - foreach(u ${WRAP_ITK_SCALARS}) - itk_wrap_template("I${ITKM_${u}}${d}I${ITKM_${t}}${d}" "itk::Image<${ITKT_${u}}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>") - endforeach() + itk_wrap_template("I${ITKM_UI}${d}I${ITKM_${t}}${d}" "itk::Image<${ITKT_UI}, ${d}>, itk::Image<${ITKT_${t}}, ${d}>") endforeach() endforeach() itk_end_wrap_class()