Documentation/Labs/ParameterSerializer
From Slicer Wiki
Revision as of 20:21, 9 August 2016 by Johan.andruejol (talk | contribs)
Home < Documentation < Labs < ParameterSerializer
Contents
Overview
This page gathers the information regarding the integration of the Parameter Serializer.
Limitations of the current infrastructure
- The only way to serialize CLIs is through the MRML scene, it's hard to save the configuration of just one CLI.
- When running a CLI with the command line, you have to specify all the arguments that are not default. It would be nice to be able to use a file instead.
Proposed improvements
By adding support for the Parameter Serializer users would be able to save(/load) their CLI configuration to(/from) a JSON file. That would be applicable both for using CLI through the command line and for using CLIs in the Slicer application. That serialization should also mesh well with the python infrastructure.
Example of a Json file obtained from the Gaussian Blur Filter:
- {
- "Parameters" :
- {
- "IO" :
- {
- "inputVolume" : "W:/Slicer/Data/MRHead.nrrd",
- "outputVolume" : "W:/Slicer/Data/MRHead-blurred.nrrd",
- "sigma" : 1
- }
- {
- }
- "IO" :
- {
- "Parameters" :
- }
Plan of integration
What already exists
- Slicer Execution Model already supports using the Parameter Serializer.
TODO
- Build JsonCpp in Slicer
- Branch for improving JsonCpp support in Slicer Execution Model
- Branch for being able to build & package Slicer with JsonCpp.
- Build Parameter Serializer in Slicer
- Make CLI storable in Json files
- Make the vtkMRMLCommandLineModuleNode a vtkMRMLStorableNode
- Implement vtkMRMLCommandLineModuleStorageNode
- Make Python module storable in Json files
- Make the vtkMRMLScriptedNode a vtkMRMLStorableNode
- Implement vtkMRMLScriptedStorageNode to save the parameter node like a CLI node.