-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add a new hanging protocol @ohif/mn (#3305)
* feat: Add a new hanging protocol @ohif/mn * Add @ohif/seg example * PR comments and a couple more fixes to make things cleaner * PR comment * Added an example to cause the PR checks to rerun
- Loading branch information
1 parent
6cf271d
commit c508a2b
Showing
17 changed files
with
184 additions
and
358 deletions.
There are no files selected for viewing
78 changes: 78 additions & 0 deletions
78
extensions/cornerstone-dicom-seg/src/getHangingProtocolModule.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { Types } from '@ohif/core'; | ||
|
||
const segProtocol: Types.HangingProtocol.Protocol = { | ||
id: '@ohif/seg', | ||
// Don't store this hanging protocol as it applies to the currently active | ||
// display set by default | ||
// cacheId: null, | ||
hasUpdatedPriorsInformation: false, | ||
name: 'Segmentations', | ||
// Just apply this one when specifically listed | ||
protocolMatchingRules: [], | ||
toolGroupIds: ['default'], | ||
// -1 would be used to indicate active only, whereas other values are | ||
// the number of required priors referenced - so 0 means active with | ||
// 0 or more priors. | ||
numberOfPriorsReferenced: 0, | ||
// Default viewport is used to define the viewport when | ||
// additional viewports are added using the layout tool | ||
defaultViewport: { | ||
viewportOptions: { | ||
viewportType: 'stack', | ||
toolGroupId: 'default', | ||
allowUnmatchedView: true, | ||
}, | ||
displaySets: [ | ||
{ | ||
id: 'segDisplaySetId', | ||
matchedDisplaySetsIndex: -1, | ||
}, | ||
], | ||
}, | ||
displaySetSelectors: { | ||
segDisplaySetId: { | ||
seriesMatchingRules: [ | ||
{ | ||
attribute: 'Modality', | ||
constraint: { | ||
equals: 'SEG', | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
stages: [ | ||
{ | ||
name: 'Segmentations', | ||
viewportStructure: { | ||
layoutType: 'grid', | ||
properties: { | ||
rows: 1, | ||
columns: 1, | ||
}, | ||
}, | ||
viewports: [ | ||
{ | ||
viewportOptions: { allowUnmatchedView: true }, | ||
displaySets: [ | ||
{ | ||
id: 'segDisplaySetId', | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
}; | ||
|
||
function getHangingProtocolModule() { | ||
return [ | ||
{ | ||
name: segProtocol.id, | ||
protocol: segProtocol, | ||
}, | ||
]; | ||
} | ||
|
||
export default getHangingProtocolModule; | ||
export { segProtocol }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.