Differences between revisions 15 and 16
Revision 15 as of 2016-02-01 16:32:04
Size: 11510
Comment:
Revision 16 as of 2016-02-01 19:14:09
Size: 11518
Comment:
Deletions are marked like this. Additions are marked like this.
Line 144: Line 144:
COMPUTE DISTANCE MAP:  1. COMPUTE DISTANCE MAP:
Line 149: Line 149:
DISPLAY DISTANCE MAP:  1. DISPLAY DISTANCE MAP:

TableOfContents()

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

Include(Infrastructure/AuxiliarySoftware, "Infrastructure", 2, from="= Geometry & Mesh Generation & Manipulation =", to="= Scripting & Numerical Analysis =")

Previous Protocols

For more details, see ["Specifications/ImageSegmentation"].


Protocols

Input

  • Volume of tissue of interest as a binary image aligned with original MRI coordinate system (raw, without filtering and smoothing)
  • Surface representation of tissue of interest in STL format in MRI coordinate system (raw, without filtering and smoothing)

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


Blender

Input/Output

IMPORT STL:

  1. File -> Import -> 'Stl (.stl)'.

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

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 (User Persp) 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).
  2. Ensure you are in 'Object Mode' (shown in drop-down menu underneath the 3D Viewport).
  3. 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.
    2. In the 3D View, right-click on the desired STL interactively.
  4. Hit 'Tab' to change to 'Edit Mode'.
  5. 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 ).
  6. Press 'a' to deselect all faces (automatically selected by default when entering 'Edit Mode').
  7. 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 desire 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'
      2. Tidy boundary of select contiguous triangles: use 'Circle Select'
  8. PARTITION STL MESH:
    • Press 'p' ('Separate').
    • From Pop-up menu -> 'Selection P'


MeshLab

Input/Output

IMPORT STL:

  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' button.

EXPORT STL:

Remeshing, Simplification and Reconstruction

Surface Reconstruction: VCG

Remeshing: Iso Parameterization

Smoothing

Taubin Smooth

Mesh Distance Mapping (Hausdorff distance)

  1. Import desired STL(s).
  2. COMPUTE DISTANCE MAP:
  3. Filters -> Sampling -> Hausdorff Distance.

  4. 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).
  5. Set the 'Target Mesh' to the surface used to determine the distance map (from the reference surface vertices).
  6. Click 'Apply'.
  7. DISPLAY DISTANCE MAP:
  8. Make sure the desired reference map is selected in the Layer hierarchy (display using 'stack of planes' icon).
  9. Display -> 'Show Vert Quality Histogram'.

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

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


Slicer

Triangulated Surface (STL)

Laplacian Smoothing


Tissue/Component-Specific Procedures

Bones

Cartilage


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
  2. distance between different model components (e.g. femur vs. femur cartilage, BACK SURFACE)
  3. 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:

Distance between Model Components

FEMUR vs. FEMUR CARTILAGE:

FEMUR CARTILAGE vs. FEMUR:

Tissue Thickness

FEMUR CARTILAGE THICKNESS (VCG smoothed, 0.7):

FEMUR CARTILAGE THICKNESS (VCG smoothed, 0.7; ISO, 10):

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!!!


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)

Specifications/GeometryGeneration (last edited 2020-10-13 13:59:46 by klonowe)