|
| 1 | +import { mat4 } from 'gl-matrix'; |
| 2 | +import vtkAbstractWidgetFactory from '../../Core/AbstractWidgetFactory'; |
| 3 | +import vtkImageData from '../../../Common/DataModel/ImageData'; |
| 4 | +import vtkImageReslice from '../../../Imaging/Core/ImageReslice'; |
| 5 | +import vtkPlaneSource from '../../../Filters/Sources/PlaneSource'; |
| 6 | +import vtkRenderer from '../../../Rendering/Core/Renderer'; |
| 7 | +import vtkPlaneManipulator from '../../Manipulators/PlaneManipulator'; |
| 8 | +import { ViewTypes } from '../../../Widgets/Core/WidgetManager/Constants'; |
| 9 | +import { Vector2, Vector3 } from '../../../types'; |
| 10 | + |
| 11 | +export interface IDisplayScaleParams { |
| 12 | + dispHeightFactor: number, |
| 13 | + cameraPosition: Vector3, |
| 14 | + cameraDir: Vector3, |
| 15 | + isParallel: false, |
| 16 | + rendererPixelDims: Vector2 |
| 17 | +} |
| 18 | + |
| 19 | +export interface vtkResliceCursorWidget extends vtkAbstractWidgetFactory { |
| 20 | + |
| 21 | + /** |
| 22 | + * @param {ViewTypes} viewType |
| 23 | + */ |
| 24 | + getRepresentationsForViewType(viewType: ViewTypes): unknown; |
| 25 | + |
| 26 | + setImage(image: vtkImageData): void; |
| 27 | + |
| 28 | + setCenter(center: Vector3): void; |
| 29 | + |
| 30 | + updateCameraPoints( |
| 31 | + renderer: vtkRenderer, |
| 32 | + viewType: ViewTypes, |
| 33 | + resetFocalPoint: boolean, |
| 34 | + keepCenterFocalDistance: boolean, |
| 35 | + computeFocalPointOffset: boolean |
| 36 | + ): void; |
| 37 | + |
| 38 | + resetCamera( |
| 39 | + renderer: vtkRenderer, |
| 40 | + viewType: ViewTypes, |
| 41 | + resetFocalPoint: boolean, |
| 42 | + keepCenterFocalDistance: boolean |
| 43 | + ): void; |
| 44 | + |
| 45 | + |
| 46 | + getPlaneSource(viewType: ViewTypes): vtkPlaneSource; |
| 47 | + |
| 48 | + getResliceAxes(viewType: ViewTypes): mat4; |
| 49 | + |
| 50 | + updateReslicePlane(imageReslice: vtkImageReslice, viewType: ViewTypes): boolean; |
| 51 | + |
| 52 | + getPlaneSourceFromViewType(type: ViewTypes): vtkPlaneSource; |
| 53 | + |
| 54 | + getPlaneNormalFromViewType(viewType: ViewTypes): Vector3; |
| 55 | + |
| 56 | + getOtherPlaneNormals(viewType: ViewTypes): Array<Vector3>; |
| 57 | + |
| 58 | + getResliceMatrix(): mat4; |
| 59 | + |
| 60 | + getDisplayScaleParams(): IDisplayScaleParams; |
| 61 | + |
| 62 | + setScaleInPixels(scale: boolean): boolean; |
| 63 | + |
| 64 | + getScaleInPixels(): boolean; |
| 65 | + |
| 66 | + setRotationHandlePosition(position: number): boolean; |
| 67 | + |
| 68 | + getRotationHandlePosition(): number; |
| 69 | + |
| 70 | + setManipulator(manipulator: vtkPlaneManipulator): boolean; |
| 71 | + |
| 72 | + getManipulator(): vtkPlaneManipulator; |
| 73 | + |
| 74 | +} |
| 75 | + |
| 76 | +export interface IResliceCursorWidgetInitialValues {} |
| 77 | + |
| 78 | +/** |
| 79 | + * Method used to decorate a given object (publicAPI+model) with vtkResliceCursorWidget characteristics. |
| 80 | + * |
| 81 | + * @param publicAPI object on which methods will be bounds (public) |
| 82 | + * @param model object on which data structure will be bounds (protected) |
| 83 | + * @param initialValues (default: {}) |
| 84 | + */ |
| 85 | +export function extend( |
| 86 | + publicAPI: object, |
| 87 | + model: object, |
| 88 | + initialValues?: IResliceCursorWidgetInitialValues |
| 89 | +): vtkResliceCursorWidget; |
| 90 | + |
| 91 | +/** |
| 92 | + * Method used to create a new instance of vtkResliceCursorWidget |
| 93 | + * |
| 94 | + * @param initialValues for pre-setting some of its content |
| 95 | + */ |
| 96 | +export function newInstance(initialValues?: IResliceCursorWidgetInitialValues): vtkResliceCursorWidget; |
| 97 | + |
| 98 | +export declare const vtkResliceCursorWidget: { |
| 99 | + newInstance: typeof newInstance; |
| 100 | + extend: typeof extend; |
| 101 | +}; |
| 102 | + |
| 103 | +export default vtkResliceCursorWidget; |
0 commit comments