-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(state synchronization): SEG and RT viewports should keep their before hydration voi #3560
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c107a3a
docs - NCI funding and data sources
sedghi 287e3cc
Merge branch 'master' of github.com:OHIF/Viewers into fix/temp-temp-temp
sedghi 133bb8b
presentation update
sedghi 7862502
Merge branch 'master' of github.com:OHIF/Viewers into fix/temp-temp-temp
sedghi 2360db5
apply review comments
sedghi 16f1ca4
apply review comments
sedghi 3960b76
Merge branch 'master' of github.com:OHIF/Viewers into fix/temp-temp-temp
sedghi 06a2647
apply review comments
sedghi 2751b6a
add review comments
sedghi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ function commandsModule({ | |
toolGroupService, | ||
cineService, | ||
toolbarService, | ||
stateSyncService, | ||
uiDialogService, | ||
cornerstoneViewportService, | ||
uiNotificationService, | ||
|
@@ -616,6 +617,35 @@ function commandsModule({ | |
); | ||
toolGroup.setToolEnabled(ReferenceLinesTool.toolName); | ||
}, | ||
storePresentation: ({ viewportIndex }) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is much cleaner to have in the commandsModule to allow re-use. |
||
const presentation = cornerstoneViewportService.getPresentation( | ||
viewportIndex | ||
); | ||
if (!presentation || !presentation.presentationIds) { | ||
return; | ||
} | ||
const { | ||
lutPresentationStore, | ||
positionPresentationStore, | ||
} = stateSyncService.getState(); | ||
const { presentationIds } = presentation; | ||
const { lutPresentationId, positionPresentationId } = | ||
presentationIds || {}; | ||
const storeState = {}; | ||
if (lutPresentationId) { | ||
storeState.lutPresentationStore = { | ||
...lutPresentationStore, | ||
[lutPresentationId]: presentation, | ||
}; | ||
} | ||
if (positionPresentationId) { | ||
storeState.positionPresentationStore = { | ||
...positionPresentationStore, | ||
[positionPresentationId]: presentation, | ||
}; | ||
} | ||
stateSyncService.store(storeState); | ||
}, | ||
}; | ||
|
||
const definitions = { | ||
|
@@ -740,6 +770,11 @@ function commandsModule({ | |
toggleReferenceLines: { | ||
commandFn: actions.toggleReferenceLines, | ||
}, | ||
storePresentation: { | ||
commandFn: actions.storePresentation, | ||
storeContexts: [], | ||
options: {}, | ||
}, | ||
}; | ||
|
||
return { | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,10 +10,11 @@ After following the steps outlined in | |
OHIF Viewer has data for several studies and their images. You didn't add this | ||
data, so where is it coming from? | ||
|
||
By default, the viewer is configured to connect to a remote server hosted by the | ||
nice folks over at [dcmjs.org][dcmjs-org]. While convenient for getting started, | ||
the time may come when you want to develop using your own data either locally or | ||
remotely. | ||
By default, the viewer is configured to connect to a Amazon S3 bucket that is hosting | ||
a Static WADO server (see [Static WADO DICOMWeb](https://github.com/RadicalImaging/static-dicomweb)). | ||
By default we use `default.js` for the configuration file. You can change this by setting the `APP_CONFIG` environment variable | ||
and select other options such as `config/local_orthanc.js` or `config/google.js`. | ||
|
||
|
||
## Configuration Files | ||
|
||
|
@@ -172,6 +173,7 @@ if auth headers are used, a preflight request is required. | |
} | ||
``` | ||
- `showLoadingIndicator`: (default to true), if set to false, the loading indicator will not be shown when navigating between studies. | ||
- `supportsWildcard`: (default to false), if set to true, the datasource will support wildcard matching for patient name and patient id. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it make sense to further specify that this is for study level (QIDO) search? |
||
- `dangerouslyUseDynamicConfig`: Dynamic config allows user to pass `configUrl` query string. This allows to load config without recompiling application. If the `configUrl` query string is passed, the worklist and modes will load from the referenced json rather than the default .env config. If there is no `configUrl` path provided, the default behaviour is used and there should not be any deviation from current user experience.<br/> | ||
Points to consider while using `dangerouslyUseDynamicConfig`:<br/> | ||
- User have to enable this feature by setting `dangerouslyUseDynamicConfig.enabled:true`. By default it is `false`. | ||
|
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use viewportId throughout - we are trying to remove references to viewportIndex generally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is another big PR that I will care later