npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@itk-wasm/morphological-contour-interpolation

v1.1.0

Published

N-D morphology-based approach for interslice interpolation of anatomical slices from volumetric images.

Downloads

8

Readme

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

| Parameter | Type | Description | | :----------: | :-----: | :-------------- | | inputImage | Image | The input image |

MorphologicalContourInterpolationOptions interface:

| Property | Type | Description | | :-------------------------: | :-------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | label | number | The label to interpolate. Interpolates all labels if set to 0 (default). | | axis | number | Interpolate only along this axis. Interpolates along all axes if set to -1 (default). | | noHeuristicAlignment | boolean | Heuristic alignment of regions for interpolation is faster than optimal alignment. | | noUseDistanceTransform | boolean | Using distance transform instead of repeated dilations to calculate the median contour is slightly faster, but produces lower quality interpolations. | | useCustomSlicePositions | boolean | Use custom slice positions (not slice auto-detection). | | noUseExtrapolation | boolean | Perform 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. | | useBallStructuringElement | boolean | Use ball instead of default cross structuring element for repeated dilations. | | labeledSliceIndicesAxis | number | Axis along which the labeled slice indices are defined. Default is -1 (that is, auto-detection). | | labeledSliceIndicesLabel | number | Label of the slice indices. Default is 1. | | labeledSliceIndices | number[] | List of labeled slice indices. Default is empty. | | webWorker | null or Worker or boolean | WebWorker 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. | | noCopy | boolean | When SharedArrayBuffer's are not available, do not copy inputs. |

MorphologicalContourInterpolationResult interface:

| Property | Type | Description | | :-----------: | :------: | :------------------------------ | | outputImage | Image | The output image | | webWorker | Worker | WebWorker 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>

| Parameter | Type | Description | | :----------: | :-----: | :-------------- | | inputImage | Image | The input image |

MorphologicalContourInterpolationNodeOptions interface:

| Property | Type | Description | | :-------------------------: | :--------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | label | number | The label to interpolate. Interpolates all labels if set to 0 (default). | | axis | number | Interpolate only along this axis. Interpolates along all axes if set to -1 (default). | | noHeuristicAlignment | boolean | Heuristic alignment of regions for interpolation is faster than optimal alignment. | | noUseDistanceTransform | boolean | Using distance transform instead of repeated dilations to calculate the median contour is slightly faster, but produces lower quality interpolations. | | useCustomSlicePositions | boolean | Use custom slice positions (not slice auto-detection). | | noUseExtrapolation | boolean | Perform 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. | | useBallStructuringElement | boolean | Use ball instead of default cross structuring element for repeated dilations. | | labeledSliceIndicesAxis | number | Axis along which the labeled slice indices are defined. Default is -1 (that is, auto-detection). | | labeledSliceIndicesLabel | number | Label of the slice indices. Default is 1. | | labeledSliceIndices | number[] | List of labeled slice indices. Default is empty. |

MorphologicalContourInterpolationNodeResult interface:

| Property | Type | Description | | :-----------: | :-----: | :--------------- | | outputImage | Image | The output image |