-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d98a7a
commit 3c002ff
Showing
2 changed files
with
81 additions
and
11 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