UNPKG

our-medical

Version:

medical image vue component

247 lines (246 loc) 7.72 kB
import { type Types } from '@cornerstonejs/core'; import type { Ref } from 'vue'; import type { DisplayComponentID, MedicalComponentID } from '../types'; /** * @description 设置组件浮动层不透明度 * @author jiannan.jiao * @date 21/11/2023 * @export * @param {(MedicalComponentID | DisplayComponentID)} componentId * @param {number} opacity * @param {boolean} [updateViewport=true] 是否更新视口 */ export declare function setOpacity(componentId: MedicalComponentID | DisplayComponentID, opacity: number, updateViewport?: boolean): void; /** * @description 获取组件浮动层不透明度,返回的是未经过再计算的透明度数值 * @author jiannan.jiao * @date 21/11/2023 * @export * @param {(MedicalComponentID | DisplayComponentID)} componentId * @returns {*} */ export declare function getOpacity(componentId: MedicalComponentID | DisplayComponentID): number | null; /** * @description 删除组件浮动层不透明度 * @author jiannan.jiao * @date 07/12/2023 * @export * @param {(MedicalComponentID | DisplayComponentID)} componentId * @returns {*} */ export declare function deleteOpacity(componentId: MedicalComponentID | DisplayComponentID): boolean; /** * @description 设置组件浮动层伪彩 * @author jiannan.jiao * @date 21/11/2023 * @export * @param {(MedicalComponentID | DisplayComponentID)} componentId * @param {string} name * @param {boolean} [updateViewport=true] 是否更新视口 */ export declare function setColor(componentId: MedicalComponentID | DisplayComponentID, name: string, updateViewport?: boolean): void; /** * @description 获取组件浮动层伪彩名称 * @author jiannan.jiao * @date 21/11/2023 * @export * @param {(MedicalComponentID | DisplayComponentID)} componentId * @returns {*} */ export declare function getColor(componentId: MedicalComponentID | DisplayComponentID): string | undefined; /** * @description 删除组件浮动层伪彩名称 * @author jiannan.jiao * @date 07/12/2023 * @export * @param {(MedicalComponentID | DisplayComponentID)} componentId * @returns {*} */ export declare function deleteColor(componentId: MedicalComponentID | DisplayComponentID): boolean; /** * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- */ /** * @description 返回vtk中的伪彩名称列表 * @author jiannan.jiao * @date 21/11/2023 * @export * @returns {*} */ export declare function getColorMap(): string[]; /** * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- */ type DirectionState = { center: Types.Point3; degrees: Types.Point3; radians: Types.Point3; }; /** * @description 获取体的旋转方向 * @author jiannan.jiao * @date 04/12/2023 * @export * @param {string} id * @returns {*} */ export declare function getVolumeDirectionState(id: string): DirectionState | undefined; /** * @description * @author jiannan.jiao * @date 07/12/2023 * @export * @param {string} id * @param {{ * angle: Types.Point3 * center: Types.Point3 * isDegrees?: boolean * }} options * @returns {*} */ export declare function setVolumeDirection(id: string, options: { angle: Types.Point3; center: Types.Point3; isDegrees?: boolean; }): { degrees: Types.Point3; radians: Types.Point3; center: Types.Point3; }; /** * @description 始终从体积的原始状态开始旋转、平移体积,可以指定旋转中心 * @author jiannan.jiao * @date 06/12/2023 * @export * @param {string} id * @param {{ * degrees?: boolean * componentIds?: string[] * rotationCenter: Types.Point3 * rotationAngle: Types.Point3 * translation: Types.Point3 * }} options * @param {boolean} [immediate=true] * @returns {*} */ export declare function setVolumeFromOriginal(id: string, options: { angle: Types.Point3; center: Types.Point3; translation: Types.Point3; isDegrees?: boolean; componentIds?: string[]; }, immediate?: boolean): void; /** * @description 获取体的位移数据 * @author jiannan.jiao * @date 04/12/2023 * @export * @param {string} id * @returns {*} */ export declare function getVolumePositionState(id: string): Types.Point3 | undefined; /** * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- */ /** * @description 还原体的旋转和位移 * @author jiannan.jiao * @date 04/12/2023 * @export * @param {string} id * @param {{ componentIds?: string[]; immediate: boolean }} [options={ immediate: true }] */ export declare function resetVolume(id: string, options?: { componentIds?: string[]; immediate: boolean; }): void; /** * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- * ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- */ export type TransformState = { degrees: Types.Point3; radians: Types.Point3; translation: Types.Point3; }; /** * @description 设置体积的基础配准数据 * @author jiannan.jiao * @date 06/05/2025 * @export * @param {string} id * @param {{ * angle: Types.Point3 //旋转角度 * translation: Types.Point3 //中心点偏移 * isDegrees?: boolean * }} options */ export declare function setVolumeTransformBasic(id: string, options: { angle: Types.Point3; translation: Types.Point3; isDegrees?: boolean; }): void; /** * @description 获取体积的基础配准数据 * @author jiannan.jiao * @date 06/05/2025 * @export * @param {string} id * @returns {*} */ export declare function getVolumeTransformBasic(id: string): TransformState | undefined; /** * @description 移除体积的基础配准数据 * @author jiannan.jiao * @date 06/05/2025 * @export * @param {string} id * @returns {*} */ export declare function removeVolumeTransformBasic(id: string): boolean; /** * @description * @author jiannan.jiao * @date 29/04/2025 * @export * @param {string} id * @returns {*} */ export declare function getVolumeTransformState(id: string): Ref<TransformState>; /** * @description * @author jiannan.jiao * @date 29/04/2025 * @export * @param {string} id * @returns {*} */ export declare function removeVolumeTransformState(id: string): boolean; /** * @description 设置体积的旋转和偏移,先围绕体积原始的中心点进行旋转,再从原始中心点偏移 * @author jiannan.jiao * @date 29/04/2025 * @export * @param {string} id * @param {{ * angle: Types.Point3 //旋转角度 * translation: Types.Point3 //中心点偏移 * isDegrees?: boolean * componentIds?: string[] * }} options * @param {boolean} [emit=false] */ export declare function setVolumeTransform(id: string, options: { angle: Types.Point3; translation: Types.Point3; isDegrees?: boolean; componentIds?: string[]; }, emit?: boolean): void; export {};