/** * Imports ***/ import { Matrix4 } from 'three'; import { Vector3 } from 'three'; import ModelsBase from '../models/models.base'; /** * Stack object. * * @ module models/stack */ export default class ModelsStack extends ModelsBase { /** * Models Stack constructor */ _uid: any; _stackID: number; _frame: any[]; _numberOfFrames: number; _rows: number; _columns: number; _numberOfChannels: number; _bitsAllocated: number; _pixelType: number; _pixelRepresentation: number; _textureSize: number; _textureUnits: number; _textureType: number; _rawData: any[]; _windowCenter: number; _windowWidth: number; _rescaleSlope: number; _rescaleIntercept: number; _minMax: number[]; _regMatrix: Matrix4; _ijk2LPS: any; _lps2IJK: any; _aabb2LPS: any; _lps2AABB: any; _dimensionsIJK: any; _halfDimensionsIJK: any; _spacing: Vector3; _spacingBetweenSlices: number; _sliceThickness: number; _origin: any; _rightHanded: boolean; _xCosine: Vector3; _yCosine: Vector3; _zCosine: Vector3; _prepared: boolean; _packed: boolean; _packedPerPixel: number; _modality: string; _segmentationType: any; _segmentationSegments: any[]; _segmentationDefaultColor: number[]; _frameSegment: any[]; _segmentationLUT: any[]; _segmentationLUTO: any[]; _invert: boolean; constructor(); /** * Prepare segmentation stack. * A segmentation stack can hold x frames that are at the same location * but segmentation specific information: * - Frame X contains voxels for segmentation A. * - Frame Y contains voxels for segmenttation B. * - Frame X and Y are at the same location. * * We currently merge overlaping frames into 1. */ prepareSegmentation(): void; /** * Compute cosines * Order frames * computeSpacing * sanityCheck * init some vars * compute min/max * compute transformation matrices * * @ return {*} */ prepare(): void; packEchos(): void; computeNumberOfFrames(): boolean; computeCosines(): void; orderFrames(): void; computeSpacing(): void; /** * Compute stack z spacing */ zSpacing(): void; /** * FRAME CAN DO IT */ xySpacing(): void; /** * Find min and max intensities among all frames. */ computeMinMaxIntensities(): void; /** * Compute IJK to LPS and invert transforms */ computeIJK2LPS(): void; /** * Compute LPS to AABB and invert transforms */ computeLPS2AABB(): void; /** * Merge stacks * * @ param {*} stack * * @ return {*} */ merge(stack: any): boolean; /** * Pack current stack pixel data into 8 bits array buffers */ pack(): void; /** * Pack frame data to 32 bits texture * @ param {*} channels * @ param {*} frame * @ param {*} textureSize * @ param {*} startVoxel * @ param {*} stopVoxel */ _packTo8Bits(channels: any, frame: any, textureSize: any, startVoxel: any, stopVoxel: any): { textureType: any; data: any; }; /** * Get the stack world center * *@ return {*} */ worldCenter(): any; /** * Get the stack world bounding box * @ return {*} */ worldBoundingBox(): number[]; /** * Get AABB size in LPS space. * * @ return {*} */ AABBox(): Vector3; /** * Get AABB center in LPS space */ centerAABBox(): any; static indexInDimensions(index: any, dimensions: any): boolean; _arrayToVector3(array: any, index: any): Vector3; _orderFrameOnDimensionIndicesArraySort(a: any, b: any): 1 | 0 | -1; _computeDistanceArrayMap(normal: any, frame: any): any; _sortDistanceArraySort(a: any, b: any): number; _sortInstanceNumberArraySort(a: any, b: any): number; _sortSopInstanceUIDArraySort(a: any, b: any): number; numberOfChannels: any; frame: any; prepared: any; packed: any; packedPerPixel: any; dimensionsIJK: any; halfDimensionsIJK: any; regMatrix: any; ijk2LPS: any; lps2IJK: any; lps2AABB: any; textureSize: any; textureUnits: any; textureType: any; bitsAllocated: any; rawData: any; windowWidth: number; windowCenter: number; rescaleSlope: number; rescaleIntercept: number; xCosine: Vector3; yCosine: Vector3; zCosine: Vector3; minMax: number[]; stackID: number; pixelType: number; pixelRepresentation: number; invert: any; modality: any; rightHanded: boolean; spacingBetweenSlices: number; segmentationSegments: any; segmentationType: any; segmentationLUT: any; segmentationLUTO: any; /** * @ deprecated for core.utils.value * * Get voxel value. * * @ param {*} stack * @ param {*} coordinate * * @ return {*} */ static value(stack: any, coordinate: any): void; /** * @ deprecated for core.utils.rescaleSlopeIntercept * * Apply slope/intercept to a value. * * @ param {*} value * @ param {*} slope * @ param {*} intercept * * @ return {*} */ static valueRescaleSlopeIntercept(value: any, slope: any, intercept: any): any; /** * @deprecated for core.utils.worldToData * * Transform coordinates from world coordinate to data * * @ param {*} stack * @ param {*} worldCoordinates * * @ return {*} */ static worldToData(stack: any, worldCoordinates: any): Vector3; }