{"id":18016657,"url":"https://github.com/niivue/ct2print","last_synced_at":"2026-03-01T18:02:36.477Z","repository":{"id":254815542,"uuid":"847624327","full_name":"niivue/ct2print","owner":"niivue","description":"ct2print for converting voxel images to mesh for 3D printing","archived":false,"fork":false,"pushed_at":"2025-05-06T11:44:50.000Z","size":18363,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-02T05:15:06.763Z","etag":null,"topics":["ct","mri","nifti","wasm"],"latest_commit_sha":null,"homepage":"https://ct2print.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niivue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-26T08:18:55.000Z","updated_at":"2025-05-06T11:44:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"e84bd530-727e-44ab-be56-dd8cc141c365","html_url":"https://github.com/niivue/ct2print","commit_stats":null,"previous_names":["niivue/ct2print"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/niivue/ct2print","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niivue%2Fct2print","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niivue%2Fct2print/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niivue%2Fct2print/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niivue%2Fct2print/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niivue","download_url":"https://codeload.github.com/niivue/ct2print/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niivue%2Fct2print/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29977966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ct","mri","nifti","wasm"],"created_at":"2024-10-30T04:18:49.208Z","updated_at":"2026-03-01T18:02:36.462Z","avatar_url":"https://github.com/niivue.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### ct2print voxels to mesh\n\nA 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.\n\n**No data is sent to a server. Everything happens in *your* browser window, on *your* machine.**\n\n![Example mesh from CT scan of a human header](ct2print.png)\n\n### Usage\n\n1. Open the [live demo](https://niivue.github.io/ct2print/).\n2. **Option 1** The web page automatically loads with a default T1 MRI scan. If you want to use this scan, go to step 5.\n3. **Option 2** If your T1 MRI scan is in NIfTI format, drag and drop the file onto the web page.\n4. **Option 3** If your image is in DICOM format, it may load if you drag and drop the files. If this fails, convert your images with [dcm2niix](https://niivue.github.io/niivue-dcm2niix/) and save the result as a NIfTI format file that brain2print can open.\n5. 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).\n6. Press the `Create Mesh` button and select your preferred settings: \n![settings dialog](settings.png)\n  - The [Isosurface Threshold](https://en.wikipedia.org/wiki/Marching_cubes) 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](https://en.wikipedia.org/wiki/Otsu%27s_method).\n  - The Hollow pull-down menu allows you to create a solid object, or a hollow one that uses less materials (but requires an escape hole).\n  - You can choose `Smoothing` to make the surfaces less jagged at the expense of computation time.\n  - You can choose to `Simplify` to reduce the number of triangles and create smaller files.\n7. Once you have set your preferences, press `Apply`.\n8. 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.\n\n\n### For Developers\n\nYou can serve a hot-reloadable web page that allows you to interactively modify the source code.\n\n```bash\ngit clone https://github.com/niivue/ct2print\ncd ct2print\nnpm install\nnpm run dev\n```\n\n### Alternatives\n\nct2print makes a mesh from the brightest voxels in the image. This works well for extracting the brightest tissues - for example bone from computerized axial tomography. However, if your iamge is a T1-weighted MRI scan of the head, you may prefer [brain2print](https://github.com/niivue/brain2print) which uses AI methods to segment brain tissue.\n\n### References\n\nThis web page combines three packages developed by our team:\n\n- [niimath](https://github.com/rordenlab/niimath) for creating hollow objects. [Citation](https://pubmed.ncbi.nlm.nih.gov/39268148/).\n- [niivue](https://github.com/niivue/niivue) reading images and visualization.\n- [ITK-Wasm](https://github.com/InsightSoftwareConsortium/ITK-Wasm) for voxel-to-mesh and mesh processing. [Citation](https://proceedings.scipy.org/articles/TCFJ5130.\n\n### Data Sources\n\nYou can provide your own voxel-based images, but here are a few other sources:\n\n - [MorphoSource](https://www.morphosource.org/) is a digital repository for 3D data of biological and cultural specimens, supporting open access to scans and models for research, education, and public use.\n - [DigiMorph](https://www.digimorph.org/) provides high-resolution 2D and 3D visualizations of vertebrate and invertebrate morphology, primarily derived from CT scans, to support comparative anatomy and evolutionary research.\n\n## Citation\n\n  - Rorden C, McCormick M, Hanayik T, Masoud M, Plis SM, ([2025](https://www.nature.com/articles/s41598-025-00014-5?utm_source=rct_congratemailt\u0026utm_medium=email\u0026utm_campaign=oa_20250505\u0026utm_content=10.1038/s41598-025-00014-5)) brain2print AI powered web tool for creating 3D printable brain models. Scientific Reports. 15: 15664. doi:10.1038/s41598-025-00014-5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniivue%2Fct2print","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniivue%2Fct2print","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniivue%2Fct2print/lists"}