Thanks very much for previous assistance.
I’m trying to create side-by-side views of different volumes (same patient, different MR acquisition sequences), with different segmentations active in each view. I have created two segmentation nodes, and I’m using the Segment Editor module.
When I do this, the displayed volume in both slice views changes to the master volume, and resets the displayed slice to the middle of the range. Also, the segmentation that I’m editing and the mouse cursor appear in both slice views, even when I get them to show different volumes.
I tried
You may also want to decouple slice browsing between two sets of views (when you move slice views by Shift+MouseMove). To achieve that, make sure the two sets of views use a different view group.
Thank you very much, I’ve downloaded the newest build, and I’ll try this out.
Regarding decoupling slice browsing, I’m actually linking the two slice views so that the slices shown are in the same axis and same position. With linking on, that’s working as I need it to.
Thanks again.
I’ve implemented the change, and it’s working well. The only thing I noticed is that the available Undo actions resets every time the segmentation node and master volume change. Is this the expected behaviour?
Yes, it is expected. History is stored in the Segment Editor node. You can have two Segment Editor widgets in your module GUI to avoid the need of changing the segmentation node and just hide the one that you don’t use.
I’ve started trying to set up two segment editors, though I noticed that there is a singleton tag associated with vtkMRMLSegmentEditorNode in SegmentEditor.py. I’ve tried a couple of ways to define two editors, but without success. How can I create two functioning segment editors?
We haven’t considered having two segment editor active at the same time when we designed it, but it may be possible to set up.
Segment editor node does not have to be singleton, you can have more such nodes in the scene, just make sure you set the correct one in each segment editor widget.
Each widget will manage those views where the associated segmentation node is displayed in. So, you’ll have to make sure that you set up view node IDs for each segmentation node accordingly.
Can you tell us a bit about your workflow? Why do you find it useful to have two active segment editors?
Here’s a screenshot of what I have so far. It’s side-by-side MR image sets for the same patient’s leg. There is a common set of controls. I’m trying to get the Undo/Redo buttons working.
Right now, the segment editor’s active segmentation and master volume automatically change when the mouse moves from the Red to the Yellow view. When we were discussing this a few months ago, you said that every time the segmentation is changed in the editor, the undo history is forgotten, and suggested I could keep the undo history for both segmentations if I didn’t have to keep switching the active segmentation in the same editor.
Ultimately what I want is to be able to click “Undo” and have the previous change be undone, whichever one of the segmentations was last changed.
I don’t think I can, from my understanding. The image sets have different dimensions, so I can’t use the same master volume node or reference image geometry.
That’s a good suggestion, but I don’t think it will work for my application. I’m interested in the specific voxel values that correspond to the label maps.
I’ll shelve this task for now, and revisit it later. Perhaps I can request a feature of retaining undo histories for multiple Segmentations in the same segment editor?
Unless we have strong use cases, it is unlikely that we’ll implement maintaining history for multiple Segmentations (due to additional complexity of implementation and potentially increased memory need). If you really want to have such a feature then maybe we could add the necessary API to allow external implementation (for example, emit save state signals that you can use to maintain your own segmentation history objects).