How to Propagate Labels on 2D time series?

I’m trying to manually segment an untracked ultrasound sweep, which is saved as an .mha file.
However, ImFusion Labels treats this file as a 3D volume instead of a temporal sequence. For example, the brush is a 3D spherical brush instead of a 2D circular brush, and more significantly the propagate labels function is not available.

How do I load this data appropriate so that I can use 2D functionality? I also have the images from this sequence saved as multiple .png files, but ImFusion does not treat this series as one set either.

Thanks!

Dear Prashant,

Our MetaImage loader assumes that the third dimension is always the z-axis.
If you want to load your ultrasound scan, you need to add a fourth dimension in the header, which will be considered as the temporal one.

For instance, replace

NDims = 3
DimSize = 256 256 124
ElementSpacing = 0.05 0.05 1.0

with

NDims = 4
DimSize = 256 256 1 124
ElementSpacing = 0.05 0.05 1.0 1.0

I see, thanks. What is the best way to edit the header, because in the past I have had problems where the .mha file becomes corrupt after editing the header in an editor like Sublime?

EDIT: Figured it out, solution was to use a different editor or convert to .mhd/.mha format to edit header.

Actually, that’s a good suggestion to add an option for this in the UI. I’ve created an internal ticket for it (SUITE-1784). Thank you!

Hi, after some months, we have decided that specialized loader options are not our priority now for ImFusion Labels.

I would suggest the following:

  1. Load the sweep into the ImFusion Suite via Import/Freehand Ultrasound File. This will load the sweep together with the tracking information.
  2. Save it as ImFusion file (via the context menu / Export).
  3. Import the ImFusion file into Labels.

You can also do this via a workspace file from the console, e.g. for batch processing.

Hello Oliver,
I have 2D sparse masks (Annotations) on a freehand ultrasound file (.mha).
image

I would like to create a SMOOTH volume with label propagation.

The sweep compounding algorithm return this:

  1. Do you have a fit of surface?

I created a mesh from volumes and I use mesh_post_processing_algo for smoothing. But I have big holes or I have extra sections.

  1. Do you have a labeling propagation algorithm?

Thank you so much for your help!
Stay safe!
Vanessa GONZALEZ DUQUE

Hi Vanessa,
If you use the sweep compounding algorithm, you need to ensure that adjacent frames contain masks to fill the part of the volume between them. If you have empty frames in between, the resulting sections in the volume will be empty. So I guess the easiest approach would be to remove empty frames.

  1. No algorithm for smoothing or hole filling will be able to achieve what you want to do, because the holes are open and too big. Plus, smoothing will create lots of artifacts you probably won’t want.

  2. Yes, it’s in ImFusion Labels and uses frame-to-frame registration to carry the labels forward.

Hello,
Thank you for answer me.

  1. With your advice, I copy the mask until the next mask appeared. Now I have not empty spaces. (“interpolation order 0”)


    Do you have an smoothing_algorithm for volume? Or should I created a mesh and use mesh_post_processing_algo for smoothing?

  2. I use: “improving existing segmentation” answer from the forum.
    Labelling_algorithm does not allow label propagation but links mask to its ultrasound image, So I thought I could do label propagation. (Note: labelling appear only If I have number of mask images equal to the number of ultrasound images. I must create black empty annotations for images without mask).

But propagation_Algorithm does not apear in labbeling, just in imfusion_labels->Segmentation.
How can I “import label_maps” (mha annotations) as seeds of annotations to aply label_propagation_algo?

There exist other way of linking? I try “edit mask -> atach” but it does not link.

Thank you in advance!

Hello,
I would like to use algorithms of seeds to propagate 2D masks. (Graph-base segmentation, propagate labels or intensive clustering)
3. How can I set as label-map a freehand-ultrasound mha file?
4. How can I link it to a freehand-ultrasound 2d or 3d? for aply any segmentation algorithm?


5. Do you have a tutorial for using frame-to-frame registration? How does I find it inside Imfusion-Labels?

Thanks for helping me. I love imfusion suite!

Hi Vanessa,

  1. There is indeed a smoothing filter that works on volumes. Right-click on the volume and select Filters> Common Filters.
    One of the choices in the combo box will be “Smoothing”.

  2. Sorry, I am not sure to really understand your question.

  3. Hmm I think this is not possible because our class ImFusion::UltrasoundSweep enforces the modality to be Ultrasound.
    Usually segmentations of ultrasound sweeps are standard ImFusion::SharedImageSet. How did you generate such a label map?

  4. Some segmentation algorithms (but not all of them yet) like Graph-based Segmentation support a second input as the label map.
    You should then select two images simultaneously (you will see a 1 and a 2 appear in the Data panel); the first data should be the image and the second one the label map.

  5. The documentation of Labels should be included in the installer (look for doc/Labels/index.html), the Label Propagation action is described there.
    The Labels interface is also available directly in the Suite via the context menu ImFusion Labels>Segmentation

Hi Raphael,
Thank you so much for the answer!

  1. The smoothing filter works perfect! Its a first nice approximation of what I am searching. Thank you!
  2. Sorry, I try to explain better: I am migrating data from other software.
    a) As you can see in my first post, I have a freehand ultrasound file (mha) and 2D binary mask over 2D US images.
    b) I create also the US 3D volume and the have a label-volume with seeds.

In 3D or in 2D: I want to use this masks as seeds to run labels propagation algorithms, as Graph-cut; active contours; demons image registration; Region growing; etc.

I saw you have implemented:
a) Graph-base method
b) Intensitive clustering.
c) Interacive segmentation that I suppose is the same as frame-to-frame registration method mentioned by Oliver?: (It worked relative well for me)
d) Watershed segmentation method.

I tried:

  • d) Watershed segmentation: How can I call the labels that are on my workspace as seeds? It says when I try to initialize fron existing segmentation in the refine section.
  • a) Graph methods just close the program. After some minutes.
  • b) Interactive clustering said: “No clusters have been selected”
    Do you have an idea what I am missing? Do you have others algorithms?
    I thank you so much for your help!
    Vanessa.