Combine several segmentation VOIs on z axis

I have a CT volume of 1500 x 1500 x 3000. To be able to segment them without crashing my laptop while seeing enough details, I follow the following pipeline.

  1. I have divided them into 3 VOIs along the z-axis, each VOI having 1500 x 1500 x 1000
  2. Downsampled them to 1/2 resolution.
  3. Segmented the features.

Now, I need to combine these three VOIs one after the other and create a single stl for geometric morphometrics. Is there a way to do this within Slicer without using Python? If not, what would be the best way to do it in Python?

If you used Slicer to crop the VOIs, the segments should still preserve the correct spatial relationship.
If that’s the case just export the segmentations as 3D models from each VOI, and then use the merge models module to make them into a single model.

if they spatial relationships are lost (e.g., you exported the VOIs from ImageJ individually), you might still be able to fix it by figuring out the offset manually, entering that value into the Image origin field of the volumes module, but it is likely going to be tedious.

Thank you for your answer. However, I have some further questions.

I had image slices. So I ended up manually putting them in separate folders as VOIs as my VOI selection is relatively straightforward. So this means I should go ahead with 2nd approach where I mention the offsets. Since it is the same resolution, if I have 1000 slices each, do I have to give only the z-axis offset 1001 or should it be 1001 x my_spacing_in_mm? Also, how can I give an offset when combining models? The “Merge model” module only seems to have 2 input models and one output model.

Please don’t do this in future. You are creating whole lot of unnecessary complications for your self. use the ImageStacks, import the full stack at the preview setting with correct original image spacing entered and use different ROIs to import different regions as separate volumes in full resolution. That way you don’t have to guess what the offsets should be.

the z-axis offset might 1000 or 1000 x spacing, it would dependent on what image spacing value you entered for these partial volumes (1x1x1mm or 0.014 as your earlier post).

For this you can use the merge models sequentially (i.e., merge model_1 and model_2 and then use the output of this to merge with model_3.

I think I miscommunicated. I figured out this part. My question is, how do we give the offsets for a manually separated ROI since the “merge module” does not support entering the offsets as a parameter?

Thank you, Murat. I have tried the approach you mentioned and done a test sample. However, after segmenting, I apply some smoothing to get a proper model. I think because of that, I am getting small gaps between the models when I combine them. Could you please advise me on how to handle this, either inside the slicer or in a mesh software like MeshLab (if you have prior experience with this kind of case)?

You can apply the smoothing after you merge the model using the surface toolbox. If that doesnt fix, your offset is probably wrong.

1 Like