feat(HangingProtocol): add protocol generator back (#3128)

This commit is contained in:
Matthis Duclos authored and GitHub committed 2023-01-25 10:11:08 -05:00
1 parent f7c886878d
commit 514ea3ccea
5 files changed
+139 -37

No files matched your search

@@ -78,7 +78,20 @@ do not overlap, with the suggested id being `${moduleId}.${simpleName}`. The
'default' name is used as the hanging protocol id when no other protocol applies,
and can be set as the last module listed containing 'default'.
See the typescript definitions for more details on the structure.
A hanging protocol can also be defined with a generator.
A generator is a function we can write this way:
```ts
function protocolGenerator({ servicesManager, commandsManager }) {
// Some computations using services and commands ...
return {
protocol: generatedProtocol
}
}
```
See the typescript definitions for more details on the structure of protocols.
## Custom Attribute
In some situations, you might want to match based on a custom attribute and not the DICOM tags. For instance,