All files / core/src/types IStackInput.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33                                                                 
import type { ImageActor } from './IActor';
 
/**
 * Stack input callback type, used to perform operations on the image data
 * after it has been loaded.
 */
type StackInputCallback = (params: {
  /** vtk image actor */
  imageActor: ImageActor;
  /** unique image Id in the cache */
  imageId: string;
}) => unknown;
 
/**
 * StackInput that can be used to add an image actor  to a viewport. It includes
 * mandatory `imageId` but other options such as `visibility` and `callback`
 * can also be provided
 */
interface IStackInput {
  /** imageId of the image in the cache */
  imageId: string;
  // actorUID of the imageActor being added
  actorUID?: string;
  /** Visibility of the image actor - by default it is true */
  visibility?: boolean;
  /** Callback to be called when the image is added to the viewport */
  callback?: StackInputCallback;
  /** other metadata that is needed for the image */
  [key: string]: unknown;
}
 
export type { IStackInput, StackInputCallback };