Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dicom Loader Typescript Conversion #330

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0ca9653
fix: mouse-up should not unhighlight annotations (#305)
sedghi Nov 23, 2022
5999830
chore(release): publish [skip ci]
Nov 23, 2022
5605a39
fix: stack viewport flip scroll (#304)
sedghi Nov 23, 2022
049b292
chore(release): publish [skip ci]
Nov 23, 2022
3303246
feat: add referenceCursors tool (#275)
doepnern Nov 23, 2022
64e4ab3
chore(release): publish [skip ci]
Nov 23, 2022
1350eca
fix: ZoomTool fix for polyData actors with no imageData (#308)
NeilMacPhee Nov 24, 2022
b80ea40
chore(release): publish [skip ci]
Nov 24, 2022
ea8e32a
fix: If planar annotation is not visible, filter it (#318)
Edward-Son Dec 1, 2022
70e4ffa
fix: filter planarFreeHandeROI based on parallel normals instead of e…
ramonemiliani93 Dec 1, 2022
6e8e51b
fix: get correct imageData with targetId in BaseTool (#294)
DMIAOCHEN Dec 1, 2022
e68f064
chore(release): publish [skip ci]
Dec 1, 2022
48bd8a1
fix: htj2k and keymodifier (#313)
wayfarer3130 Dec 1, 2022
d7704a9
chore(release): publish [skip ci]
Dec 1, 2022
a85a867
fix: coronal view should not be flipped (#321)
sedghi Dec 1, 2022
027befd
chore(release): publish [skip ci]
Dec 1, 2022
f973e72
fix: bidirectional tool when short and long axis changes (#309)
sedghi Dec 1, 2022
0dc8537
chore(release): publish [skip ci]
Dec 1, 2022
a58a831
fix(volumeViewport): Add optional scaling as the volume can be undefi…
gabriellebaudy Dec 1, 2022
6ef505c
chore(release): publish [skip ci]
Dec 1, 2022
1dd315c
fix: Use queryselector instead of firstChild to get svg-layer (#268)
lambacini Dec 1, 2022
f9de519
chore(release): publish [skip ci]
Dec 1, 2022
82da3f0
[wip] initial dicom-loader typescript conversion
Dec 7, 2022
edb3eb5
[wip] initial typescript conversion
Dec 7, 2022
d55ab3b
[wip] initial dicom-loader typescript conversion
Dec 7, 2022
09ca22f
[wip] update types for tests
Dec 7, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions common/reviews/api/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ type FlipDirection = {
// @public (undocumented)
function getClosestImageId(imageVolume: IImageVolume, worldPos: Point3, viewPlaneNormal: Point3, viewUp: Point3): string;

// @public (undocumented)
function getClosestStackImageIndexForPoint(point: Point3, viewport: IStackViewport): number | null;

// @public (undocumented)
export function getEnabledElement(element: HTMLDivElement | undefined): IEnabledElement | undefined;

Expand Down Expand Up @@ -608,6 +611,9 @@ function getVolumeActorCorners(volumeActor: any): Array<Point3>;
// @public (undocumented)
function getVolumeViewportsContainingSameVolumes(targetViewport: IVolumeViewport, renderingEngineId?: string): Array<IVolumeViewport>;

// @public (undocumented)
function hasNaNValues(input: number[] | number): boolean;

// @public (undocumented)
interface ICache {
// (undocumented)
Expand Down Expand Up @@ -1521,13 +1527,17 @@ declare namespace planar {
export {
linePlaneIntersection,
planeEquation,
threePlaneIntersection
threePlaneIntersection,
planeDistanceToPoint
}
}

// @public (undocumented)
type Plane = [number, number, number, number];

// @public (undocumented)
function planeDistanceToPoint(plane: Plane, point: Point3, signed?: boolean): number;

// @public (undocumented)
function planeEquation(normal: Point3, point: Point3 | vec3): Plane;

Expand Down Expand Up @@ -1965,9 +1975,11 @@ declare namespace utilities {
getImageSliceDataForVolumeViewport,
isImageActor,
getViewportsWithImageURI,
getClosestStackImageIndexForPoint,
calculateViewportsSpatialRegistration,
spatialRegistrationMetadataProvider,
getViewportImageCornersInWorld
getViewportImageCornersInWorld,
hasNaNValues
}
}
export { utilities }
Expand Down Expand Up @@ -2020,8 +2032,8 @@ export class Viewport implements IViewport {
_getEdges(bounds: Array<number>): Array<[number[], number[]]>;
// (undocumented)
_getFocalPointForResetCamera(centeredFocalPoint: Point3, previousCamera: ICamera, { resetPan, resetToCenter }: {
resetPan: boolean;
resetToCenter: boolean;
resetPan?: boolean;
resetToCenter?: boolean;
}): Point3;
// (undocumented)
getFrameOfReferenceUID: () => string;
Expand Down
84 changes: 79 additions & 5 deletions common/reviews/api/tools.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,12 @@ export class BidirectionalTool extends AnnotationTool {
hasMoved?: boolean;
} | null;
// (undocumented)
_getSignedAngle: (vector1: any, vector2: any) => number;
// (undocumented)
_getTextLines: (data: any, targetId: any) => string[];
// (undocumented)
_handleDragModify: (evt: any) => void;
// (undocumented)
handleSelectedCallback: (evt: EventTypes_2.MouseDownEventType, annotation: BidirectionalAnnotation, handle: ToolHandle, interactionType?: string) => void;
// (undocumented)
isDrawing: boolean;
Expand All @@ -521,11 +525,9 @@ export class BidirectionalTool extends AnnotationTool {
// (undocumented)
_mouseDragModifyCallback: (evt: MouseDragEventType) => void;
// (undocumented)
_mouseDragModifyHandle: (evt: any) => void;
// (undocumented)
_mouseUpCallback: (evt: EventTypes_2.MouseUpEventType | EventTypes_2.MouseClickEventType) => void;
// (undocumented)
_movingLongAxisWouldPutItThroughShortAxis: (proposedFirstLineSegment: any, secondLineSegment: any) => boolean;
_movingLongAxisWouldPutItThroughShortAxis: (firstLineSegment: any, secondLineSegment: any) => boolean;
// (undocumented)
preventHandleOutsideImage: boolean;
// (undocumented)
Expand Down Expand Up @@ -1279,7 +1281,7 @@ function drawArrow(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, ar
function drawCircle(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, circleUID: string, center: Types_2.Point2, radius: number, options?: {}): void;

// @public (undocumented)
function drawEllipse(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, ellipseUID: string, corner1: Types_2.Point2, corner2: Types_2.Point2, options?: {}): void;
function drawEllipse(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, ellipseUID: string, corner1: Types_2.Point2, corner2: Types_2.Point2, options?: {}, dataId?: string): void;

// @public (undocumented)
function drawHandles(svgDrawingHelper: SVGDrawingHelper, annotationUID: string, handleGroupUID: string, handlePoints: Array<Types_2.Point2>, options?: {}): void;
Expand Down Expand Up @@ -2606,9 +2608,23 @@ enum KeyboardBindings {
// (undocumented)
Alt = 18,
// (undocumented)
AltMeta = 1891,
// (undocumented)
Ctrl = 17,
// (undocumented)
Shift = 16
CtrlAlt = 1718,
// (undocumented)
CtrlMeta = 1791,
// (undocumented)
Meta = 91,
// (undocumented)
Shift = 16,
// (undocumented)
ShiftAlt = 1618,
// (undocumented)
ShiftCtrl = 1617,
// (undocumented)
ShiftMeta = 1691
}

// @public (undocumented)
Expand Down Expand Up @@ -3591,6 +3607,63 @@ export class RectangleScissorsTool extends BaseTool {
static toolName: any;
}

// @public (undocumented)
interface ReferenceCursor extends Annotation {
// (undocumented)
data: {
handles: {
points: [Types_2.Point3];
};
};
}

// @public (undocumented)
export class ReferenceCursors extends AnnotationDisplayTool {
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
// (undocumented)
_addAnnotation(element: HTMLDivElement, annotation: Annotation): string | null;
// (undocumented)
createInitialAnnotation: (worldPos: Types_2.Point3, element: HTMLDivElement) => void;
// (undocumented)
_currentCanvasPosition: null | Types_2.Point2;
// (undocumented)
_currentCursorWorldPosition: null | Types_2.Point3;
// (undocumented)
_disableCursorEnabled: boolean;
// (undocumented)
_elementWithCursor: null | HTMLDivElement;
// (undocumented)
filterInteractableAnnotationsForElement(element: HTMLDivElement, annotations: Annotations): Annotations;
// (undocumented)
getActiveAnnotation(element: HTMLDivElement): null | Annotation;
// (undocumented)
isDrawing: boolean;
// (undocumented)
isHandleOutsideImage: boolean;
// (undocumented)
mouseDragCallback: any;
// (undocumented)
mouseMoveCallback: (evt: EventTypes_2.MouseMoveEventType) => boolean;
// (undocumented)
onCameraModified: (evt: any) => void;
// (undocumented)
onSetToolActive(): void;
// (undocumented)
onSetToolDisabled(): void;
// (undocumented)
renderAnnotation: (enabledElement: Types_2.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
// (undocumented)
_throttledCalculateCachedStats: any;
// (undocumented)
static toolName: any;
// (undocumented)
touchDragCallback: any;
// (undocumented)
updateAnnotationPosition(element: HTMLDivElement, annotation: Annotation): void;
// (undocumented)
updateViewportImage(viewport: Types_2.IStackViewport | Types_2.IVolumeViewport): void;
}

// @public (undocumented)
interface ReferenceLineAnnotation extends Annotation {
// (undocumented)
Expand Down Expand Up @@ -4336,6 +4409,7 @@ declare namespace ToolSpecificAnnotationTypes {
PlanarFreehandROIAnnotation,
ArrowAnnotation,
AngleAnnotation,
ReferenceCursor,
ReferenceLineAnnotation
}
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"yarn": ">=1.19.1"
},
"scripts": {
"api-check": "lerna run --concurrency 1 api-check ",
"api-check": "lerna run api-check ",
"build": "lerna run build --stream",
"build:umd": "lerna run build:umd --stream",
"build:update-api": "lerna run --concurrency 1 build:update-api",
"build:update-api": "lerna run build:update-api",
"example": "node ./utils/ExampleRunner/example-runner-cli.js",
"all-examples": "node ./utils/ExampleRunner/build-all-examples-cli.js --fromRoot",
"build-all-examples": "node ./utils/ExampleRunner/build-all-examples-cli.js --build --fromRoot",
Expand Down
Loading