3D surface model color

I’ve imported .ply files to do some landmarking for a geometric morphometrics project. Is there a way to set the surface to be the image collected from the surface scanner? This is an option in the old software Landmark Editor and it really helps with visualizing flat sutures.

I am not sure what mean by “set the surface to be the image collected from the surface scanner”? Are you talking about color texture? If so, you have to use the TextureModel module from SlicerIGT. If not please provide a more detailed description of what you want to do (or a screenshot)?

Yes, I think that is what I’m referring to. Do I need the models to be in an OBJ format for this module to work?

I don’t work with textured scans, but I don’t think you need it to be OBJ as long as you can load the textures separately (in JPG or other formats Slicer can read).
[Edit: Based on this thread, you might need it OBJ after all Displaying textured 3D models - #9 by tsehrhardt]
@lassoan is this still the case.

1 Like

You can display a full-color mesh in two ways:

  • mesh+texture: the mesh contains texture coordinates for each point and the texture image is stored in a separate file. Slicer can read texture coordinates from meshes stored in VTK, VTP, OBJ, and maybe PLY format. You can load the texture image from any file (JPG, PNG, …) and apply it to the mesh using Texture model module. Texture module can also write the color to point data, so you can save a vertex-colored mesh in a VTK, VTP, or PLY file.
  • vertex-colored mesh: the mesh contains RGB value for each point. Slicer can read such meshes from VTK, VTP, and PLY files. Colored PLY file reading was just added a few days ago, so you need the very latest Slicer Preview Release.
4 Likes

I visualize per vertex color on PLY in Models by checking “Visible” under Scalars, selecting RGBA under Active Scalar, and Direct color mapping under Scalar Range Mode. The alpha displays properly as well.

@lassoan does the addition to the Preview do this automatically now?

1 Like

Yes, RGB and RGBA arrays are now automatically recognized and shown by default. They are now also saved in PLY format (previously, color was only saved when using VTK or VTP format).

2 Likes

This worked! Thank you!

2 Likes