@itk-wasm/cleaver
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@itk-wasm/cleaver

npm version

The Cleaver multimaterial tetrahedral meshing tool.

Installation

npm install @itk-wasm/cleaver

Usage

Browser interface

Import:

import {
  itkCleaver,
  setPipelinesBaseUrl,
  getPipelinesBaseUrl,
  setPipelineWorkerUrl,
  getPipelineWorkerUrl,
} from "@itk-wasm/cleaver"

itkCleaver

Create a multi-material mesh suitable for simulation/modeling from an input label image or indicator function images

async function itkCleaver(
  webWorker: null | Worker,
  options: ItkCleaverOptions = {}
) : Promise<ItkCleaverResult>
Parameter Type Description

ItkCleaverOptions interface:

Property Type Description
input Image[] Input label image or multiple indicator function images
sigma number Blending function sigma for input(s) to remove alias artifacts.
samplingRate number Sizing field sampling rate. The default sample rate will be the dimensions of the volume. Smaller sampling creates coarser meshes.
lipschitz number Sizing field rate of change. the maximum rate of change of element size throughout a mesh.
featureScaling number Sizing field feature scaling. Scales features of the mesh effecting element size. Higher feature scaling creates coaser meshes.
padding number Sizing field padding. Adds a volume buffer around the data. Useful when volumes intersect near the boundary.

ItkCleaverResult interface:

Property Type Description
webWorker Worker WebWorker used for computation
triangle Mesh Output triangle mesh

setPipelinesBaseUrl

Set base URL for WebAssembly assets when vendored.

function setPipelinesBaseUrl(
  baseUrl: string | URL
) : void

getPipelinesBaseUrl

Get base URL for WebAssembly assets when vendored.

function getPipelinesBaseUrl() : string | URL

setPipelineWorkerUrl

Set base URL for the itk-wasm pipeline worker script when vendored.

function setPipelineWorkerUrl(
  baseUrl: string | URL
) : void

getPipelineWorkerUrl

Get base URL for the itk-wasm pipeline worker script when vendored.

function getPipelineWorkerUrl() : string | URL

Node interface

Import:

import {
  itkCleaverNode,
  setPipelinesBaseUrl,
  getPipelinesBaseUrl,
  setPipelineWorkerUrl,
  getPipelineWorkerUrl,
} from "@itk-wasm/cleaver"

itkCleaverNode

Create a multi-material mesh suitable for simulation/modeling from an input label image or indicator function images

async function itkCleaverNode(
  options: ItkCleaverOptions = {}
) : Promise<ItkCleaverNodeResult>
Parameter Type Description

ItkCleaverNodeOptions interface:

Property Type Description
input Image[] Input label image or multiple indicator function images
sigma number Blending function sigma for input(s) to remove alias artifacts.
samplingRate number Sizing field sampling rate. The default sample rate will be the dimensions of the volume. Smaller sampling creates coarser meshes.
lipschitz number Sizing field rate of change. the maximum rate of change of element size throughout a mesh.
featureScaling number Sizing field feature scaling. Scales features of the mesh effecting element size. Higher feature scaling creates coaser meshes.
padding number Sizing field padding. Adds a volume buffer around the data. Useful when volumes intersect near the boundary.

ItkCleaverNodeResult interface:

Property Type Description
triangle Mesh Output triangle mesh

Package Sidebar

Install

npm i @itk-wasm/cleaver

Weekly Downloads

1

Version

0.4.0

License

Apache-2.0

Unpacked Size

2.28 MB

Total Files

36

Last publish

Collaborators

  • paulhax
  • thewtex
  • jessdtate