Merge multiple labelmaps

Dear ImFusion Team,

I would like to merge multiple 3D labelmaps with different volume sizes by maintaining their relative transformations to one another. The result should be one single labelmap that looks like the visualization ImFusion offers when loading the 2 separate labelmaps. You can see this in the image below

My current approach is:

  1. Select both labelmaps and apply Image Resampling. This resamples Labelmap B with Labelmap A as reference and results in Resampled Labelmap B
  2. Select Labelmap A and Resampled Labelmap B and apply Label Operations with Union. This results into the combined labelmap.

The issue I have is with step one that results in a cropped labelmap B as you can see below

Is there a way to preserve the sizes of both 2 images in the result?

Thank you,
Miruna

Hi Miruna,

  • You can try the algorithm Registration>Volume Compounding after selecting the two label maps.
    You should change the Mode parameter to max (assuming that the yellow value is higher than the background one).
  • The alternative would be to use meshes as a temporary representation: run the Extract Mesh algorithm on both images, then combine the new meshes, and convert them again to a label map.

Hi Raphael,

thank you for your answer! Volume Compounding works for me.

Best,
Miruna

Hi Raphael,

after trying out the Volume Compounding for a while I noticed an issue with the result. In the image below you can see two labelmaps with two different labels: 1 and 2. The background is labeled with 0. I perform Volume Compounding with the Mode parameter to Max. It seems like the first label (red) now also appears around the second label (blue).

What might be the source of this unexpected result?

Thank you,
Miruna

Hi Miruna,

I looked into the algorithm. The issue is that it uses trilinear interpolation when looking up pixel values before the actual max-compounding. This introduces the interpolation artifacts that you are experiencing.
To my knowledge there is currently no way to change this behavior and I could also not come up with a workaround. I’m sorry about that.

I filed SUITE-3133 in our internal issue tracker. I’m confident that we can offer a fix/support for this use case in one of the next releases as it should be easy to implement.

Cheers,
Christian

Hi Miruna,

I just merged the fix. The new feature will be available with the next release of version >= 2.46.

Cheers,
Christian

Hi Christian,

do you already know when the fix will be available/ version 2.46 will be released? I am having the same problem as Miruna and could not find another solution either. Latest version for academia I can find is 2.42.
Thanks in advance!

Kind regards
Alexander

Hi Miruna and Alexander,

we just published a new release with version 2.47, which you can find here: https://forum.imfusion.com/t/latest-academic-installers-including-labels-2-42/36

Cheers,
Christian