1.1.0 • Published 1 year ago

@itk-wasm/morphological-contour-interpolation v1.1.0

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

@itk-wasm/morphological-contour-interpolation

npm version

Morphology-based approach for interslice interpolation of anatomical slices from volumetric images.

Installation

npm install @itk-wasm/morphological-contour-interpolation

Usage

Browser interface

Import:

import {
  morphologicalContourInterpolation,
  setPipelinesBaseUrl,
  getPipelinesBaseUrl,
} from "@itk-wasm/morphological-contour-interpolation"

morphologicalContourInterpolation

Interpolates contours between slices.

async function morphologicalContourInterpolation(
  inputImage: Image,
  options: MorphologicalContourInterpolationOptions = {}
) : Promise<MorphologicalContourInterpolationResult>
ParameterTypeDescription
inputImageImageThe input image

MorphologicalContourInterpolationOptions interface:

PropertyTypeDescription
labelnumberThe label to interpolate. Interpolates all labels if set to 0 (default).
axisnumberInterpolate only along this axis. Interpolates along all axes if set to -1 (default).
noHeuristicAlignmentbooleanHeuristic alignment of regions for interpolation is faster than optimal alignment.
noUseDistanceTransformbooleanUsing distance transform instead of repeated dilations to calculate the median contour is slightly faster, but produces lower quality interpolations.
useCustomSlicePositionsbooleanUse custom slice positions (not slice auto-detection).
noUseExtrapolationbooleanPerform extrapolation for branch extremities. Branch extremities are defined as regions having no overlap with any region in the next slice. Extrapolation helps generate smooth surface closings.
useBallStructuringElementbooleanUse ball instead of default cross structuring element for repeated dilations.
labeledSliceIndicesAxisnumberAxis along which the labeled slice indices are defined. Default is -1 (that is, auto-detection).
labeledSliceIndicesLabelnumberLabel of the slice indices. Default is 1.
labeledSliceIndicesnumber[]List of labeled slice indices. Default is empty.
webWorkernull or Worker or booleanWebWorker for computation. Set to null to create a new worker. Or, pass an existing worker. Or, set to false to run in the current thread / worker.
noCopybooleanWhen SharedArrayBuffer's are not available, do not copy inputs.

MorphologicalContourInterpolationResult interface:

PropertyTypeDescription
outputImageImageThe output image
webWorkerWorkerWebWorker used for computation.

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

Node interface

Import:

import {
  morphologicalContourInterpolationNode,
} from "@itk-wasm/morphological-contour-interpolation"

morphologicalContourInterpolationNode

Interpolates contours between slices.

async function morphologicalContourInterpolationNode(
  inputImage: Image,
  options: MorphologicalContourInterpolationNodeOptions = {}
) : Promise<MorphologicalContourInterpolationNodeResult>
ParameterTypeDescription
inputImageImageThe input image

MorphologicalContourInterpolationNodeOptions interface:

PropertyTypeDescription
labelnumberThe label to interpolate. Interpolates all labels if set to 0 (default).
axisnumberInterpolate only along this axis. Interpolates along all axes if set to -1 (default).
noHeuristicAlignmentbooleanHeuristic alignment of regions for interpolation is faster than optimal alignment.
noUseDistanceTransformbooleanUsing distance transform instead of repeated dilations to calculate the median contour is slightly faster, but produces lower quality interpolations.
useCustomSlicePositionsbooleanUse custom slice positions (not slice auto-detection).
noUseExtrapolationbooleanPerform extrapolation for branch extremities. Branch extremities are defined as regions having no overlap with any region in the next slice. Extrapolation helps generate smooth surface closings.
useBallStructuringElementbooleanUse ball instead of default cross structuring element for repeated dilations.
labeledSliceIndicesAxisnumberAxis along which the labeled slice indices are defined. Default is -1 (that is, auto-detection).
labeledSliceIndicesLabelnumberLabel of the slice indices. Default is 1.
labeledSliceIndicesnumber[]List of labeled slice indices. Default is empty.

MorphologicalContourInterpolationNodeResult interface:

PropertyTypeDescription
outputImageImageThe output image
1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago