Skip to content

Fix wrong file names in itk_python_add_test#82

Open
acoussat wants to merge 1 commit into
RTKConsortium:mainfrom
acoussat:fix-python-tests
Open

Fix wrong file names in itk_python_add_test#82
acoussat wants to merge 1 commit into
RTKConsortium:mainfrom
acoussat:fix-python-tests

Conversation

@acoussat
Copy link
Copy Markdown
Collaborator

@acoussat acoussat commented May 7, 2026

Fixes a bug introduced by #80.

I think this mistake went unnoticed because these two tests are never ran by the CI. As far as I remember, either we run ctest with ITK_WRAP_PYTHON=OFF or we run pytest with ITK_WRAP_PYTHON=ON, but we never run ctest with ITK_WRAP_PYTHON=ON. Is there a similar issue in RTK, which also uses itk_python_add_test? @axel-grc

@acoussat
Copy link
Copy Markdown
Collaborator Author

acoussat commented May 7, 2026

CI fails with the error

In file included from /work/include/pctProtonPairsToBackProjection.h:151,
                 from /work/ITK-cp311-cp311-manylinux_2_28_x64/Wrapping/Typedefs/pctProtonPairsToBackProjectionSwigInterface.h:18,
                 from /work/build/cp311-abi3-linux_x86_64/Wrapping/Modules/PCT/pctProtonPairsToBackProjectionPython.cpp:5085:
/work/include/pctProtonPairsToBackProjection.hxx: In lambda function:
/work/include/pctProtonPairsToBackProjection.hxx:193:49: error: cannot convert ‘VectorType’ {aka ‘itk::Vector<double, 3>’} to ‘const rtk::QuadricShape::PointType&’ {aka ‘const itk::Point<double, 3>&’}
  193 |             if (m_QuadricIn->IsIntersectedByRay(pIn, dIn, nearDistIn, farDistIn) &&
      |                                                 ^~~
      |                                                 |
      |                                                 VectorType {aka itk::Vector<double, 3>}
In file included from /work/include/pctProtonPairsToBackProjection.h:7:
/work/include/rtkQuadricShape.h:77:41: note:   initializing argument 1 of ‘virtual bool rtk::QuadricShape::IsIntersectedByRay(const PointType&, const VectorType&, ScalarType&, ScalarType&) const’
   77 |   IsIntersectedByRay(const PointType &  rayOrigin,
      |                      ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/work/include/pctProtonPairsToBackProjection.hxx:194:50: error: cannot convert ‘VectorType’ {aka ‘itk::Vector<double, 3>’} to ‘const rtk::QuadricShape::PointType&’ {aka ‘const itk::Point<double, 3>&’}
  194 |                 m_QuadricOut->IsIntersectedByRay(pOut, dOut, farDistOut, nearDistOut))
      |                                                  ^~~~
      |                                                  |
      |                                                  VectorType {aka itk::Vector<double, 3>}
/work/include/rtkQuadricShape.h:77:41: note:   initializing argument 1 of ‘virtual bool rtk::QuadricShape::IsIntersectedByRay(const PointType&, const VectorType&, ScalarType&, ScalarType&) const’
   77 |   IsIntersectedByRay(const PointType &  rayOrigin,
      |                      ~~~~~~~~~~~~~~~~~~~^~~~~~~~~

I'm a bit confused as it does not seem related to the current PR, and I cannot reproduce it on my machine. @axel-grc any idea?

@SimonRit
Copy link
Copy Markdown
Collaborator

CI fails with the error

In file included from /work/include/pctProtonPairsToBackProjection.h:151,
                 from /work/ITK-cp311-cp311-manylinux_2_28_x64/Wrapping/Typedefs/pctProtonPairsToBackProjectionSwigInterface.h:18,
                 from /work/build/cp311-abi3-linux_x86_64/Wrapping/Modules/PCT/pctProtonPairsToBackProjectionPython.cpp:5085:
/work/include/pctProtonPairsToBackProjection.hxx: In lambda function:
/work/include/pctProtonPairsToBackProjection.hxx:193:49: error: cannot convert ‘VectorType’ {aka ‘itk::Vector<double, 3>’} to ‘const rtk::QuadricShape::PointType&’ {aka ‘const itk::Point<double, 3>&’}
  193 |             if (m_QuadricIn->IsIntersectedByRay(pIn, dIn, nearDistIn, farDistIn) &&
      |                                                 ^~~
      |                                                 |
      |                                                 VectorType {aka itk::Vector<double, 3>}
In file included from /work/include/pctProtonPairsToBackProjection.h:7:
/work/include/rtkQuadricShape.h:77:41: note:   initializing argument 1 of ‘virtual bool rtk::QuadricShape::IsIntersectedByRay(const PointType&, const VectorType&, ScalarType&, ScalarType&) const’
   77 |   IsIntersectedByRay(const PointType &  rayOrigin,
      |                      ~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/work/include/pctProtonPairsToBackProjection.hxx:194:50: error: cannot convert ‘VectorType’ {aka ‘itk::Vector<double, 3>’} to ‘const rtk::QuadricShape::PointType&’ {aka ‘const itk::Point<double, 3>&’}
  194 |                 m_QuadricOut->IsIntersectedByRay(pOut, dOut, farDistOut, nearDistOut))
      |                                                  ^~~~
      |                                                  |
      |                                                  VectorType {aka itk::Vector<double, 3>}
/work/include/rtkQuadricShape.h:77:41: note:   initializing argument 1 of ‘virtual bool rtk::QuadricShape::IsIntersectedByRay(const PointType&, const VectorType&, ScalarType&, ScalarType&) const’
   77 |   IsIntersectedByRay(const PointType &  rayOrigin,
      |                      ~~~~~~~~~~~~~~~~~~~^~~~~~~~~

I'm a bit confused as it does not seem related to the current PR, and I cannot reproduce it on my machine. @axel-grc any idea?

Should be fixed by #83 indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants