0.4.0 • Published 1 year ago

@itk-wasm/cleaver v0.4.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

@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>
ParameterTypeDescription

ItkCleaverOptions interface:

PropertyTypeDescription
inputImage[]Input label image or multiple indicator function images
sigmanumberBlending function sigma for input(s) to remove alias artifacts.
samplingRatenumberSizing field sampling rate. The default sample rate will be the dimensions of the volume. Smaller sampling creates coarser meshes.
lipschitznumberSizing field rate of change. the maximum rate of change of element size throughout a mesh.
featureScalingnumberSizing field feature scaling. Scales features of the mesh effecting element size. Higher feature scaling creates coaser meshes.
paddingnumberSizing field padding. Adds a volume buffer around the data. Useful when volumes intersect near the boundary.

ItkCleaverResult interface:

PropertyTypeDescription
webWorkerWorkerWebWorker used for computation
triangleMeshOutput 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>
ParameterTypeDescription

ItkCleaverNodeOptions interface:

PropertyTypeDescription
inputImage[]Input label image or multiple indicator function images
sigmanumberBlending function sigma for input(s) to remove alias artifacts.
samplingRatenumberSizing field sampling rate. The default sample rate will be the dimensions of the volume. Smaller sampling creates coarser meshes.
lipschitznumberSizing field rate of change. the maximum rate of change of element size throughout a mesh.
featureScalingnumberSizing field feature scaling. Scales features of the mesh effecting element size. Higher feature scaling creates coaser meshes.
paddingnumberSizing field padding. Adds a volume buffer around the data. Useful when volumes intersect near the boundary.

ItkCleaverNodeResult interface:

PropertyTypeDescription
triangleMeshOutput triangle mesh
0.4.0

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago