Skip to content

Commit

Permalink
Beta v0.34.0-beta.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Jul 24, 2024
1 parent 595fb4f commit 471fa04
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 41 deletions.
92 changes: 66 additions & 26 deletions dist/dwv.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ export declare class Annotation {
/**
* The ID.
*
* 'Tracking Unique Identifier', 112040, DCM.
*
* @type {string}
*/
id: string;
Expand All @@ -45,38 +43,34 @@ export declare class Annotation {
/**
* Additional points used to define the annotation.
*
* @type {Point2D[]}
* @type {Point2D[]|undefined}
*/
referencePoints: Point2D[];
referencePoints: Point2D[] | undefined;
/**
* The color: for example 'green', '#00ff00' or 'rgb(0,255,0)'.
*
* 'RGB R Component', 110834, DCM...
*
* @type {string}
* @type {string|undefined}
*/
colour: string;
colour: string | undefined;
/**
* Annotation quantification.
*
* @type {object}
* @type {object|undefined}
*/
quantification: object;
quantification: object | undefined;
/**
* Text expression. Can contain variables surrounded with '{}' that will
* be extracted from the quantification object.
*
* 'Short label', 125309, DCM.
*
* @type {string}
* @type {string|undefined}
*/
textExpr: string;
textExpr: string | undefined;
/**
* Label position.
*
* @type {Point2D}
* @type {Point2D|undefined}
*/
labelPosition: Point2D;
labelPosition: Point2D | undefined;
/**
* Set the associated view controller.
*
Expand Down Expand Up @@ -189,6 +183,18 @@ export declare class AnnotationGroup {
* @returns {number} The number of annotations.
*/
getLength(): number;
/**
* Check if the annotation group is editable.
*
* @returns {boolean} True if editable.
*/
isEditable(): boolean;
/**
* Set the annotation group editability.
*
* @param {boolean} flag True to make the annotation group editable.
*/
setEditable(flag: boolean): void;
/**
* Add a new annotation.
*
Expand All @@ -199,8 +205,9 @@ export declare class AnnotationGroup {
* Update an existing annotation.
*
* @param {Annotation} annotation The annotation to update.
* @param {string[]} [propKeys] Optional properties that got updated.
*/
update(annotation: Annotation): void;
update(annotation: Annotation, propKeys?: string[]): void;
/**
* Remove an annotation.
*
Expand Down Expand Up @@ -1448,6 +1455,18 @@ export declare class DrawController {
* @returns {AnnotationGroup} The list.
*/
getAnnotationGroup(): AnnotationGroup;
/**
* Check if the annotation group is editable.
*
* @returns {boolean} True if editable.
*/
isAnnotationGroupEditable(): boolean;
/**
* Set the annotation group editability.
*
* @param {boolean} flag True to make the annotation group editable.
*/
setAnnotationGroupEditable(flag: boolean): void;
/**
* Add an annotation.
*
Expand All @@ -1458,8 +1477,9 @@ export declare class DrawController {
* Update an anotation from the list.
*
* @param {Annotation} annotation The annotation to update.
* @param {string[]} [propKeys] Optional properties that got updated.
*/
updateAnnotation(annotation: Annotation): void;
updateAnnotation(annotation: Annotation, propKeys?: string[]): void;
/**
* Remove an anotation for the list.
*
Expand All @@ -1473,6 +1493,17 @@ export declare class DrawController {
* @param {Function} exeCallback The undo stack callback.
*/
removeAnnotationWithCommand(id: string, exeCallback: Function): void;
/**
* Update an annotation via an update command (triggers draw actions).
*
* @param {string} id The annotation id.
* @param {object} originalProps The original annotation properties
* that will be updated.
* @param {object} newProps The new annotation properties
* that will replace the original ones.
* @param {Function} exeCallback The undo stack callback.
*/
updateAnnotationWithCommand(id: string, originalProps: object, newProps: object, exeCallback: Function): void;
/**
* Remove all annotations via remove commands (triggers draw actions).
*
Expand Down Expand Up @@ -1664,19 +1695,28 @@ export declare class DrawLayer {
*/
fitToContainer(containerSize: Scalar2D, divToWorldSizeRatio: number, fitOffset: Scalar2D): void;
/**
* Check the visibility of a given group.
* Check the visibility of an annotation.
*
* @param {string} id The id of the annotation.
* @returns {boolean} True if the annotation is visible.
*/
isAnnotationVisible(id: string): boolean;
/**
* Set the visibility of an annotation.
*
* @param {string} id The id of the group.
* @returns {boolean} True if the group is visible.
* @param {string} id The id of the annotation.
* @param {boolean} [visible] True to set to visible,
* will toggle visibility if not defined.
* @returns {boolean} False if the annotation shape cannot be found.
*/
isGroupVisible(id: string): boolean;
setAnnotationVisibility(id: string, visible?: boolean): boolean;
/**
* Toggle the visibility of a given group.
* Set the visibility of all labels.
*
* @param {string} id The id of the group.
* @returns {boolean} False if the group cannot be found.
* @param {boolean} [visible] True to set to visible,
* will toggle visibility if not defined.
*/
toggleGroupVisibility(id: string): boolean;
setLabelsVisibility(visible?: boolean): void;
/**
* Delete a Draw from the stage.
*
Expand Down
2 changes: 1 addition & 1 deletion dist/dwv.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dwv.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dwv",
"version": "0.34.0-beta.7",
"version": "0.34.0-beta.8",
"description": "DICOM Web Viewer.",
"keywords": [
"DICOM",
Expand Down
24 changes: 15 additions & 9 deletions resources/api/dwv.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ export function addTagsToDictionary(group: string, tags: {

// @public
export class Annotation {
colour: string;
colour: string | undefined;
getFactory(): object;
getOriginIndex(): Index | undefined;
getText(): string;
getType(): string;
id: string;
labelPosition: Point2D;
labelPosition: Point2D | undefined;
mathShape: object;
position: string;
quantification: object;
referencePoints: Point2D[];
quantification: object | undefined;
referencePoints: Point2D[] | undefined;
referenceSopUID: string;
setTextExpr(labelText: {
[x: string]: string;
}): void;
setViewController(viewController: ViewController): void;
textExpr: string;
textExpr: string | undefined;
updateQuantification(): void;
}

Expand Down Expand Up @@ -62,11 +62,13 @@ export class AnnotationGroup {
};
getMetaValue(key: string): string | object;
hasMeta(key: string): boolean;
isEditable(): boolean;
remove(id: string): void;
removeEventListener(type: string, callback: Function): void;
setEditable(flag: boolean): void;
setMetaValue(key: string, value: string | object): void;
setViewController(viewController: ViewController): void;
update(annotation: Annotation): void;
update(annotation: Annotation, propKeys?: string[]): void;
}

// @public
Expand Down Expand Up @@ -338,11 +340,14 @@ export class DrawController {
// @deprecated
getDrawStoreDetails(): void;
hasAnnotationMeta(key: string): boolean;
isAnnotationGroupEditable(): boolean;
removeAllAnnotationsWithCommand(exeCallback: Function): void;
removeAnnotation(id: string): void;
removeAnnotationWithCommand(id: string, exeCallback: Function): void;
setAnnotationGroupEditable(flag: boolean): void;
setAnnotationMeta(key: string, value: string): void;
updateAnnotation(annotation: Annotation): void;
updateAnnotation(annotation: Annotation, propKeys?: string[]): void;
updateAnnotationWithCommand(id: string, originalProps: object, newProps: object, exeCallback: Function): void;
}

// @public
Expand Down Expand Up @@ -375,19 +380,20 @@ export class DrawLayer {
getNumberOfDraws(): number | undefined;
getOpacity(): number;
initialise(size: Scalar2D, spacing: Scalar2D): void;
isGroupVisible(id: string): boolean;
isAnnotationVisible(id: string): boolean;
isVisible(): boolean;
removeEventListener(type: string, callback: Function): void;
removeFromDOM(): void;
setAnnotationGroup(annotationGroup: AnnotationGroup, dataId: string, exeCallback: object): void;
setAnnotationVisibility(id: string, visible?: boolean): boolean;
setBaseOffset(scrollOffset: Vector3D, planeOffset: Vector3D): boolean;
setCurrentPosition(position: Point, index: Index): boolean;
setLabelsVisibility(visible?: boolean): void;
setOffset(newOffset: Scalar3D): void;
setOpacity(alpha: number): void;
setPlaneHelper(helper: PlaneHelper): void;
setScale(newScale: Scalar3D, center?: Point3D): void;
setShapeHandler(handler: DrawShapeHandler | undefined): void;
toggleGroupVisibility(id: string): boolean;
unbindInteraction(): void;
}

Expand Down
4 changes: 2 additions & 2 deletions resources/doc/jsdoc.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"package": "package.json",
"theme_opts": {
"title": "DWV",
"footer": "<i>Documentation generated for dwv v0.34.0-beta.7.</i>",
"footer": "<i>Documentation generated for dwv v0.34.0-beta.8.</i>",
"sections": [
"Tutorials",
"Namespaces",
Expand All @@ -50,7 +50,7 @@
"codepen": {
"enable_for": ["examples"],
"options": {
"js_external": "https://github.com/ivmartel/dwv/releases/download/v0.34.0-beta.7/dwv-0.34.0-beta.7.min.js",
"js_external": "https://github.com/ivmartel/dwv/releases/download/v0.34.0-beta.8/dwv-0.34.0-beta.8.min.js",
"html": "<div id='dwv'><div id='layerGroup0'></div></div>"
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/dicom/dicomParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
* @returns {string} The version of the library.
*/
export function getDwvVersion() {
return '0.34.0-beta.7';
return '0.34.0-beta.8';
}

/**
Expand Down

0 comments on commit 471fa04

Please sign in to comment.