Skip to content

Commit

Permalink
apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sedghi committed Nov 7, 2023
1 parent 90143f4 commit 2b44f9f
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion extensions/cornerstone-dicom-sr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@ohif/extension-cornerstone": "3.8.0-beta.9",
"@ohif/extension-measurement-tracking": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion extensions/cornerstone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@cornerstonejs/dicom-image-loader": "^1.20.3",
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
6 changes: 3 additions & 3 deletions extensions/cornerstone/src/commandsModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,16 +584,16 @@ function commandsModule({
attachProtocolViewportDataListener: ({ protocol, stageIndex }) => {
const EVENT = cornerstoneViewportService.EVENTS.VIEWPORT_DATA_CHANGED;
const command = protocol.callbacks.onViewportDataInitialized;
const numPanes = protocol.stages?.[stageIndex]?.viewports.length;
const numPanes = protocol.stages?.[stageIndex]?.viewports.length ?? 1;
let numPanesWithData = 0;
cornerstoneViewportService.subscribe(EVENT, evt => {
const { unsubscribe } = cornerstoneViewportService.subscribe(EVENT, evt => {
numPanesWithData++;

if (numPanesWithData === numPanes) {
commandsManager.run(...command);

// Unsubscribe from the event
cornerstoneViewportService.unsubscribe(EVENT);
unsubscribe(EVENT);
}
});
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/i18n": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicomweb-client": "^0.10.2",
"prop-types": "^15.6.2",
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion extensions/dicom-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion extensions/dicom-video/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion extensions/measurement-tracking/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"classnames": "^2.3.2",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"lodash.debounce": "^4.17.21",
"prop-types": "^15.6.2",
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion extensions/tmtv/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"peerDependencies": {
"@ohif/core": "3.8.0-beta.9",
"@ohif/ui": "3.8.0-beta.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
2 changes: 1 addition & 1 deletion platform/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"classnames": "^2.3.2",
"core-js": "^3.16.1",
"cornerstone-math": "^0.1.9",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"detect-gpu": "^4.0.16",
"dicom-parser": "^1.8.9",
"dotenv-webpack": "^1.7.0",
Expand Down
2 changes: 1 addition & 1 deletion platform/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"dcmjs": "^0.29.11",
"dcmjs": "^0.29.12",
"dicomweb-client": "^0.10.2",
"gl-matrix": "^3.4.3",
"isomorphic-base64": "^1.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ export default class HangingProtocolService extends PubSubService {
throw new Error(error);
}

this._commandsManager.run(this.protocol.callbacks?.onProtocolEnter);
this._commandsManager.run(this.protocol?.callbacks?.onProtocolEnter);
}

protected matchActivation(
Expand Down Expand Up @@ -1128,7 +1128,7 @@ export default class HangingProtocolService extends PubSubService {

const { columns: numCols, rows: numRows, layoutOptions = [] } = layoutProps;

if (this.protocol.callbacks?.onViewportDataInitialized) {
if (this.protocol?.callbacks?.onViewportDataInitialized) {
this._commandsManager.runCommand('attachProtocolViewportDataListener', {
protocol: this.protocol,
stageIndex: this.stageIndex,
Expand Down
2 changes: 1 addition & 1 deletion platform/core/src/types/HangingProtocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export type ProtocolNotifications = {
onLayoutChange?: Command[];
// This set of commands is executed after the initial viewport grid data is set
// and all viewport data includes a designated display set. This command
// will run on every stages initial layout.
// will run on every stage's initial layout.
onViewportDataInitialized?: Command[];
};

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8458,10 +8458,10 @@ dcmjs@^0.27:
loglevelnext "^3.0.1"
ndarray "^1.0.19"

dcmjs@^0.29.11:
version "0.29.11"
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.29.11.tgz#82e19d7c5212218c3225f8022ce97b0102ed3cc8"
integrity sha512-B5fO5D+USzfnuUG7ephnaKMluqBOP4qcckV2LgROXvn0hmWc53Gs2YzlokjcYcDeBAXNfssOOhDekUc+AduwkQ==
dcmjs@^0.29.12:
version "0.29.12"
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.29.12.tgz#94f484f6ee4901e44d17113f005a917500544cd3"
integrity sha512-LQBxinj4CZQU2J61hf0/QXHe/OA+EM0ie+JbZ4eMaQAYfMOaDDkYG25zP3bNNDBFlY5ytgwsfWLvmvanQ9ixYg==
dependencies:
"@babel/runtime-corejs3" "^7.22.5"
adm-zip "^0.5.10"
Expand Down

0 comments on commit 2b44f9f

Please sign in to comment.