Skip to content

niivue/niivue-mesh

Repository files navigation

ct2print voxels to mesh

A basic example of converting a voxel-based image to a simplified mesh. This interactive drag-and-drop web page allows you to create meshes that can be used with a 3D printer.

Example mesh from CT scan of a human header

Usage

  1. Open the live demo.
  2. Option 1 Use the Volume pull-down menu to select an image.
  3. Option 2 If your image is in NIfTI format, drag and drop the file onto the web page.
  4. Option 3 If your image is in DICOM format, use the Select DICOM button to import your image.
  5. Note when you click on the image, the voxel intensity is shown in the status bar at the bottom-left of the web page. You can decide a nice intensity threshold to segment your image (e.g. for a CT scan, bone will be brighter than soft tissue).
  6. Press the Create Mesh button and select your preferred settings: settings dialog
  • The Isosurface is the voxel intensity used to discriminate the mesh surface. See the previous step for detials. By default, this value is set to the Otsu threshold.
  • Closing removes small crevices and cavities in your mesh which can plague printing.
  • Fill bubbles will remove any cavities, this includes large cavities for example the ventricles for a brain scan.
  • The Largest cluster only will only extract a single mesh. For example, with the Iguana demo this extracts only the skull without the scleral rings.
  • You can choose Smoothing to make the surfaces less jagged (note this can create self intersecting triangles that can confound some printers).
  • You can choose to Simplify reduce the number of triangles to create smaller files (note this can create self intersecting triangles that can confound some printers).
  1. Once you have set your preferences, press Apply.
  2. You will see the mesh appear and can interactively view it. If you are unhappy with the result, repeat step 6 with different settings. If you want to print the results, press the Save Mesh button.

For Developers

You can serve a hot-reloadable web page that allows you to interactively modify the source code.

git clone https://github.com/niivue/ct2print
cd ct2print
npm install
npm run dev

Links

About

A basic example of converting a voxel-based image to a simplified mesh

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published