Size: 16311
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 4: | Line 4: |
[[TableOfContents()]] | ---- Additional information can be found on the [[/Discussion|Discussion]] page. ---- <<TableOfContents>> |
Line 12: | Line 19: |
[[Include(Infrastructure/AuxiliarySoftware, "Infrastructure", 2, from="= Geometry & Mesh Generation & Manipulation =", to="= Scripting & Numerical Analysis =")]] | <<Include(Infrastructure/AuxiliarySoftware, "Infrastructure", 2, from="= Geometry & Mesh Generation & Manipulation =", to="= Scripting & Numerical Analysis =")>> |
Line 15: | Line 22: |
For more details, see ["Specifications/ImageSegmentation"]. | For more details, see [[Specifications/ImageSegmentation]]. |
Line 22: | Line 29: |
* Volume of tissue of interest as a binary image aligned with original MRI coordinate system (raw, without filtering and smoothing) | |
Line 25: | Line 31: |
== Procedures == -- ["aerdemir"] [[DateTime(2013-12-30T15:14:36Z)]] This section may list general purpose procedures and alternatives to utilize the same input to reach the same output. Procedures optimized for specific tissues should also be provided in here. === When starting with volume representation === * Confirm the tissue volume is a raw representation (without filtering and smoothing) * Generate raw surface representation of the tissue volume * Upload tissue volume in image segmentation software, e.g. Slicer. * Generate water-tight triangulated surface representation (no filtering, smoothing). * Save raw surface representation with the same file name as the volume representation except with the .stl extension. * Continue with the next section. === When starting with surface representation === * Load raw surface representation of the tissue volume in !MeshLab. * Smooth raw surface representation, e.g.: * Under Filters->Smoothing->Laplacian Smooth, Select smoothing steps of 9 and uncheck all other boxes and apply. This will smooth down most jagged edges from the original file * Under Filters->Smoothing->Two Step Smooth, Select smoothing steps of 3, Feature Angle Threashold at 60, Normal smoothing steps at 20, and Vertex Fitting steps at 20 and apply. This step further levels uneven edges * Under Filters->Smoothing->Taubin Smooth, Select Lambda to 1, mu to 0.0, and Smoothing steps to 12, all boxes are unchecked and press apply. This step creates an overall uniform surface with few rough edges, while still keeping the shape of the initial object. Some values may vary depending on the model input, this selection works for large bones like the femur. * Parametrize and resample smoothed surface representation. * Save smooth surface representation with the same file name as the volume representation except with trailing text of 'smooth'. === When parametric geometry is needed === ---- === Working with Blender === ==== Input/Output ==== IMPORT STL: 1. File -> Import -> 'Stl (.stl)'. 1. Select desired STL file(s) (multiple contiguous by holding 'Shift', multiple non-contiguous by holding 'Ctrl'). 1. Click 'Import STL'. EXPORT STL: 1. Select the desired mesh to export from the hierarchical Outliner editor pane (default: upper right). 1. File -> Export -> 'Stl (.stl)' 1. Specify a desired folder and filename (extension: .stl). 1. Click 'Export STL'. ==== Useful Shortcuts ==== * 'n': show 3D Viewport Panel Options * 'Tab': switch between 'Object Mode' (default) and 'Edit Mode' * 'p' (-> : split selected surface mesh triangles into two complementary sets * 'a': toggle, select all/none * 'c': 'Circle Select' * Left-click: select * Middle mouse button, scroll wheel (click): deselect * Middle mouse button, scroll wheel (scroll): change size of circular selection area * 'Esc': cancel current active tool ==== 3D Viewport Interaction ==== * Left mouse button: * ['Object Mode']: position cursor * ['Edit Mode']: select specified sub-geometry (node/edge/face) * IF TOOL IS ACTIVE: apply active tool * ('Ctrl'+_): lasso select * ('Ctrl'+'Shift'+_): lasso deselect * Middle mouse button, scroll wheel (click): rotate 3D view * ('Ctrl'+_) zoom in/out (continuous) * ('Shift'+_) pan * Middle mouse button, scroll wheel (scroll): zoom in/out (discrete steps) * Right mouse button: * [Object Mode]: select object * [Edit Mode]: activate/deactivate tool (default tool: translate selection) ==== Triangulated surface mesh (STL) splitting ==== In order to determine tissue thickness for thin structures (e.g. cartilage, ligament, tendon) using !MeshLab, the manifold (water-tight) triangulated surface mesh must be split into to non-manifold, complementary shells. The procedure to do this is as follows: 1. Import desired STL(s). 1. Ensure you are in 'Object Mode' (shown in drop-down menu underneath the 3D Viewport). 1. Selected the desired STL with one of the following options: 1. In the 'Outliner' panel (default: upper right), showing the scene graph and datablocks hierarchy, left-click the desired STL. 1. In the 3D View, right-click on the desired STL interactively. 1. Hit 'Tab' to change to 'Edit Mode'. 1. Make sure 'Face Select' mode is selected: * in the 3D Viewport menu (underneath), left-click the icon showing a cube with one orange face (in a group of three icons, in the ). 1. Press 'a' to deselect all faces (automatically selected by default when entering 'Edit Mode'). 1. SELECT DESIRED SET OF CONTIGUOUS TRIANGLES: * Right-click a single triangular face on the desired side of the thin model component. * In 3D Viewport menu -> Select -> 'Linked Flat Faces': * Adjust Sharpness (angle: degrees) until the desired set of contiguous triangular faces are obtained (determine the max. angle that includes the largest region of one side of the thin structure, without spilling over onto the opposite face of the structure). * MODIFY SELECTION, IF NEEDED: 1. Add/select 'holes' (unselected triangles) in contiguously selected region: use 'Circle Select' or 'Lasso Select' 1. Tidy boundary of select contiguous triangles: use 'Circle Select' 1. PARTITION STL MESH: * Press 'p' ('Separate'). * From Pop-up menu -> 'Selection P' ---- === Working with MeshLab === ==== Input/Output ==== IMPORT STL: |
== Overview == 1. [[#Data Input Procedures|Load]] the desired STL into !MeshLab 2. Perform smoothing procedures on the STL using the parameters provided in [[#Component-Specific Procedures|component specific procedures]]. Refer to detailed directions in [[#Smoothing Procedures (LVTIT)|Smoothing Procedures]] as needed. * [[#Data Output Procedures|Save the STL]] regularly to avoid losing previous work through program crashes. 3. Perform [[#Paired Mesh Distance Mapping (Hausdorff distance)|Paired Mesh distance mapping]] between the RAW and processed STLs to ensure that there have been no major changes to the mesh. 4. [[#Checking and Repairing the STL|Check and Repair]] the STL as needed 5. [[#Data Output Procedures|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 [[#Data Input Procedures|load]] an STL into !MeshLab, and read through the [[#Viewing Options|Viewing Options]] and [[#General Procedures|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|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: |
Line 128: | Line 49: |
1. Select desired STL file(s) (multiple contiguous by holding 'Shift', multiple non-contiguous by holding 'Ctrl'). 1. Click 'Import STL'. EXPORT STL: 1. Select desired mesh to export from the Layer hierarchy (display by selecting 'stack of planes' icon above 3D viewport). 1. File -> 'Export Mesh As...'. 1. Name file as desired, with the '.stl' extension. 1. Click 'Save' ==== Remeshing, Simplification and Reconstruction ==== ===== Surface Reconstruction: VCG ===== 1. Select desired mesh from the Layer hierarchy panel. |
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 == * Select the 'Show Layer Dialog' option. {{attachment:layer_dialog.png}} * 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. {{attachment:layer_dialog_2.png}} * Select the 'Flat Lines' option to view the mesh lines on the model surface. {{attachment:flat_lines.png}} == General Procedures == === Smoothing Procedures (LVTIT) === The protocols for using various smoothing features in !MeshLab are described here. [[#Component-Specific Procedures|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. 1. Filters > 'Smoothing, Fairing and Deformation' > 'Laplacian Smooth' 1. Set smoothing steps to 20 (or other value as per Component-Specific Procedures) 1. Click Apply 1. Save your work! ==== Surface Reconstruction: VCG [V] ==== 1. Select desired mesh from the Layer Dialog panel. |
Line 146: | Line 92: |
1. Save your work! | |
Line 150: | 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. |
|
Line 155: | Line 107: |
===== Iso Parameterization ===== 1. Select desired mesh from the Layer pane. |
==== Taubin Smoothing [T] ==== 1. Select desired mesh from the Layer Dialog panel. 1. Filters -> 'Smoothing, Fairing and Deformation' -> 'Taubin Smoothing' 1. Select 'Preview' to interactively display current smoothing parameters. 1. 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 ===== 1. Select desired mesh from the Layer Dialog panel. |
Line 170: | Line 140: |
===== Iso Parameterization Remeshing ===== | ===== Stage 2: Iso Parameterization Remeshing ===== |
Line 177: | Line 147: |
==== Smoothing ==== ===== Taubin Smoothing ===== 1. Filters -> 'Smoothing, Fairing and Deformation' -> 'Taubin Smoothing' 1. Select 'Preview' to interactively display current smoothing parameters. 1. 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. ==== Paired Mesh Distance Mapping (Hausdorff distance) ==== |
=== Paired Mesh Distance Mapping (Hausdorff distance) === This tool is used to compare the mesh after smoothing procedures to the original mesh. |
Line 203: | Line 158: |
1. Display -> 'Show Vert Quality Histogram'. | 1. Display (Choose 'Render' if using Windows OS) -> 'Show Vert Quality Histogram'. |
Line 211: | Line 166: |
---- === Working with Slicer === ==== Generate Triangulated Surface (STL) with Laplacian Smoothing ==== * From the Modules drop-down menu, select 'Surface Models' -> 'Model Maker' * Under 'IO' tab, from 'Input Volume' drop-down menu, select desired Label Map * In Model drop-down menu, either 'Create and rename new Hierarchy' (e.g. default 'Models'), or select an existing Model Hierarchy. NOTE: all models can be generated under the same or separate model hierarchies * Under 'Create Model' tab, specify a desired 'Model Name' for the select Label Map. * If no smoothing is desired, under 'Model Maker Parameters', set 'Smooth' to zero. * If no decimation is desired (nodes at every voxel corner), under 'Model Maker Parameters', set 'Decimate' to zero. * Click Apply button. ---- === Component-Specific Procedures === ==== General Procedure (a.k.a. LVTIT) ==== 1. '''Slicer:''' 1. Load desired segmented label map/image volume. 1. Generate triangulated surface (STL) from desired component using 'Laplacian Smoothing' (L), to provide maximum mesh volume prior to following processing steps, which tend to shrink the volume. 1. '''Meshlab:''' 1. Load STL generated in prior step. 1. Perform 'Surface Reconstruction: VCG' (V), to smooth out step-i-ness of mesh. 1. Perform 'Taubin Smoothing' (T), to make discretized triangules more uniform in areas of high curvature. 1. Perform 'Iso Parametrization' (I). 1. Perform 'Iso Parametrization Remeshing'. 1. Perform 'Taubin Smoothing' (T), to untwist potentially collapsed triangles at focal points from iso parametrization. ---- == Results == Following are examples (oks001) of distance maps (using !MeshLab: Hausdorf distance) between various pairs of surfaces to assess: 1. spatial error between corresponding surfaces with varying levels of smoothing/refinement 1. distance between different model components (e.g. femur vs. femur cartilage, BACK SURFACE) 1. thickness of model components (e.g. cartilage): To map tissue thicknesses (e.g. cartilage), opposing surfaces (i.e. BACK SURFACE, FRONT SURFACE) from a manifold (i.e. watertight) STL mesh were split into two complementary, shell STL mesh sets using Blender. NOTE: all units are displayed in mm. === Smoothing Errors === UNSMOOTHED vs. SMOOTHED: * femur cartilage, BACK SURFACE (REF; unsmoothed) vs. femur cartilage, BACK SURFACE (VCG smoothed, 0.7; ISO 10) * femur cartilage, FRONT SURFACE (REF; unsmoothed) vs. femur cartilage, FRONT SURFACE (VCG smoothed, 0.7; ISO 10) [[ImageLink(oks001_FMC_vs_FMC_VCG_0.7_ISO_10.png, width=400, alt=oks001_FMC_vs_FMC_VCG_0.7_ISO_10)]] [[ImageLink(oks001_FMC_vs_FMC_VCG_0.7_ISO_10_INF.png, width=400, alt=oks001_FMC_vs_FMC_VCG_0.7_ISO_10_INF)]] === Distance between Model Components === FEMUR vs. FEMUR CARTILAGE: * femur (REF; VCG smoothed, 0.7; ISO, 10) vs. femur cartilage, BACK SURFACE (VCG smoothed, 0.7; ISO, 10) [[ImageLink(oks001_FMB_VCG_0.7_ISO_10_vs_FMC_SAME_AI.png, width=400, alt=oks001_FMB_VCG_0.7_ISO_10_vs_FMC_SAME_AI)]] FEMUR CARTILAGE vs. FEMUR: * femur cartilage (REF; VCG smoothed, 0.7; ISO, 10) vs. femur (VCG smoothed, 0.7; ISO, 10) [[ImageLink(oks001_FMC_VCG_0.7_ISO_10_vs_FMB_SAME.png, width=400, alt=oks001_FMC_VCG_0.7_ISO_10_vs_FMB_SAME)]] NOTE: this visualized distance on femur cartilage from the femur bone boundary can be used to find a cutoff value for generating a node set to tie nodes on the back surface of the femur cartilage to the rigid body femur. === Tissue Thickness === FEMUR CARTILAGE THICKNESS (UNSMOOTHED): * femur cartilage, BACK SURFACE (REF; UNSMOOTHED) vs. femur cartilage, FRONT SURFACE (UNSMOOTHED) * femur cartilage, FRONT SURFACE (REF; UNSMOOTHED) vs. femur cartilage, BACK SURFACE (UNSMOOTHED) [[ImageLink(oks001_FMC_UNSMOOTHED_BACK_vs_FMC_SAME_FRONT.png, width=400, alt=oks001_FMC_UNSMOOTHED_BACK_vs_FMC_SAME_FRONT.png)]] [[ImageLink(oks001_FMC_UNSMOOTHED_FRONT_vs_FMC_SAME_BACK.png, width=400, alt=oks001_FMC_UNSMOOTHED_FRONT_vs_FMC_SAME_BACK.png)]] FEMUR CARTILAGE THICKNESS (VCG smoothed, 0.7): * femur cartilage, BACK SURFACE (REF; VCG smoothed, 0.7) vs. femur cartilage, FRONT SURFACE (VCG smoothed, 0.7) * femur cartilage, FRONT SURFACE (REF; VCG smoothed, 0.7) vs. femur cartilage, BACK SURFACE (VCG smoothed, 0.7) [[ImageLink(oks001_FMC_VCG_0.7_BACK_vs_FMC_SAME_FRONT.png, width=400, alt=oks001_FMC_VCG_0.7_BACK_vs_FMC_SAME_FRONT)]] [[ImageLink(oks001_FMC_VCG_0.7_FRONT_vs_FMC_SAME_BACK_INF.png, width=400, alt=oks001_FMC_VCG_0.7_FRONT_vs_FMC_SAME_BACK_INF)]] FEMUR CARTILAGE THICKNESS (VCG smoothed, 0.7; ISO, 10): * femur cartilage, BACK SURFACE (REF; VCG smoothed, 0.7; ISO, 10) vs. femur cartilage, FRONT SURFACE (VCG smoothed, 0.7; ISO, 10) * femur cartilage, FRONT SURFACE (REF; VCG smoothed, 0.7; ISO, 10) vs. femur cartilage, BACK SURFACE (VCG smoothed, 0.7; ISO, 10) [[ImageLink(oks001_FMC_VCG_0.7_ISO_10_BACK_vs_FMC_SAME_FRONT.png, width=400, alt=oks001_FMC_VCG_0.7_ISO_10_BACK_vs_FMC_SAME_FRONT)]] [[ImageLink(oks001_FMC_VCG_0.7_ISO_10_FRONT_vs_FMC_SAME_BACK_INF.png, width=400, alt=oks001_FMC_VCG_0.7_ISO_10_FRONT_vs_FMC_SAME_BACK_INF)]] FEMUR CARTILAGE THICKNESS (LVTIT): * femur cartilage, BACK SURFACE (REF; LVTIT) vs. femur cartilage, FRONT SURFACE (LVTIT) * femur cartilage, FRONT SURFACE (REF; LVTIT) vs. femur cartilage, BACK SURFACE (LVTIT) [[ImageLink(oks001_FMC_LVTIT_BACK_vs_FMC_SAME_FRONT.png, width=400, alt=oks001_FMC_LVTIT_BACK_vs_FMC_SAME_FRONT.png)]] [[ImageLink(oks001_FMC_LVTIT_FRONT_vs_FMC_SAME_BACK.png, width=400, alt=oks001_FMC_LVTIT_FRONT_vs_FMC_SAME_BACK.png)]] NOTE: spurious distances (0.0 mm, which are known not to be correct) are present only in the FRONT SURFACE (REF) vs BACK SURFACE, despite similar relative normal directions between reference and measured surfaces!!! ---- |
=== 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) 1. 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. 1. 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. 1. 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. 1. Select Filters > Cleaning and Repairing > Remove unreferenced vertex 1. Select Filters > Remeshing, Simplification, and Reconstruction > Close Holes. Leave default options and click Apply. 1. 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. 1. 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 [L]|Laplacian Smoothing]] (Smoothing Steps)'''||'''2. [[#Surface Reconstruction: VCG [V]|VCG Surface Reconstruction]] (Voxel Side)''' ||'''3. [[#Taubin Smoothing [T]|Taubin Smoothing]] (Lambda, mu)''' || '''4. [[#Iso Parameterization [I]|Iso Parameterization]] (Sampling Rate)'''||'''5. [[#Taubin Smoothing [T]|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|Overview]] for next steps Femur: {{attachment:oks001_MRC_FMB_LVTIT_10.png|oks001_MRC_FMB_LVTIT_10.png|width=400}} Tibia: {{attachment:oks001_MRC_TBB_LVTIT_10.png|oks001_MRC_TBB_LVTIT_10.png|width=400}} Patella: {{attachment:oks001_MRC_PTB_LVTIT_07.png|oks001_MRC_PTB_LVTIT_07.png|width=300}} Fibula: {{attachment:oks001_MRC_FBB_LVTIT_05.png|oks001_MRC_FBB_LVTIT_05.png|width=300}} Femoral cartilage: {{attachment:oks001_MRC_FMC_LVTIT_10.png|oks001_MRC_FMC_LVTIT_10.png|width=300}} {{attachment:oks001_MRC_FMC_LVTIT_15.png|oks001_MRC_FMC_LVTIT_15.png|width=300}} {{attachment:oks001_MRC_FMC_LVTIT_20.png|oks001_MRC_FMC_LVTIT_20.png|width=300}} Tibial Cartilage: {{attachment:oks001_MRC_TBC-M_LVTIT_07.png|oks001_MRC_TBC-M_LVTIT_07.png|width=300}} {{attachment:oks001_MRC_TBC-L_LVTIT_07.png|oks001_MRC_TBC-L_LVTIT_07.png|width=300}} Patellar Cartilage: {{attachment:oks001_MRC_PTC_LVTIT_06.png|oks001_MRC_PTC_LVTIT_06.png|width=300}} Menisci: {{attachment:oks001_MRC_MNS-M_LIT_06.png|oks001_MRC_MNS-M_LIT_06.png|width=300}} {{attachment:oks001_MRC_MNS-L_LIT_06.png|oks001_MRC_MNS-L_LIT_06.png|width=300}} ACL: {{attachment:oks001_MRC_ACL_LVTIT_03.png|oks001_MRC_ACL_LVTIT_03.png|width=300}} PCL: {{attachment:oks001_MRC_PCL_LVTIT_03.png|oks001_MRC_PCL_LVTIT_03.png|width=300}} Patellar Ligament: {{attachment:oks001_MRC_PTL_LVTIT_06.png|oks001_MRC_PTL_LVTIT_06.png|width=300}} Quadriceps Tendon: {{attachment:oks001_MRC_QAT_LVTIT_04.png|oks001_MRC_QAT_LVTIT_04.png|width=300}} MCL: {{attachment:oks001_MRC_MCL_LVIT_06.png|oks001_MRC_MCL_LVIT_06.png|width=300}} LCL: {{attachment:oks001_MRC_LCL_LIT_03.png|oks001_MRC_LCL_LIT_03.png|width=300}} == Sample Results == Following are images of the three-dimensional knee geometry (at ~90 degree increments) generated by using the coarsest triangulated surfaces. {{attachment:oks001_3D_STL_coarse_1.png|oks001_3D_STL_coarse_1.png|width=200}} {{attachment:oks001_3D_STL_coarse_2.png|oks001_3D_STL_coarse_2.png|width=200}} {{attachment:oks001_3D_STL_coarse_3.png|oks001_3D_STL_coarse_3.png|width=200}} {{attachment:oks001_3D_STL_coarse_4.png|oks001_3D_STL_coarse_4.png|width=200}} |
Line 322: | Line 270: |
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)