Additional information can be found on the Discussion page.


Target Outcome

Geometric reconstruction of a tissue of interest ready for meshing:

Prerequisites

Infrastructure

  • SALOME. SALOME is an open-source software that provides a generic platform for pre- (cad, meshing) and post-processing for numerical simulation (LGPL license, see http://www.salome-platform.org/).

  • FreeCAD. FreeCAD is an open-source three-dimensional computer aided design software (GPL and LGPL licenses, see http://www.freecadweb.org/).

  • MeshLab. MeshLab is an open-source, portable, and extensible system for the processing and editing of unstructured 3D triangular meshes (GPL license, see http://meshlab.sourceforge.net/).

  • OpenFlipper. OpenFlipper is an open-source, multi-platform application and programming framework designed for processing, modeling and rendering of geometric data (LGPL license, see http://www.openflipper.org/).

  • PyGTS. PyGTS is a Python binding for the GNU Triangulated Surface (GTS) Library to construct, manipulate, and perform computations on 3D triangulated surfaces, including boolean operations (GPL license, see http://pygts.sourceforge.net/).

  • pyFormex. pyFormex provides a wide range of operations on surface meshes, such as STLs; the software can also be used as a pre- and post-processor for Finite Element analysis programs (GPL license, see http://www.nongnu.org/pyformex).

  • IA-FEMesh. IA-FEMesh is freely available, interactive, structured hexahedral mesh generation software relying on surface projection method (BSD style license, see http://www.ccad.uiowa.edu/MIMX/projects/IA-FEMesh).

  • Blender. Blender is the free and open source 3D creation suite, which supports the entirety of the 3D pipeline, including: modeling, rigging, animation, simulation, rendering, compositing, motion tracking, video editing, and game creation. (GPL license, see https://www.blender.org/).

Previous Protocols

For more details, see Specifications/ImageSegmentation.


Protocols

Input

Overview

  1. Load the desired STL into MeshLab

  2. Perform smoothing procedures on the STL using the parameters provided in component specific procedures. Refer to detailed directions in Smoothing Procedures as needed.

    • Save the STL regularly to avoid losing previous work through program crashes.

  3. Perform Paired Mesh distance mapping between the RAW and processed STLs to ensure that there have been no major changes to the mesh.

  4. Check and Repair the STL as needed

  5. Export the STL. This is now considered to be an explicit surface representation of the tissue of interest processed with volume preserving smoothing.

  6. Repeat this process for all components.

How to navigate this page

If you are new to MeshLab, it is recommended to first load an STL into MeshLab, and read through the Viewing Options and General Procedures sections to familiarize yourself with the program and the tools you will be using. Then, follow the directions in the Component Specific Procedures section, which will guide you through which procedures to use for each tissue type. Refer back to the general procedure descriptions as needed.

Data Input Procedures

IMPORT STL to MeshLab:

  1. File -> 'Import Mesh...'

  2. Select desired STL file(s) (multiple contiguous by holding 'Shift', multiple non-contiguous by holding 'Ctrl').
  3. Click 'Import STL'.

Data Output Procedures

Note: There is no “undo” in MeshLab, and the program crashes often. It is recommended to export the stl after every successful step in the process, to avoid having to repeat steps later!

EXPORT STL from MeshLab

  1. Select desired mesh to export from the Layer Dialog panel (see viewing options for directions to display the layer dialog)
  2. File -> 'Export Mesh As...'.

  3. Name file as desired, with the '.stl' extension.
  4. Click 'Save'

Viewing Options

layer_dialog.png

layer_dialog_2.png

flat_lines.png

General Procedures

Smoothing Procedures (LVTIT)

The protocols for using various smoothing features in MeshLab are described here. component specific procedures provides guidelines for which smoothing parameters to use for each tissue type.

Laplacian Smoothing [L]

  1. Select desired mesh from the Layer Dialog panel.
  2. Filters > 'Smoothing, Fairing and Deformation' > 'Laplacian Smooth'

  3. Set smoothing steps to 20 (or other value as per Component-Specific Procedures)
  4. Click Apply
  5. Save your work!

Surface Reconstruction: VCG [V]

  1. Select desired mesh from the Layer Dialog panel.
  2. Filters -> 'Remeshing, Simplification and Reconstruction' -> 'Surface Reconstruction: VCG'

  3. Set 'Voxel Side', 'world unit' to a meaningful size (i.e. relative to original image resolution; e.g. for cartilage images with a resolution of 0.35 x 0.35 x 0.7 mm, use a world unit of 0.35, 0.5, 0.7 mm).
  4. Select 'Post Merge Simplification'.
  5. Click 'Apply'.

1. Save your work!

IF STL FRAGMENTS APPEAR AT MODEL EDGES AFTER RECONSTRUCTION:

  1. TODO: Describe selecting/deleting floating STL fragments!

NOTES:

Taubin Smoothing [T]

  1. Select desired mesh from the Layer Dialog panel.
  2. Filters -> 'Smoothing, Fairing and Deformation' -> 'Taubin Smoothing'

  3. Select 'Preview' to interactively display current smoothing parameters.
  4. Click 'Apply'.

USEFUL FOR:

NOTES:

Iso Parameterization [I]

There are 2 stages to Iso Parameterization:

Stage 1: Iso Parameterization
  1. Select desired mesh from the Layer Dialog panel.
  2. Filters -> 'Remeshing, Simplification and Reconstruction' -> 'Iso Parameterization'

  3. Click 'Apply.

IF DOUBLE STEP DOESN'T WORK:

  1. Deselect 'Double Step'.
  2. Click 'Apply.

WARNINGS:

Stage 2: Iso Parameterization Remeshing
  1. Filters -> 'Remeshing, Simplification and Reconstruction' -> 'Iso Parameterization Remeshing'

  2. Try default 'Sampling Rate' = 10.
  3. Click 'Apply'.
  4. If needed, iterate last two steps, changing the 'Sampling Rate' until desired surface triangle size is obtained.

Paired Mesh Distance Mapping (Hausdorff distance)

This tool is used to compare the mesh after smoothing procedures to the original mesh.

  1. Import desired STL(s).

COMPUTE DISTANCE MAP:

  1. Filters -> Sampling -> Hausdorff Distance.

  2. Set the 'Sampled Mesh' to the desired reference surface (i.e. the surface that the colored distance map will be displayed on, mapped at vertices).
  3. Set the 'Target Mesh' to the surface used to determine the distance map (from the reference surface vertices).
  4. Click 'Apply'.

DISPLAY DISTANCE MAP:

  1. Make sure the desired reference map is selected in the Layer hierarchy.
  2. Display (Choose 'Render' if using Windows OS) -> 'Show Vert Quality Histogram'.

  3. Filters -> 'Color Creation and Processing' -> 'Color by vertex Quality'.

  4. Set 'Min' to 0.
  5. Set 'Max' to an appropriate level (suggestion: aim for distance ~zero-count transition in histogram).
  6. Select 'Preview' to interactively display currently calculated distance map on the surface.
  7. Iterate last three steps until desired color-to-distance correspondence is determined.
  8. Click 'Apply'.

Checking and Repairing the STL

After performing the smoothing procedures, it must be checked that the STL is manifold and watertight.

Repair Boundary and Non-Manifold Edges:

  1. Select Render** > Show Non Manif Edges (If this option does not appear, see below)

  2. Select Render > Show Boundary Edges

    • Boxes will pop up showing how many of each of these items exist, and they will be highlighted on the mesh. If these numbers are all zero, skip to check for non manifold edges. If the numbers are non-zero, but you cannot see the highlighted regions on the mesh, select Filters>Selection>Dilate Selection, to help the regions stand out more.

  3. For each of the highlighted regions:
    • Use ‘select faces in rectangular region’ tool and select all the faces touching the highlighted region.
      • IMPORTANT! Press alt while using the selection tool so that it will only select the faces on the top layer.
      • Press shift to deselect using the tool
    • Select 'Delete current set of selected faces and vertices' Ignore holes for now.
  4. Select Render > Show Non Manif Vertices.

    • A box will pop up showing how many non manifold vertices exist, at this point they should be orphan nodes. If this number is zero, skip to close holes.
  5. Select Filters > Cleaning and Repairing > Remove unreferenced vertex

  6. Select Filters > Remeshing, Simplification, and Reconstruction > Close Holes. Leave default options and click Apply.

  7. Save changes.

**Select Filters > Cleaning and Repairing > Remove Faces from Non Manifold Edges. Continue from Step 5.

Check Directions of Surface Normals:

  1. Select Render > Show Face Normals . This will draw a line from the center of all the faces in the direction of the normal. The 3D meshing process will work better if the surface normals all point outward.

  2. Select Filter > Normals, Curvatures, and Orientation > Re-Orient all faces coherently

Component-Specific Procedures

The table below specifies the parameters to be used in the smoothing processes for each tissue. The process should be performed in the order provided. An X indicates that the smoothing step should be skipped for that tissue.

1. Laplacian Smoothing (Smoothing Steps)

2. VCG Surface Reconstruction (Voxel Side)

3. Taubin Smoothing (Lambda, mu)

4. Iso Parameterization (Sampling Rate)

5. Taubin Smoothing (Lambda, mu)

Registration Markers

X

X

X

X

X

Femur, Tibia

20

0.7

0.5, -0.53

10

0.5,-0.53

Patella

20

0.5

0.5, -0.53

7

0.5,-0.53

Fibula

20

0.5

0.5, -0.53

5

0.5,-0.53

Femoral Cartilage

20

0.35

0.5, -0.53

10,15,20*

0.5,-0.53

Tibial Cartilage

20

0.35

0.5, -0.53

7,10,13

0.5,-0.53

Patellar Cartilage

20

0.35

0.5, -0.53

(6),8,10,(12)

0.5,-0.53

Menisci

20

X

X

6,8,10

0.5,-0.53

ACL, PCL

20

0.35

0.5, -0.53

3,4,5

0.5,-0.53

Patellar Ligament

20

0.35

0.5, -0.53

6,8,10

0.5,-0.53

Quadriceps Tendon

20

0.35

0.5, -0.53

4,6,8

0.5,-0.53

MCL

20

0.35

X

6,7,8

0.5,-0.53

LCL

20

X

X

3,4,5

0.5,-0.53

*Multiple sampling rates indicate that the tissue should be created in multiple mesh densities, so that a mesh convergence analysis can be done in the simulation stage.

Return to Overview for next steps

Femur: oks001_MRC_FMB_LVTIT_10.png

Tibia: oks001_MRC_TBB_LVTIT_10.png

Patella: oks001_MRC_PTB_LVTIT_07.png

Fibula: oks001_MRC_FBB_LVTIT_05.png

Femoral cartilage: oks001_MRC_FMC_LVTIT_10.png oks001_MRC_FMC_LVTIT_15.png oks001_MRC_FMC_LVTIT_20.png

Tibial Cartilage: oks001_MRC_TBC-M_LVTIT_07.png oks001_MRC_TBC-L_LVTIT_07.png

Patellar Cartilage: oks001_MRC_PTC_LVTIT_06.png

Menisci: oks001_MRC_MNS-M_LIT_06.png oks001_MRC_MNS-L_LIT_06.png

ACL: oks001_MRC_ACL_LVTIT_03.png

PCL: oks001_MRC_PCL_LVTIT_03.png

Patellar Ligament: oks001_MRC_PTL_LVTIT_06.png

Quadriceps Tendon: oks001_MRC_QAT_LVTIT_04.png

MCL: oks001_MRC_MCL_LVIT_06.png

LCL: oks001_MRC_LCL_LIT_03.png

Sample Results

Following are images of the three-dimensional knee geometry (at ~90 degree increments) generated by using the coarsest triangulated surfaces.

oks001_3D_STL_coarse_1.png oks001_3D_STL_coarse_2.png oks001_3D_STL_coarse_3.png oks001_3D_STL_coarse_4.png

Output

Specifications/GeometryGeneration (last edited 2019-06-25 13:06:03 by klonowe)