forked from KitwareMedical/ITK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Make dict_from_transform more consistent with other dict represe…
…ntations 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 serializations: Translation: ```py { 'transformType': {'transformParameterization': 'Translation', 'parametersValueType': 'float64', 'inputDimension': 3, 'outputDimension': 3}, 'name': '', 'inputSpaceName': '', 'outputSpaceName': '', 'parameters': array([3., 2., 8.]), 'fixedParameters': array([], dtype=float64), 'numberOfParameters': 3, 'numberOfFixedParameters': 0 } ``` Composite: ```py [ { 'transformType': {'transformParameterization': 'Translation', 'parametersValueType': 'float64', 'inputDimension': 3, 'outputDimension': 3}, 'name': '', 'inputSpaceName': '', 'outputSpaceName': '', 'parameters': array([3., 2., 8.]), 'fixedParameters': array([], dtype=float64), 'numberOfParameters': 3, 'numberOfFixedParameters': 0 }, { 'transformType': {'transformParameterization': 'Affine', 'parametersValueType': 'float64', 'inputDimension': 3, 'outputDimension': 3}, 'name': '', 'inputSpaceName': '', 'outputSpaceName': '', 'parameters': array([ 0.6563149 , 0.58065837, -0.48175367, -0.74079868, 0.37486398, -0.55739959, -0.14306664, 0.72271215, 0.67617978, -66. , 69. , 32. ]), 'fixedParameters': array([0., 0., 0.]), 'numberOfParameters': 12, 'numberOfFixedParameters': 3 } ] ``` 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.
- Loading branch information
Showing
4 changed files
with
80 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters