Closed thewtex closed 2 months ago
Is it possible to share a sample json output (dict representation for a transform) for a single and composite transform? That will make these changes very clear.
Something similar to https://github.com/InsightSoftwareConsortium/ITK/pull/3470
I only have a question regarding the need to support a list of transforms in the dict_from_transform method. Since it already handles multiple transform use cases under the CompositeTransform Object.
Also supporting a list of transforms will make this different compared to Image and Mesh methods which only work on one Image/Mesh Object.
Is it possible to share a sample json output (dict representation for a transform) for a single and composite transform? That will make these changes very clear.
Yes, added to the PR description and commit.
I only have a question regarding the need to support a list of transforms in the dict_from_transform method. Since it already handles multiple transform use cases under the CompositeTransform Object.
Also supporting a list of transforms will make this different compared to Image and Mesh methods which only work on one Image/Mesh Object.
Yes, it is a bit different from Image/Mesh since we have a chain of transforms. Support for this use case came up in the test for working with the result of itk.transformread
. We could have:
list
of transforms that is generated by itk.transformread
I added docstrings to help clarify.
LGTM
Encapsulate the "transformParameterization", "parametersValueType", "inputDimension", "outputDimension", which are static, into a "transformType" member, similar to "imageType", "meshType" for Images, Meshes. "transformParameterization" is the string name of the ITK transform class, less the trailing "Transform".
Example serialization:
Remove unused numpy import in setstate.
Support both a list of transforms and a single transform in dict_from_transform.
Add more smoke tests in extras.py.