Purpose

The ImageShapeBasedInterpolation interpolates missing slices in a mask image using the well-known “Shape Based Interpolation” method. This method estimates the shape of an object from sparsely spaced slices of it. Thus an organ or other object of interest can be reconstructed from a series of arbitrary spaced slices.

Implemented according to: G. Herman et al: Shape-based Interpolation, IEEE Computer Graphics&Applications, vol. 12 no. 3 p.69-79. Specifically, it’s their “method 5” (with linear between-slice interpolation).

This module uses exactly the same method as CSOShapeBasedInterpolation.

Usage

  1. Connect a binary image.
  2. Touch the “update” Trigger field.

Details

The algorithm proceeds in the following way:

  1. Copy the input image into an internal mask representation.
  2. Transform the resulting slices which contain a shape from the input image into a distance image using algorithm from: G. Herman et al: “Shape-based Interpolation”.
  3. Linear interpolate the distance values onto intermediate slices.
  4. Calculate the final output mask image based on the distance image.

The module returns an error when an empty (all-zero) mask is connected.

Tips

To speed up the calculation you should use a bounding box of the input image.

Use this module instead of CSOShapeBasedInterpolation if 1) your input is not a CSOList, but a mask, e.g. from segmentation on a downsampled image, or 2) you want to change the parameters of the CSO-to-image conversion, e.g. to interpret nested CSOs as holes. See CSOVoxelizeContours for parametrization options.

Windows

Default Panel

../../../Projects/SBI/MLShapeBasedInterpolationSlices/Modules/mhelp/Images/Screenshots/ImageShapeBasedInterpolation._default.png

Input Fields

input0

name: input0, type: Image

A binary image where some slices represent an object and some slices in between are zero.

inCSOList

name: inCSOList, type: MLBase

A CSOList representing the same object as input0 (required if and only if Use distance to contour is True).

Output Fields

output0

name: output0, type: Image

Contains the interpolation result as a volume mask (0, 255). Type is unsigned int8.

output1

name: output1, type: Image

Contains the interpolated distance map. Type is unsigned int16.

Parameter Fields

Field Index

[]: Trigger
Clear: Trigger
Has Valid Output: Bool
On Input Change Behavior: Enum
Status Code: Enum
Status Message: String
Update: Trigger
Use distance to contour: Bool

Visible Fields

Update

name: update, type: Trigger

Initiates update of all output field values.

Clear

name: clear, type: Trigger

Clears all output field values to a clean initial state.

On Input Change Behavior

name: onInputChangeBehavior, type: Enum, default: Clear, deprecated name: shouldAutoUpdate,shouldUpdateAutomatically

Declares how the module should react if a value of an input field changes.

Values:

Title Name Deprecated Name
Update Update TRUE
Clear Clear FALSE

Status Code

name: statusCode, type: Enum, persistent: no

Reflects module’s status (successful or failed computations) as one of some predefined enumeration values.

Values:

Title Name
Ok Ok
Invalid input object Invalid input object
Invalid input parameter Invalid input parameter
Internal error Internal error

Status Message

name: statusMessage, type: String, persistent: no

Gives additional, detailed information about status code as human-readable message.

Has Valid Output

name: hasValidOutput, type: Bool, persistent: no

Indicates validity of output field values (success of computation).

[]

name: updateDone, type: Trigger, persistent: no

Notifies that an update was performed (Check status interface fields to identify success or failure).

Use distance to contour

name: inUseDistanceToContour, type: Bool, default: FALSE

If True, the distance transform computes distances to the CSOs rather than to the mask created from it, allowing for subvoxel accuracy in the distance map.