Skip to content

Commit

Permalink
ENH: Add Python Wrappers for Mesh Source Classes
Browse files Browse the repository at this point in the history
This patch adds python wrappers for the itk::RegularSphereMeshSource
and itk::SphereMeshSource classes.  Additionally, tests are added
to ensure that the wrapped classes instantiate without error.
  • Loading branch information
sudomakeinstall authored and dzenanz committed May 12, 2020
1 parent 5183490 commit a10f19e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Modules/Core/Mesh/wrapping/itkRegularSphereMeshSource.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
itk_wrap_include("itkMesh.h")

itk_wrap_class("itk::RegularSphereMeshSource" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_REAL})
itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >")
endforeach()
endforeach()
itk_end_wrap_class()
9 changes: 9 additions & 0 deletions Modules/Core/Mesh/wrapping/itkSphereMeshSource.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
itk_wrap_include("itkMesh.h")

itk_wrap_class("itk::SphereMeshSource" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_REAL})
itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >")
endforeach()
endforeach()
itk_end_wrap_class()
4 changes: 4 additions & 0 deletions Modules/Core/Mesh/wrapping/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ itk_python_expression_add_test(NAME itkVTKPolyDataMeshIOPythonTest
EXPRESSION "instance = itk.VTKPolyDataMeshIO.New()")
itk_python_expression_add_test(NAME itkTransformMeshFilterPythonTest
EXPRESSION "instance = itk.TransformMeshFilter.New()")
itk_python_expression_add_test(NAME itkRegularSphereMeshSourcePythonTest
EXPRESSION "instance = itk.RegularSphereMeshSource.New()")
itk_python_expression_add_test(NAME itkSphereMeshSourcePythonTest
EXPRESSION "instance = itk.SphereMeshSource.New()")

0 comments on commit a10f19e

Please sign in to comment.