RecipeRecorder ============== Recipe recording for capturing manual segmentation sessions. Records user actions and generates Python recipe files. Classes ------- .. py:class:: RecordedStroke A recorded brush stroke. .. py:class:: RecordedParamChange A recorded parameter change. .. py:class:: RecipeRecorder Record manual Slicer sessions into Python recipe files. Example: recorder = RecipeRecorder() recorder.start("MRBrainTumor1", "Tumor") # ... user performs manual segmentation ... recorder.stop() recorder.save("recipes/my_segmentation.py") **Methods:** .. py:method:: __init__() Initialize recorder. .. py:method:: start() Start recording a session. .. py:method:: stop() Stop recording. .. py:method:: record_stroke() Record a brush stroke. .. py:method:: record_param_change() Record a parameter change. .. py:method:: save() Save recording as a Python recipe file. .. py:method:: is_recording() Check if currently recording. Functions --------- .. py:function:: start() Start recording a session. Args: sample_data: Slicer SampleData name. segment_name: Name of the segment being created. .. py:function:: stop() Stop recording. .. py:function:: record_stroke() Record a brush stroke. Args: ras: RAS coordinates. erase: Whether this was an erase stroke. .. py:function:: record_param_change() Record a parameter change. Args: name: Parameter name. value: New value. .. py:function:: save() Save recording as a Python recipe file. Args: output_path: Path for the output file. .. py:function:: is_recording() Check if currently recording. .. py:function:: get_global_recorder() Get or create the global recipe recorder. .. py:function:: start_recording() Start global recording session. .. py:function:: stop_recording() Stop global recording. .. py:function:: is_recording() Check if global recording is active.