Opacity issues with model exported from segmentations module

Hi all,

I am attempting to create skull models from MR data in both the editor and
segment editor modules. So far, I’ve had better luck using the segmentation
tools to accomplish this. The problem I’m having now is that I would like to
export the segmentation to a model node for quick viewing, however the
exported models have odd transparency features. For example, the outside of
the skull will be semi-transparent but the inside of the skull will appear
solid even though it is made from a single segment. Thus when viewing the
overall skull model, I see the inside curvature instead of the outside.

I have tried changing opacity settings before and after exporting to a model
node, but the results have so far been the same. Am I missing a setting or
is this just a drawback to exporting the segmentation? I’ve attached some
sample images showing the correct model (using the create surface feature)
and the problem model.


Have you set the opacity to a value <1.0?

This is a known limitation of VTK OpenGL rendering backend (due to displayed triangles are not ordered based on viewpoint).

In the short term you can use lower opacity values, which makes the artifacts less prominent. You can also save the model as an STL or PLY file and render in ParaView or other software.

We plan to switch to OpenGL2 rendering backend very soon (in a few weeks?). In this new rendering backend, rendering of transparent models works well (it uses depth peeling method).

@lassoan @cpinter isn’t that a problem of flipped normals? I think I have already (very rarely) got meshes from a segmentation that looked inside out, so I had to flip the normals using the Surface Toolbox.

I haven’t seen flipped normal in segmentations. Do you have a data set that has this issue?

The key question is if opacity was set to a value smaller than 1.0 - if yes, then most likely it’s related to rendering; if it’s exactly 1.0 then it is probably be caused by wrong ordering of triangles (and backface culling).

Thank you both for the quick replies!

Andras, I have played with the opacity values <1.0 and =1.0, but anything less than 1 renders in such a way that the outside and inside surfaces switch depending on orientation. This must be the issue with VTK OpenGL you mentioned.

Fernando, based on your suggestion I flipped the normals in the surface toolbox, but this yielded the same model. However, if I then unchecked the “flip normals” box and ran it again (so that no options were even used in the surface toolbox module), the correct model was created. Perhaps just running it through recomputes and fixes whatever odd ordering/opacity problems I’m seeing.

Anyways, this will work for me. Thanks for the help!


1 Like