from capsul.api import capsul_engine
from capsul.pipeline import pipeline_tools
ce = capsul_engine()
m = ce.get_process_instance('morphologist.capsul.morphologist')
m.t1mri = '/tmp/bloup.nii'
pipeline_tools.save_pipeline(m, '/tmp/morph.xml')
m2 = ce.get_process_instance('/tmp/morph.xml')
causes the following error:
/casa/host/src/capsul/master/capsul/pipeline/pipeline_construction.py in pipeline_definition(self)
163 method = getattr(self, method_name)
--> 164 method(*args, **kwargs)
165 except Exception as e:
/casa/host/src/capsul/master/capsul/pipeline/pipeline.py in add_link(self, link, weak_link, allow_export)
1015 source_plug, dest_node_name, dest_plug_name, dest_node,
-> 1016 dest_plug) = self.parse_link(link, check=check)
1017 else:
/casa/host/src/capsul/master/capsul/pipeline/pipeline.py in parse_link(self, link, check)
917 if err and dest_node is not None and dest_plug is not None and check:
--> 918 six.reraise(*err)
919
/usr/local/lib/python3.6/dist-packages/six.py in reraise(tp, value, tb)
718 raise value.with_traceback(tb)
--> 719 raise value
720 finally:
/casa/host/src/capsul/master/capsul/pipeline/pipeline.py in parse_link(self, link, check)
902 source_node_name, source_plug_name, source_node, source_plug = \
--> 903 self.parse_parameter(source, check=check)
904 except ValueError:
/casa/host/src/capsul/master/capsul/pipeline/pipeline.py in parse_parameter(self, name, check)
979 plug_name, (node_name if node_name
--> 980 else "pipeline")))
981 else:
ValueError: 'normalization_transformation' is not a valid parameter name for node 'PrepareSubject'
This is probably because Morphologist is a customized pipeline with automatically converted processes/subpipelines, then some are inherited and parameters are deleted/added on the fly, but it should be possible to save/reload it anyway.
Namely the Morphologist pipeline causes trouble:
causes the following error:
This is probably because Morphologist is a customized pipeline with automatically converted processes/subpipelines, then some are inherited and parameters are deleted/added on the fly, but it should be possible to save/reload it anyway.