fix: sr module and add URL docs (#3034)

* fix sr module and add docs

* bump version
This commit is contained in:
Alireza 2022-11-23 11:43:46 -05:00 committed by GitHub
parent 024aeae240
commit 32bb7e4c1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 134 additions and 8 deletions

View File

@ -45,7 +45,7 @@
"dependencies": {
"@babel/runtime": "7.16.3",
"classnames": "^2.2.6",
"@cornerstonejs/core": "^0.21.4",
"@cornerstonejs/tools": "^0.29.6"
"@cornerstonejs/core": "^0.21.5",
"@cornerstonejs/tools": "^0.29.8"
}
}

View File

@ -43,9 +43,9 @@
},
"dependencies": {
"@babel/runtime": "7.17.9",
"@cornerstonejs/core": "^0.21.4",
"@cornerstonejs/core": "^0.21.5",
"@cornerstonejs/streaming-image-volume-loader": "^0.6.5",
"@cornerstonejs/tools": "^0.29.6",
"@cornerstonejs/tools": "^0.29.8",
"@kitware/vtk.js": "25.9.0",
"html2canvas": "^1.4.1",
"lodash.debounce": "4.0.8",

View File

@ -79,7 +79,7 @@ class CornerstoneViewportService implements IViewportService {
) {
const viewportInfo = new ViewportInfo(
viewportIndex,
viewportOptions.viewportId
this.getViewportId(viewportIndex)
);
viewportInfo.setElement(elementRef);
this.viewportsInfo.set(viewportIndex, viewportInfo);
@ -95,6 +95,10 @@ class CornerstoneViewportService implements IViewportService {
return viewportIds;
}
public getViewportId(viewportIndex: number): string {
return `viewport-${viewportIndex}`;
}
/**
* It retrieves the renderingEngine if it does exist, or creates one otherwise
* @returns {RenderingEngine} rendering engine
@ -173,6 +177,11 @@ class CornerstoneViewportService implements IViewportService {
): void {
const renderingEngine = this.getRenderingEngine();
const viewportInfo = this.viewportsInfo.get(viewportIndex);
if (!publicViewportOptions.viewportId) {
publicViewportOptions.viewportId = this.getViewportId(viewportIndex);
}
let viewportId = viewportInfo.getViewportId();
// if currently there is a viewport with the viewportId, but it is not the same

View File

@ -32,8 +32,8 @@
"peerDependencies": {
"@ohif/core": "^3.0.0",
"classnames": "^2.2.6",
"@cornerstonejs/core": "^0.21.4",
"@cornerstonejs/tools": "^0.29.6",
"@cornerstonejs/core": "^0.21.5",
"@cornerstonejs/tools": "^0.29.8",
"@ohif/extension-cornerstone-dicom-sr": "^3.0.0",
"dcmjs": "^0.28.3",
"prop-types": "^15.6.2",

View File

@ -5,5 +5,122 @@ sidebar_label: URL
# URL
You can modify the URL at any state of the app to get the desired result. Here
are different part of the APP that you can modify:
URL
## WorkList
The WorkList can be modified by adding the following query parameters:
### PatientName
The patient name can be modified by adding the `PatientName` query parameter.
```js
/?patientName=myQuery
```
### MRN
The MRN can be modified by adding the `MRN` query parameter.
```js
/?mrn=myQuery
```
### Description
The description can be modified by adding the `Description` query parameter.
```js
/?description=myQuery
```
### Modality
The modality can be modified by adding the `modalities` query parameter.
```js
/?modalities=MG
```
### Accession Number
The accession number can be modified by adding the `accession` query parameter.
```js
/?accession=myQuery
```
### DataSources
If you happen to have multiple data sources configured, you can filter the
WorkList by adding the `dataSources` query parameter.
```js
/?dataSourcename=orthanc
```
:::tip
You can add `sortBy` and `sortDirection` query parameters to sort the WorkList
```js
/?patientName=myquery&sortBy=studyDate&sortDirection=ascending
```
:::
## Viewer
The Viewer can be modified by adding the following query parameters:
### Mode
As you have seen before, the Viewer can be configured to be in different modes.
Each mode registers their `id` in the URL.
For instance
```js
/viewer?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.7009.2403.871108593056125491804754960339
```
will open the viewer in the basic (longitudinal) mode with the StudyInstanceUID
1.3.6.1.4.1.14519.5.2.1.7009.2403.871108593056125491804754960339.
And if configured, the same study can be opened in the `tmtv` mode
```js
/tmtv?StudyInstanceUIDs=1.3.6.1.4.1.14519.5.2.1.7009.2403.871108593056125491804754960339
```
### StudyInstanceUIDs
You can open more than one study in the Viewer by adding the `StudyInstanceUIDs`
```js
/viewer?StudyInstanceUIDs=1.3.6.1.4.1.25403.345050719074.3824.20170125095722.1&StudyInstanceUIDs=1.3.6.1.4.1.25403.345050719074.3824.20170125095258.1
```
:::tip
You can ues this feature to open a current and prior study in the Viewer.
Read more in the [Hanging Protocol Module](../platform/extensions/modules/hpModule.md#matching-on-prior-study-with-uid) section
:::
### SeriesInstanceUIDs
Sometimes you need to only open a specific series in a study, you can do that by
```js
/viewer?StudyInstanceUIDs=1.3.6.1.4.1.25403.345050719074.3824.20170125095722.1&SeriesInstanceUID=1.3.6.1.4.1.25403.345050719074.3824.20170125095748.1
```
This will only open the viewer with one series (one displaySet).