How to dynamically update the StringName of ParameterNode?

Hi everyone,

I am trying to design my first extension module, similar to the module “Sequences” but with real-time frame annotations from AI image processing for live ultrasound sequence collection.

My first question is about the StringName of ParameterNode of each SequenceBrowser. Due to the fact that there could be multiple SequenceBrowsers with multiple CurrentSlider-Index, and the users may even rename the name of a SequenceBrowser, how should I remove/update the “StringName
of ParameterNode” when the user deletes one SequenceBrowser, and how should I update/rename the “StringName of ParameterNode” to avoid redundantly adding new “StringName
of ParameterNode” even the user just renames the SequenceBrowser?

My second question, which may not be possible, instead of creating a new module, is it possible to get the python script source code of module “Sequences” thus I can modify it directly?

Thank you so much in advance!

To refer to a node from any other node, you must use node references (SetNodeReferenceID, GetNode Reference, etc. methods).

Hi Andras,

Thank you so much for your help!

I found the attribute “selectedItemNumber” from vtkMRMLSequenceBrowserNode in the scene file, which solved my problem.
As you can see in the screenshot below, I am now able to retrieve SequenceBrowser and show the FrameIndex in my own module, and I should also be able to do offline annotation now.

image

However, it might be impossible for me to complete a new “Sequences” module for the new sequence recording, and it seems that the existing “Sequences” module does not support PyQt5 script source code.

What should I do to make the annotation online?
E.g., after I click the recording button in the “Sequences” module to record a sequence of ultrasound data, as the real-time raw image shown in the red widget, how should I annotate a “Yes” notation in the center of the raw image and show the annotated image in the yellow widget lively?

Assume this problem can be solved in three steps:
1. How can I add a new short-cut button in the toolbar to trigger the annotation?
2. How should I retrieve the real-time raw image?
3. How should I display the annotated image in the yellow widget?

Thank you again for your valuable time!

Not able to edit the last post now.

Since the last post is kind of a problem different from the topic, I made a new topic below to ask for help:

Please help remove my last post if necessary.

Thank you so much in advance!

Please help remove the