Skip to content

feat(itkwasm): add pyodide support for TransformList#1406

Merged
thewtex merged 5 commits intoInsightSoftwareConsortium:mainfrom
thewtex:pyodide-transform
Jun 26, 2025
Merged

feat(itkwasm): add pyodide support for TransformList#1406
thewtex merged 5 commits intoInsightSoftwareConsortium:mainfrom
thewtex:pyodide-transform

Conversation

@thewtex
Copy link
Copy Markdown
Member

@thewtex thewtex commented Jun 24, 2025

No description provided.

@thewtex thewtex requested a review from Copilot June 25, 2025 00:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for converting lists of Transform objects (a TransformList) between Python and JavaScript in Pyodide.

  • Extended to_js and to_py in pyodide.py to detect and handle lists of Transform instances.
  • Imported TransformList and updated array conversion logic.
  • Added an end-to-end Pyodide test test_transform_list_conversion that round-trips a TransformList.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/core/python/itkwasm/test/test_pyodide.py New async test for TransformList conversion in Pyodide environment.
packages/core/python/itkwasm/itkwasm/pyodide.py Imports and conversion logic for serializing/deserializing TransformList.
Comments suppressed due to low confidence (2)

packages/core/python/itkwasm/test/test_pyodide.py:274

  • Add an assertion for translation_py.fixedParameters to verify that fixedParameters is correctly converted to an empty array.
    np.testing.assert_allclose(translation_py.parameters, translation_parameters)

packages/core/python/itkwasm/itkwasm/pyodide.py:8

  • The imported TransformList alias is not referenced in this module and can be removed to avoid an unused import.
from .transform import Transform, TransformType, TransformList

Comment thread packages/core/python/itkwasm/itkwasm/pyodide.py Outdated
@thewtex thewtex force-pushed the pyodide-transform branch from e98c726 to 6a58abc Compare June 25, 2025 12:04
@thewtex thewtex merged commit 1e1c09e into InsightSoftwareConsortium:main Jun 26, 2025
80 checks passed
@thewtex thewtex deleted the pyodide-transform branch June 26, 2025 14:00
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