How to edit the segmentation masks generated after sequence registration

Hi, I applied the sequence registration to apply segmentation to series of images. However, I cannot edit the generated masks by using the tools in the segment editor. Is there a way to edit the segmentation masks after applying the sequence registration? Thanks!

What did you do exactly? What did you expect to happen? What happened instead?

Thanks for the response! I have a volume sequence of MRI dicom images. I want to segment the heart along the time sequence and get the warped stl surface mesh of heart along the time sequence. I followed the steps shown in (Create an animated 4D surface model by segmenting a single 3D frame - YouTube) e.g. segment heart at one of the time frame, apply registration to the volume sequence, apply the calculated transform to the segmentation sequence. I got the dynamic warped mesh along the sequence but the segmentations obtained at each time frame is not accurate. Is there any way to modify the automatically generated segmentation at each time frame? The segment editor tool do not seem to modify the automatically generated segmentation mask. Thanks!

Hi Sanjib. Did you find the solution to this?

I found that you can ‘harden’ the transform at a given time point which alters the segmentation mask itself and this should be editable.

I am not an expert and am currently struggling with altering the segmentation at all time points though. I think my problem is (and perhaps the moderators can help) that the transform is computed relative to the frame you use as reference (let’s say tref). And so once you harden the transform to adjust the segmentation mask to a different time (let’s say tref + 2) then the application of the original transform to that mask starts to create error as it is now warping the segmentation at tref +2 as if it were the segmentation at tref -which isn’t the case.

Did you find this to be the case and did you find a work around?

I might be missing some knowledge about handling sequences but the (cumbersome) workaround might be to clone your segmentation as many times as there are time points and harden the transform to each clone segmentation at its respective time point.

A nice feature would be to be able to switch the transform from being all relative to one time frame to being relative to its previous frame but in my naiveté this might be a big ask.

To create a sequence of warped models and segmentations (that you can edit or save), you need to clone the node and harden the transform on it for each time point.

Doing this manually can be somewhat tedious so it may worth writing a short Python script for it, something similar to this.

It could make sense to write a small module that can create a warped sequence from an input node and a transform sequence. @che85 do I remember correctly that we talked about this and you might implement such a module?