Skip to content

Commit

Permalink
reset GSPS fixed (#396)
Browse files Browse the repository at this point in the history
* reset GSPS fixed

* Update docs

* version

* Update docs

* docs

* Update docs

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 2369aa8 commit 5691db4
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

## Dicom Image Toolkit for CornerstoneJS

### Current version: 2.6.5
### Current version: 2.6.6

### Latest Published Release: 2.6.5
### Latest Published Release: 2.6.6

This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.

Expand Down
4 changes: 2 additions & 2 deletions dist/imaging/loaders/commonLoader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ export declare const getLarvitarManager: () => {
*/
export declare const getInstanceGSPSDict: () => {
[key: string]: {
seriesId: string;
imageId: string;
seriesId: string | null;
imageId: string | null;
}[] | null;
};
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/larvitar.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ <h3> </h3>
<h1 id="larvitar">Larvitar</h1>
<p><a href="https://github.com/dvisionlab/Larvitar"><img src="https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&amp;prefix=%E2%89%A5&amp;suffix=%25&amp;query=$.typeCoverage.atLeast&amp;uri=https%3A%2F%2Fraw.githubusercontent.com%2Fplantain-00%2Ftype-coverage%2Fmaster%2Fpackage.json" alt="type-coverage"></a></p>
<h2 id="dicom-image-toolkit-for-cornerstonejs">Dicom Image Toolkit for CornerstoneJS</h2>
<h3 id="current-version%3A-2.6.5">Current version: 2.6.5</h3>
<h3 id="latest-published-release%3A-2.6.5">Latest Published Release: 2.6.5</h3>
<h3 id="current-version%3A-2.6.6">Current version: 2.6.6</h3>
<h3 id="latest-published-release%3A-2.6.6">Latest Published Release: 2.6.6</h3>
<p>This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.</p>
<h2 id="features%3A">Features:</h2>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/larvitar.js

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions imaging/loaders/commonLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,20 @@ export const resetLarvitarManager = function () {
* @function resetInstanceGSPSDict
*/
export const resetInstanceGSPSDict = function () {
each(instanceGSPSDict, function (array) {
array = null;
});
if (instanceGSPSDict) {
Object.keys(instanceGSPSDict).forEach(key => {
const instances = instanceGSPSDict![key]; // Avoid null warning by asserting non-null
if (instances && Array.isArray(instances)) {
instances.forEach(instance => {
instance.seriesId = null;
instance.imageId = null;
});
}
instanceGSPSDict![key] = null; // Reset the entry to null
});

instanceGSPSDict = null;
instanceGSPSDict = null;
}
};

/**
Expand Down
2 changes: 1 addition & 1 deletion imaging/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export type LarvitarManager = {
} | null;

export type InstanceGSPSDict = {
[key: string]: { seriesId: string; imageId: string }[] | null;
[key: string]: { seriesId: string | null; imageId: string | null }[] | null;
} | null;

export type ImageFrame = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"medical",
"cornerstone"
],
"version": "2.6.5",
"version": "2.6.6",
"description": "typescript library for parsing, loading, rendering and interacting with DICOM images",
"repository": {
"url": "https://github.com/dvisionlab/Larvitar.git",
Expand Down

0 comments on commit 5691db4

Please sign in to comment.