Closed MichaelColonel closed 4 years ago
This workaround could be good for Slicer-4.10, but for Slicer-4.11 it should be very easy to create a sequence node instead. You create the nodes the same way as before, but instead of adding it to the main scene, you add them to a vtkMRMLSequenceNode using SetDataNodeAtValue. Then you add the sequence node to the main scene. For user's convenience, you can create a sequence browser node. I would be happy help with any specific questions that you might have.
Agreed. I will try to add sequence nodes instead.
If you can take a stab at it @MichaelColonel we appreciate it! Let us know if you have any questions.
First round of questions:
Before beam node will be added to the sequence node, it must be properly loaded, transformed, etc. Is it possible to invoke custom event (or events) for beam node, while these beam nodes are played by a sequence browser node? It is required, because beam transformation beamNode->InvokeCustomModifiedEvent(vtkMRMLRTBeamNode::BeamTransformModified);
becomes super laggy, then hundreds of such nodes are in the plan node.
Should a sequence node be added to the plan node, so the user will be able to see what king of beam is it (static single beam or dynamic beam with multiple control points)?
How the sequence node must be added to the subject hierarchy?
Another question:
Does the subject hierarchy plugin required in order to make sequence node visible in subject hierarchy node?
Before beam node will be added to the sequence node, it must be properly loaded, transformed, etc. Is it possible to invoke custom event (or events) for beam node, while these beam nodes are played by a sequence browser node? It is required, because beam transformation beamNode-
Loading: you load into a data node the same way. The only difference is that the data node is in the sequence node's internal scene.
Transform: you apply the transform to the proxy node (the node that represents a selected sequence item in the main scene). If the transform is time-varying, too, then the transform node in the main scene is a proxy node, too.
InvokeCustomModifiedEvent(vtkMRMLRTBeamNode::BeamTransformModified); becomes super laggy, then hundreds of such nodes are in the plan node.
There won't be hundreds of nodes in the main scene. All the time-varying nodes will be in internal scenes in sequence nodes.
Should a sequence node be added to the plan node, so the user will be able to see what king of beam is it (static single beam or dynamic beam with multiple control points)?
You can retrieve sequence node from the proxy node, but it probably make sense to keep a node reference directly to the beam sequence node.
How the sequence node must be added to the subject hierarchy?
Usually we don't add subject hierarchy plugin for the sequence node: the user selects a time point with the sequence browser slider and works with proxy nodes corresponding to that time point. However, if you want the beam sequence to show up (and not just the current beam) then you can certainly add a subject hierarchy plugin for it.
Does the subject hierarchy plugin required in order to make sequence node visible in subject hierarchy node?
Yes.
Last question for today:
Can a virtual output nodes created by a sequence browser, in my simple case beam node and transformation node from corresponding sequences, be manipulated as a usual nodes, for example added to the plan?
Yes, you can use proxy nodes (old term: virtual output nodes) the same way as any other regular nodes.
Temporary fix for issue #145. Tests are passed, except python scripts.
If multiple control points are not required immediately.