Automatic segmentation of sequences in time

Hi everyone!

I imported a 4D TAC scan (10 timeframes) in “volume sequence”, I created a segmentation node, segmenting the first timeframe (aorta) and created a new sequence, setting the correct proxy node.

So, I was wondering if there is a way to make the segmentation in the other time frames “follow the CT intensity map” (a sort of segment registration), so as to obtain all 10 timeframes automatically segmented starting only from the segmentation of the first timeframe (adjusting then manually in case of errors).

Thank you all

Yes, you can compute displacement across the time sequence using Sequence registration module. It computes a transform sequence that you can apply to the segmentation.

I’ve added a video tutorial for this:

1 Like

Thank you so much!!

I followed all the steps, but when I click on “Register”, nothing seems to happen. I attach an image of what I see: the mouse icon is not in the form of a wheel but of a pointer, so it seems to have finished the operation when in reality nothing has happened …

Please try with the latest Slicer Preview Release and let us know if you run into any issues.

I downloaded the latest Preview Release (24/11/2021), however I have the same problem…
Compared to before, the mouse icon for a few seconds was in the form of a wheel, but then immediately becomed a pointer, with the operation not performed.

Do you see any error messages in the application log?

Does everything work well with the sample data set as shown in the tutorial video?

The same happens with the sample data set, and here is the Python window

Thank you, the log is very useful. What exact Windows version do you use?

| Edition | Windows 10 Home |
| Version | 20H2 |
| Installation date: | 13/04/2021 |
| OS Build | 19042.1348 |
| Experience | Windows Feature Experience Pack 120.2212.3920.0 |
System type: 64-bit operating system, x64-based processor

Thank you for everything you are doing, I really appreciate

Is your system locale set to English?

No, it’s in Italian, I translated the info tags I wrote before!

As a workaround, you can temporarily switch your system locale to English, but I’m working on a proper solution.

I update you on what I’ve done.
I switched my system locale to English, and now the operation is effectively completed for all 10 time frames.
However I don’t get any results (only an error), and the Python script is this:

You need to choose a different output for volume sequence and transform sequence (it is OK to choose only one and leave the other None).

Sorry, you’re right.
However correcting this, I still get the error regarding the “returnNode argument”, so then scrolling through the timeframes the segmentation does not change …

The message is just a warning, you can safely ignore it.

You need to apply the transform to the segmentation as it is explained in the tutorial video. Selection of the transform is done in a popup window and unfortunately the screen recording software did not capture the popup, but it is described in the video at 1:21 in the subtitles where to right-click in Data module and what to select.

@Francesca_Pittoni would you mind trying if replacing content of this file c:\Users\frapi\AppData\Local\NA-MIC\Slicer 4.13.0-2021-11-24\NA-MIC\Extensions-30427\SlicerElastix\lib\Slicer-4.13\qt-scripted-modules\Elastix.py with this content of this file makes it possible to run the registration even when your system locale is set to Italian?

Thank you very much, now everything works (in English)!

I only have two final questions:
Can I change the segmentation of a timeframe without affecting the others?
And to export the STLs of the timeframes individually, to different files, do I have to go to the “segmentation” module?

Now I’ll try to run it in Italian and I’ll let you know about it