Size: 13855
Comment:
|
← Revision 58 as of 2020-10-13 13:59:46 ⇥
Size: 14098
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 97: | Line 97: |
IF THE FILTER FAILS DUE TO A SAVING ERROR: 1. Exit the Surface Reconstruction window. 1. File --> Save Project As --> Save mesh under MeshLab project file (.mlp). 1. Complete the reconstruction, export the resulting mesh as desired. |
Additional information can be found on the Discussion page.
Contents
Target Outcome
Geometric reconstruction of a tissue of interest ready for meshing:
- as a (parametric or explicit) watertight surface representation, or
- as a solid geometry
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
- Surface representation of tissue of interest in STL format in MRI coordinate system (raw, without filtering and smoothing)
Overview
Load the desired STL into MeshLab
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.
Perform Paired Mesh distance mapping between the RAW and processed STLs to ensure that there have been no major changes to the mesh.
Check and Repair the STL as needed
Export the STL. This is now considered to be an explicit surface representation of the tissue of interest processed with volume preserving smoothing.
- 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:
File -> 'Import Mesh...'
- Select desired STL file(s) (multiple contiguous by holding 'Shift', multiple non-contiguous by holding 'Ctrl').
- 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
- Select desired mesh to export from the Layer Dialog panel (see viewing options for directions to display the layer dialog)
File -> 'Export Mesh As...'.
- Name file as desired, with the '.stl' extension.
- Click 'Save'
Viewing Options
- Select the 'Show Layer Dialog' option.
- During the smoothing process, the layer dialog panel shows the progress, and allows the viewer to select, display, or hide different versions of the mesh. Select the eye toggle next to the mesh name to hide or display it. The body highlighted in yellow is the “current mesh”. Any procedures performed will be applied to the current mesh.
- Select the 'Flat Lines' option to view the mesh lines on the model surface.
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]
- Select desired mesh from the Layer Dialog panel.
Filters > 'Smoothing, Fairing and Deformation' > 'Laplacian Smooth'
- Set smoothing steps to 20 (or other value as per Component-Specific Procedures)
- Click Apply
- Save your work!
Surface Reconstruction: VCG [V]
- Select desired mesh from the Layer Dialog panel.
Filters -> 'Remeshing, Simplification and Reconstruction' -> 'Surface Reconstruction: VCG'
- 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).
- Select 'Post Merge Simplification'.
- Click 'Apply'.
1. Save your work!
IF STL FRAGMENTS APPEAR AT MODEL EDGES AFTER RECONSTRUCTION:
- TODO: Describe selecting/deleting floating STL fragments!
IF THE FILTER FAILS DUE TO A SAVING ERROR:
- Exit the Surface Reconstruction window.
File --> Save Project As --> Save mesh under MeshLab project file (.mlp).
- Complete the reconstruction, export the resulting mesh as desired.
NOTES:
- Increasing 'Volume Laplacian iter' decreases resulting reconstructed volume.
- Changing 'Widening' had no visual effect.
Taubin Smoothing [T]
- Select desired mesh from the Layer Dialog panel.
Filters -> 'Smoothing, Fairing and Deformation' -> 'Taubin Smoothing'
- Select 'Preview' to interactively display current smoothing parameters.
- Click 'Apply'.
USEFUL FOR:
- Smoothing vertices/nodes at sharply curved model edges.
- Correcting twisted triangles at focal points following 'Iso Parameterization'.
NOTES:
- Suggested settings: Lambda = 0.5, mu = -0.5
Lambda values > 1.5 cause the mesh to jaggedly explode.
Iso Parameterization [I]
There are 2 stages to Iso Parameterization:
Stage 1: Iso Parameterization
- Select desired mesh from the Layer Dialog panel.
Filters -> 'Remeshing, Simplification and Reconstruction' -> 'Iso Parameterization'
- Click 'Apply.
IF DOUBLE STEP DOESN'T WORK:
- Deselect 'Double Step'.
- Click 'Apply.
WARNINGS:
This can be buggy, and may cause MeshLab to crash!
- This appears not to be deterministic, i.e. with same input mesh it may or may not work (e.g. same VCG parameters to smooth prior to isoparameterization didn't work in one attempt, but did in another).
Stage 2: Iso Parameterization Remeshing
Filters -> 'Remeshing, Simplification and Reconstruction' -> 'Iso Parameterization Remeshing'
- Try default 'Sampling Rate' = 10.
- Click 'Apply'.
- 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.
- Import desired STL(s).
COMPUTE DISTANCE MAP:
Filters -> Sampling -> Hausdorff Distance.
- 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).
- Set the 'Target Mesh' to the surface used to determine the distance map (from the reference surface vertices).
- Click 'Apply'.
DISPLAY DISTANCE MAP:
- Make sure the desired reference map is selected in the Layer hierarchy.
Display (Choose 'Render' if using Windows OS) -> 'Show Vert Quality Histogram'.
Filters -> 'Color Creation and Processing' -> 'Color by vertex Quality'.
- Set 'Min' to 0.
- Set 'Max' to an appropriate level (suggestion: aim for distance ~zero-count transition in histogram).
- Select 'Preview' to interactively display currently calculated distance map on the surface.
- Iterate last three steps until desired color-to-distance correspondence is determined.
- 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:
Select Render** > Show Non Manif Edges (If this option does not appear, see below)
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.
- 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.
- Use ‘select faces in rectangular region’ tool and select all the faces touching the highlighted region.
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.
Select Filters > Cleaning and Repairing > Remove unreferenced vertex
Select Filters > Remeshing, Simplification, and Reconstruction > Close Holes. Leave default options and click Apply.
- Save changes.
**Select Filters > Cleaning and Repairing > Remove Faces from Non Manifold Edges. Continue from Step 5.
Check Directions of Surface Normals:
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.
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:
Tibia:
Patella:
Fibula:
Femoral cartilage:
Tibial Cartilage:
Patellar Cartilage:
Menisci:
ACL:
PCL:
Patellar Ligament:
Quadriceps Tendon:
MCL:
LCL:
Sample Results
Following are images of the three-dimensional knee geometry (at ~90 degree increments) generated by using the coarsest triangulated surfaces.
Output
- Explicit surface representation of tissue of interest; in STL format in MRI coordinate system (processed with volume preserving smoothing)
Parametric surface representation of tissue of interest in IGES & STP format in MRI coordinate system (processed with volume preserving smoothing)
Parametric solid model of tissue of interest in IGES & STP format in MRI coordinate system (processed with volume preserving smoothing)