Saving the data in json should be almost as simple as pickling and would have many advantages (I don’t even want to get started on that). You could even use Slicer’s markup json file format and then you would not need an importer at all, you could just drag-and-drop the files into Slicer to load them and could directly save them from Slicer.
Yes, you put the MyModuleFileReader
and MyModuleFileWriter
classes into any scripted module in your extension and Slicer automatically discovers them when the module is loaded. MyModule
is the name of the main module class.