Skip to content

Commit

Permalink
Release 0.32.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Sep 4, 2023
1 parent f47ab35 commit f7522e9
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 30 deletions.
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [v0.32.2](https://github.com/ivmartel/dwv/releases/tag/v0.32.2) - 04/09/2023

### Added

- Add app options type [#1481](https://github.com/ivmartel/dwv/issues/1481)
- Add data element type [#1474](https://github.com/ivmartel/dwv/issues/1474)
- Export luts as plural not singular [#1478](https://github.com/ivmartel/dwv/issues/1478)
- Add data view config type [#1475](https://github.com/ivmartel/dwv/issues/1475)
- Use File[] and not Filelist [#1476](https://github.com/ivmartel/dwv/issues/1476)

## [v0.32.1](https://github.com/ivmartel/dwv/releases/tag/v0.32.1) - 19/06/2023

### Added
Expand Down
103 changes: 87 additions & 16 deletions dist/dwv.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ export declare class App {
/**
* Get the toolbox controller.
*
* @returns {object} The controller.
* @returns {ToolboxController} The controller.
*/
getToolboxController(): object;
getToolboxController(): ToolboxController;
/**
* Get the active layer group.
* The layer is available after the first loaded item.
Expand All @@ -123,17 +123,17 @@ export declare class App {
* The layer are available after the first loaded item.
*
* @param {number} index The data index.
* @returns {Array} The layers.
* @returns {ViewLayer[]} The layers.
*/
getViewLayersByDataIndex(index: number): any[];
getViewLayersByDataIndex(index: number): ViewLayer[];
/**
* Get the draw layers associated to a data index.
* The layer are available after the first loaded item.
*
* @param {number} index The data index.
* @returns {Array} The layers.
* @returns {DrawLayer[]} The layers.
*/
getDrawLayersByDataIndex(index: number): any[];
getDrawLayersByDataIndex(index: number): DrawLayer[];
/**
* Get a layer group by div id.
* The layer is available after the first loaded item.
Expand Down Expand Up @@ -466,11 +466,11 @@ export declare class AppOptions {
/**
* Tool name indexed object containing individual tool configurations.
*
* @type {Object<string, ToolConfig>}
* @type {Object<string, ToolConfig>|undefined}
*/
tools: {
[x: string]: ToolConfig;
};
} | undefined;
/**
* Optional array of layerGroup binder names.
*
Expand Down Expand Up @@ -511,6 +511,12 @@ export declare function buildMultipart(parts: any[], boundary: string): Uint8Arr
* to associate with intensity values.
*/
export declare class ColourMap {
/**
* @param {number[]} red Red component.
* @param {number[]} green Green component.
* @param {number[]} blue Blue component.
*/
constructor(red: number[], green: number[], blue: number[]);
/**
* Red component: 256 values in the [0, 255] range.
*
Expand Down Expand Up @@ -858,9 +864,9 @@ export declare class DrawLayer {
* Set the layer scale.
*
* @param {object} newScale The scale as {x,y}.
* @param {Point3D} center The scale center.
* @param {Point3D} [center] The scale center.
*/
setScale(newScale: object, center: Point3D): void;
setScale(newScale: object, center?: Point3D): void;
/**
* Set the layer offset.
*
Expand Down Expand Up @@ -921,7 +927,7 @@ export declare class DrawLayer {
* @param {string} id The id of the group.
* @returns {boolean} False if the group cannot be found.
*/
toogleGroupVisibility(id: string): boolean;
toggleGroupVisibility(id: string): boolean;
/**
* Delete a Draw from the stage.
*
Expand Down Expand Up @@ -2666,6 +2672,67 @@ export declare class TagValueExtractor {
}): number | undefined;
}

/**
* Toolbox controller.
*/
export declare class ToolboxController {
/**
* @param {object} toolList The list of tool objects.
*/
constructor(toolList: object);
/**
* Initialise.
*/
init(): void;
/**
* Get the tool list.
*
* @returns {Array} The list of tool objects.
*/
getToolList(): any[];
/**
* Check if a tool is in the tool list.
*
* @param {string} name The name to check.
* @returns {boolean} The tool list element for the given name.
*/
hasTool(name: string): boolean;
/**
* Get the selected tool.
*
* @returns {object} The selected tool.
*/
getSelectedTool(): object;
/**
* Get the selected tool event handler.
*
* @param {string} eventType The event type, for example
* mousedown, touchstart...
* @returns {Function} The event handler.
*/
getSelectedToolEventHandler(eventType: string): Function;
/**
* Set the selected tool.
*
* @param {string} name The name of the tool.
*/
setSelectedTool(name: string): void;
/**
* Set the selected tool live features.
*
* @param {object} list The list of features.
*/
setToolFeatures(list: object): void;
/**
* Listen to layer interaction events.
*
* @param {object} layer The layer to listen to.
* @param {string} layerGroupDivId The associated layer group div id.
*/
bindLayer(layer: object, layerGroupDivId: string): void;
#private;
}

/**
* Tool configuration.
*/
Expand Down Expand Up @@ -3552,9 +3619,9 @@ export declare class ViewLayer {
* Set the layer scale.
*
* @param {object} newScale The scale as {x,y}.
* @param {Point3D} center The scale center.
* @param {Point3D} [center] The scale center.
*/
setScale(newScale: object, center: Point3D): void;
setScale(newScale: object, center?: Point3D): void;
/**
* Set the base layer offset. Updates the layer offset.
*
Expand Down Expand Up @@ -3817,18 +3884,22 @@ export declare class WindowLut {
* Writer rule.
*/
export declare class WriterRule {
/**
* @param {string} action The rule action.
*/
constructor(action: string);
/**
* Rule action: `copy`, `remove`, `clear` or `replace`.
*
* @type {string}
*/
action: string;
/**
* Value to use for replace action.
* Optional value to use for replace action.
*
* @type {any}
* @type {any|undefined}
*/
value: any;
value: any | undefined;
}

export { }
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.32.2-beta.1",
"version": "0.32.2",
"description": "DICOM Web Viewer.",
"keywords": [
"DICOM",
Expand Down
31 changes: 23 additions & 8 deletions resources/api/dwv.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class App {
getDataViewConfigs(): {
[x: string]: ViewConfig[];
};
getDrawLayersByDataIndex(index: number): any[];
getDrawLayersByDataIndex(index: number): DrawLayer[];
getImage(index: number): Image_2;
getJsonState(): string;
getLastImage(): Image_2;
Expand All @@ -36,8 +36,8 @@ export class App {
getOffset(): object;
getStackSize(): number;
getStyle(): object;
getToolboxController(): object;
getViewLayersByDataIndex(index: number): any[];
getToolboxController(): ToolboxController;
getViewLayersByDataIndex(index: number): ViewLayer[];
init(opt: AppOptions): void;
initWLDisplay(): void;
loadFiles: (files: File[]) => void;
Expand Down Expand Up @@ -82,7 +82,7 @@ export class AppOptions {
defaultCharacterSet: string | undefined;
tools: {
[x: string]: ToolConfig;
};
} | undefined;
viewOnFirstLoadItem: boolean | undefined;
}

Expand All @@ -91,6 +91,7 @@ export function buildMultipart(parts: any[], boundary: string): Uint8Array;

// @public
export class ColourMap {
constructor(red: number[], green: number[], blue: number[]);
blue: number[];
green: number[];
red: number[];
Expand Down Expand Up @@ -194,8 +195,8 @@ export class DrawLayer {
setOffset(newOffset: object): void;
setOpacity(alpha: number): void;
setPlaneHelper(helper: object): void;
setScale(newScale: object, center: Point3D): void;
toogleGroupVisibility(id: string): boolean;
setScale(newScale: object, center?: Point3D): void;
toggleGroupVisibility(id: string): boolean;
unbindInteraction(): void;
}

Expand Down Expand Up @@ -539,6 +540,19 @@ export class TagValueExtractor {
}): number | undefined;
}

// @public
export class ToolboxController {
constructor(toolList: object);
bindLayer(layer: object, layerGroupDivId: string): void;
getSelectedTool(): object;
getSelectedToolEventHandler(eventType: string): Function;
getToolList(): any[];
hasTool(name: string): boolean;
init(): void;
setSelectedTool(name: string): void;
setToolFeatures(list: object): void;
}

// @public
export class ToolConfig {
constructor(options?: string[]);
Expand Down Expand Up @@ -700,7 +714,7 @@ export class ViewLayer {
setCurrentPosition(position: Point, _index: Index): boolean;
setOffset(newOffset: object): void;
setOpacity(alpha: number): void;
setScale(newScale: object, center: Point3D): void;
setScale(newScale: object, center?: Point3D): void;
setView(view: object, index: number): void;
unbindInteraction(): void;
}
Expand Down Expand Up @@ -732,8 +746,9 @@ export class WindowLut {

// @public
export class WriterRule {
constructor(action: string);
action: string;
value: any;
value: any | undefined;
}

// (No @packageDocumentation comment for this package)
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.32.2-beta.1.</i>",
"footer": "<i>Documentation generated for dwv v0.32.2.</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.32.2-beta.1/dwv-0.32.2-beta.1.min.js",
"js_external": "https://github.com/ivmartel/dwv/releases/download/v0.32.2/dwv-0.32.2.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 @@ -31,7 +31,7 @@ import {DataElement} from '../dicom/dataElement';
* @returns {string} The version of the library.
*/
export function getDwvVersion() {
return '0.32.2-beta.1';
return '0.32.2';
}

/**
Expand Down

0 comments on commit f7522e9

Please sign in to comment.