larvitar 3.5.4 → 3.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* rendering images in html canvas using cornerstone
|
|
4
4
|
*/
|
|
5
5
|
import cornerstone from "cornerstone-core";
|
|
6
|
-
import { RenderProps, Series, StoreViewport, Viewport } from "./types";
|
|
6
|
+
import { DisplayedArea, RenderProps, Series, StoreViewport, Viewport } from "./types";
|
|
7
|
+
import { ViewportComplete } from "./tools/types";
|
|
7
8
|
/**
|
|
8
9
|
* Purge the cornestone internal cache
|
|
9
10
|
* If seriesId is passed as argument only imageIds of the series are purged from internal cache
|
|
@@ -106,6 +107,23 @@ export declare const unloadViewport: (elementId: string) => void;
|
|
|
106
107
|
* @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
|
|
107
108
|
*/
|
|
108
109
|
export declare const resizeViewport: (elementId: string | HTMLElement) => void;
|
|
110
|
+
/**
|
|
111
|
+
* Check if the displayed image is anisotropic (row pixel spacing !== col pixel spacing)
|
|
112
|
+
* @instance
|
|
113
|
+
* @function isAnisotropic
|
|
114
|
+
* @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
|
|
115
|
+
* @returns {Boolean}
|
|
116
|
+
*/
|
|
117
|
+
export declare const isAnisotropic: (elementId: string) => boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Retrieves Anisotropic Viewport displayedArea properties
|
|
120
|
+
* @instance
|
|
121
|
+
* @function getAnisotropicDisplayedArea
|
|
122
|
+
* @param {String} elementId - The html div id used for rendering or its DOM HTMLElement
|
|
123
|
+
* @param {ViewportComplete} viewport - The viewport
|
|
124
|
+
* @returns {DisplayedArea}
|
|
125
|
+
*/
|
|
126
|
+
export declare const getAnisotropicDisplayedArea: (id: string, viewport: ViewportComplete) => DisplayedArea | undefined;
|
|
109
127
|
/**
|
|
110
128
|
* Cache image and render it in a html div using cornerstone
|
|
111
129
|
* @instance
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnabledElement } from "cornerstone-core";
|
|
2
|
-
import { Image, Viewport } from "../types";
|
|
2
|
+
import { DisplayedArea, Image, Viewport } from "../types";
|
|
3
3
|
type ToolOptions = {
|
|
4
4
|
mouseButtonMask?: number | number[];
|
|
5
5
|
supportedInteractionTypes?: string[];
|
|
@@ -131,7 +131,7 @@ export type HandlePosition = {
|
|
|
131
131
|
};
|
|
132
132
|
export interface ViewportComplete extends Viewport {
|
|
133
133
|
initialRotation: number;
|
|
134
|
-
displayedArea:
|
|
134
|
+
displayedArea: DisplayedArea;
|
|
135
135
|
scale: number;
|
|
136
136
|
rotation: number;
|
|
137
137
|
vflip: boolean;
|
package/dist/imaging/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DataSet } from "dicom-parser";
|
|
|
3
3
|
import { MetaDataTypes } from "./MetaDataTypes";
|
|
4
4
|
import { MetaDataReadable } from "./MetaDataReadable";
|
|
5
5
|
import { Element } from "dicom-parser";
|
|
6
|
-
import { Overlay } from "./tools/types";
|
|
6
|
+
import { Coords, DisplayAreaVisualizations, Overlay } from "./tools/types";
|
|
7
7
|
export type tags = {
|
|
8
8
|
[x: string]: Element;
|
|
9
9
|
}[];
|
|
@@ -186,21 +186,15 @@ export interface Layer extends cornerstone.EnabledElementLayer {
|
|
|
186
186
|
}
|
|
187
187
|
export interface Viewport extends cornerstone.Viewport {
|
|
188
188
|
newImageIdIndex: number;
|
|
189
|
-
displayedArea: {
|
|
190
|
-
tlhc: {
|
|
191
|
-
x: number;
|
|
192
|
-
y: number;
|
|
193
|
-
};
|
|
194
|
-
brhc: {
|
|
195
|
-
x: number;
|
|
196
|
-
y: number;
|
|
197
|
-
};
|
|
198
|
-
columnPixelSpacing: number;
|
|
199
|
-
rowPixelSpacing: number;
|
|
200
|
-
presentationSizeMode: string;
|
|
201
|
-
};
|
|
202
189
|
overlayColor?: boolean | string;
|
|
203
190
|
}
|
|
191
|
+
export type DisplayedArea = {
|
|
192
|
+
tlhc?: Coords;
|
|
193
|
+
brhc?: Coords;
|
|
194
|
+
presentationSizeMode?: DisplayAreaVisualizations;
|
|
195
|
+
rowPixelSpacing?: number;
|
|
196
|
+
columnPixelSpacing?: number;
|
|
197
|
+
};
|
|
204
198
|
export type Contours = {
|
|
205
199
|
[key: string]: {
|
|
206
200
|
[key: string]: Array<{
|