Skip to content

Commit

Permalink
COMP: use WRAP_ITK_SCALAR instead of WRAP_ITK_REAL in mesh filters
Browse files Browse the repository at this point in the history
It would cause runtime errors such as:

itk.meshwrite(mesh, file_path)
   ...
itk.support.extras.TemplateTypeError: itk.MeshFileWriter is not wrapped for input type `itk.Mesh[itk.UC,3]`.
To limit the size of the package, only a limited number of
types are available in ITK Python.
...
Supported input types:
itk.Mesh[itk.F,2]
itk.Mesh[itk.D,2]
itk.Mesh[itk.F,3]
itk.Mesh[itk.D,3]
  • Loading branch information
dzenanz authored and thewtex committed Aug 11, 2021
1 parent 3d85faf commit 68944d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Modules/Core/Mesh/wrapping/itkMeshToMeshFilter.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h")

itk_wrap_class("itk::MeshToMeshFilter" POINTER)
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_REAL})
foreach(t ${WRAP_ITK_SCALAR})
itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}"
"itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >")
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Mesh/wrapping/itkTransformMeshFilter.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ itk_wrap_class("itk::TransformMeshFilter" POINTER)
# Transform parameter types
UNIQUE(transform_type "D;${WRAP_ITK_REAL}")
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${WRAP_ITK_REAL})
foreach(t ${WRAP_ITK_SCALAR})
foreach(tt ${transform_type})
itk_wrap_template("M${ITKM_${t}}${d}M${ITKM_${t}}${d}T${ITKM_${tt}}${d}${d}"
"itk::Mesh< ${ITKT_${t}},${d} >, itk::Mesh< ${ITKT_${t}},${d} >, itk::Transform< ${ITKT_${tt}}, ${d}, ${d} >")
Expand Down
2 changes: 1 addition & 1 deletion Modules/IO/MeshBase/wrapping/itkMeshFileWriter.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ itk_wrap_include("itkDefaultStaticMeshTraits.h")
itk_wrap_include("itkDefaultDynamicMeshTraits.h")

itk_wrap_class("itk::MeshFileWriter" POINTER)
UNIQUE(types "${WRAP_ITK_REAL};D")
UNIQUE(types "${WRAP_ITK_SCALAR};D")
foreach(d ${ITK_WRAP_IMAGE_DIMS})
foreach(t ${types})
itk_wrap_template("M${ITKM_${t}}${d}" "itk::Mesh< ${ITKT_${t}},${d} >")
Expand Down

0 comments on commit 68944d5

Please sign in to comment.