Repository: RTKConsortium/RTK (language: python)

Issue:
No module named 'itkHelpers'
Hello,

I'm new to RTK. I recently installed itk-rtk Python package using Anaconda :
`pip install itk-rtk` 

which is the RTK 2.2.0 version, if I'm not wrong. 

Installing has been successful. Nevertheless, an error occurs executing the following code :

`import itk`
`from itk import RTK as rtk`
`geometry = rtk.ThreeDCircularProjectionGeometry.New()`

Resulting in :

`ModuleNotFoundError: No module named 'itkHelpers'`

I found similar issues for old versions, but not for the latest one.

Thanks for your help,

Adrien


Discussion / hints:

Fix patch:
diff --git a/wrapping/rtkJosephBackAttenuatedProjectionImageFilter.wrap b/wrapping/rtkJosephBackAttenuatedProjectionImageFilter.wrap
index 0a22619d4..d93de8dc3 100644
--- a/wrapping/rtkJosephBackAttenuatedProjectionImageFilter.wrap
+++ b/wrapping/rtkJosephBackAttenuatedProjectionImageFilter.wrap
@@ -1,7 +1,7 @@
 set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
 itk_wrap_named_class("rtk::Functor::InterpolationWeightMultiplicationAttenuatedBackProjection" "rtkFunctorInterpolationWeightMultiplicationAttenuatedBackProjection")
   foreach(t ${WRAP_ITK_REAL})
-    itk_wrap_template("${ITKM_${t}}D${ITKM_${t}}" "${ITKT_${t}}, double, ${ITKT_${t}}")
+    itk_wrap_template("${ITKM_${t}}${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}, ${ITKT_${t}}")
   endforeach()
 itk_end_wrap_class()
 itk_wrap_named_class("rtk::Functor::SplatWeightMultiplicationAttenuated" "rtkFunctorSplatWeightMultiplication")
@@ -9,15 +9,17 @@ itk_wrap_named_class("rtk::Functor::SplatWeightMultiplicationAttenuated" "rtkFun
     itk_wrap_template("${ITKM_${t}}D${ITKM_${t}}" "${ITKT_${t}}, double, ${ITKT_${t}}")
   endforeach()
 itk_end_wrap_class()
+itk_wrap_named_class("rtk::Functor::ComputeAttenuationCorrectionBackProjection" "rtkComputeAttenuationCorrectionBackProjection")
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}")
+  endforeach()
+itk_end_wrap_class()
 set(WRAPPER_AUTO_INCLUDE_HEADERS ON)
 
 itk_wrap_class("rtk::JosephBackProjectionImageFilter" POINTER)
   foreach(t ${WRAP_ITK_REAL})
     itk_wrap_template("I${ITKM_${t}}3I${ITKM_${t}}3SWM${ITKM_${t}}D${ITKM_${t}}IS"
-      "itk::Image<${ITKT_${t}}, 3>, itk::Image< ${ITKT_${t}}, 3>,
-       rtk::Functor::InterpolationWeightMultiplicationAttenuatedBackProjection<${ITKT_${t}}, ${ITKT_${t}}, ${ITKT_${t}}>,
-       rtk::Functor::SplatWeightMultiplicationAttenuated<${ITKT_${t}}, double, ${ITKT_${t}}>,
-       rtk::Functor::ComputeAttenuationCorrectionBackProjection<${ITKT_${t}}, ${ITKT_${t}}>")
+      "itk::Image<${ITKT_${t}}, 3>, itk::Image< ${ITKT_${t}}, 3>, rtk::Functor::InterpolationWeightMultiplicationAttenuatedBackProjection<${ITKT_${t}}, ${ITKT_${t}}, ${ITKT_${t}}>, rtk::Functor::SplatWeightMultiplicationAttenuated<${ITKT_${t}}, double, ${ITKT_${t}}>, rtk::Functor::ComputeAttenuationCorrectionBackProjection<${ITKT_${t}}, ${ITKT_${t}}>")
   endforeach()
 itk_end_wrap_class()
 
diff --git a/wrapping/rtkJosephForwardAttenuatedProjectionImageFilter.wrap b/wrapping/rtkJosephForwardAttenuatedProjectionImageFilter.wrap
index 7dbee3c96..55423e2d0 100644
--- a/wrapping/rtkJosephForwardAttenuatedProjectionImageFilter.wrap
+++ b/wrapping/rtkJosephForwardAttenuatedProjectionImageFilter.wrap
@@ -1,10 +1,25 @@
+set(WRAPPER_AUTO_INCLUDE_HEADERS OFF)
+itk_wrap_named_class("rtk::Functor::InterpolationWeightMultiplicationAttenuated" "rtkFunctorInterpolationWeightMultiplicationAttenuatedBackProjection")
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}, ${ITKT_${t}}")
+  endforeach()
+itk_end_wrap_class()
+itk_wrap_named_class("rtk::Functor::ProjectedValueAccumulationAttenuated" "rtkProjectedValueAccumulationAttenuated")
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}")
+  endforeach()
+itk_end_wrap_class()
+itk_wrap_named_class("rtk::Functor::ComputeAttenuationCorrection" "rtkComputeAttenuationCorrection")
+  foreach(t ${WRAP_ITK_REAL})
+    itk_wrap_template("${ITKM_${t}}${ITKM_${t}}" "${ITKT_${t}}, ${ITKT_${t}}")
+  endforeach()
+itk_end_wrap_class()
+set(WRAPPER_AUTO_INCLUDE_HEADERS ON)
+
 itk_wrap_class("rtk::JosephForwardProjectionImageFilter" POINTER)
   foreach(t ${WRAP_ITK_REAL})
     itk_wrap_template("I${ITKM_${t}}3I${ITKM_${t}}3SWM${ITKM_${t}}D${ITKM_${t}}IPC"
-      "itk::Image<${ITKT_${t}}, 3>, itk::Image< ${ITKT_${t}}, 3>,
-       rtk::Functor::InterpolationWeightMultiplicationAttenuated<${ITKT_${t}}, ${ITKT_${t}}, ${ITKT_${t}}>,
-       rtk::Functor::ProjectedValueAccumulationAttenuated<${ITKT_${t}}, ${ITKT_${t}}>,
-       rtk::Functor::ComputeAttenuationCorrection<${ITKT_${t}}, ${ITKT_${t}}>")
+      "itk::Image<${ITKT_${t}}, 3>, itk::Image< ${ITKT_${t}}, 3>, rtk::Functor::InterpolationWeightMultiplicationAttenuated<${ITKT_${t}}, ${ITKT_${t}}, ${ITKT_${t}}>, rtk::Functor::ProjectedValueAccumulationAttenuated<${ITKT_${t}}, ${ITKT_${t}}>, rtk::Functor::ComputeAttenuationCorrection<${ITKT_${t}}, ${ITKT_${t}}>")
   endforeach()
 itk_end_wrap_class()
 


Test patch:
diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml
index d12b1599b..6dc81fc5b 100644
--- a/.github/workflows/build-test-package.yml
+++ b/.github/workflows/build-test-package.yml
@@ -136,7 +136,7 @@ jobs:
       matrix:
         python-version: [36, 37, 38, 39]
         include:
-          - itk-python-git-tag: "v5.2.0"
+          - itk-python-git-tag: "v5.2.0.post3"
 
     steps:
     - uses: actions/checkout@v2
@@ -172,7 +172,7 @@ jobs:
       max-parallel: 2
       matrix:
         include:
-          - itk-python-git-tag: "v5.2.0"
+          - itk-python-git-tag: "v5.2.0.post3"
 
     steps:
     - uses: actions/checkout@v2
@@ -208,7 +208,7 @@ jobs:
       matrix:
         python-version-minor: [6, 7, 8, 9]
         include:
-          - itk-python-git-tag: "v5.2.0"
+          - itk-python-git-tag: "v5.2.0.post3"
 
     steps:
     - name: Get specific version of CMake, Ninja