How can sequences be processed now
- Process a sequence manually
- set up processing (make sure “Save changes” is enabled for the output node in Sequence Browser module), set up processing parameters
- apply processing to current frame (typically by a mouse click)
- go to next frame (click Ctrl + Shift + right-arrow)
- repeat the last two steps (mouse click then Ctrl + Shift + right arrow) until all frames are processed
Up to maybe 10 frames and short processing time, manual workflow may be acceptable, but clearly not ideal.
- Add custom modules for processing that is commonly needed for sequences. One example is Sequence Registration module.
Although this requires only very small amount of software development and allows simple, optimized user interface, it would not be feasible to use this approach for all available operations in Slicer.
What could be done?
- Add sequence processor for operations implemented in CLI modules
To automate processing, we could add Sequence processing module, where you could select a CLI module parameter node and a sequence browser node. The module could then use the sequence browser node to iterate through a sequence of nodes and process each of them using the chosen CLI module. This would probably work well, but it could only be used for CLI modules.
- Record macro for one frame and apply it to all frame as recommended by @muratmaga. This method could complement method 1 (which is only applicable to CLI modules). There is already macro recording and replay capability in Slicer (enable QtTesting in Application settings and then Record macro / Play macro options will appear in Edit menu. It would not be too difficult to create a module, which would apply a recorded macro to each frame in a sequence. Since so far Macro recorder has been mainly used by developers only, for generating test scripts, it may need some work to make it robust and polished enough for regular users. I’ve been also thinking about slightly changing the macro recorder to be able to create Python scripts as well, which would be easier to edit by developers or users with minimal programming knowledge.
If anybody would like to explore these options I would be happy to help.