diff --git a/ants/core/ants_transform_io.py b/ants/core/ants_transform_io.py index c33643aa..99232d20 100644 --- a/ants/core/ants_transform_io.py +++ b/ants/core/ants_transform_io.py @@ -16,13 +16,17 @@ def new_ants_transform( - precision="float", dimension=3, transform_type="AffineTransform", parameters=None + precision="float", dimension=3, transform_type="AffineTransform", parameters=None, + fixed_parameters=None ): """ Create a new ANTsTransform ANTsR function: None + This is a simplified method for creating an ANTsTransform, mostly used internally. + See create_ants_transform for more options. + Example ------- >>> import ants @@ -42,6 +46,9 @@ def new_ants_transform( if parameters is not None: ants_tx.set_parameters(parameters) + if fixed_parameters is not None: + ants_tx.set_fixed_parameters(fixed_parameters) + return ants_tx @@ -268,7 +275,7 @@ def transform_to_displacement_field(xfrm, ref): displacement field ANTsTransform ref : ANTs Image - + Returns ------- ANTsVectorImage @@ -285,7 +292,7 @@ def transform_to_displacement_field(xfrm, ref): >>> atx = ants.transform_from_displacement_field( vec ) >>> field = ants.transform_to_displacement_field( atx, fi ) """ - + if not xfrm.type == 'DisplacementFieldTransform': raise ValueError("Transform must be of DisplacementFieldTransform type") libfn = utils.get_lib_fn("antsTransformToDisplacementFieldF%i" % xfrm.dimension)