fix(export): wrong export for the tmtv RT function (#3715)

This commit is contained in:
Alireza 2023-10-11 10:10:29 -04:00 committed by GitHub
parent 8067f0c62c
commit a3f2a1a7b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 36 deletions

View File

@ -1,5 +1,5 @@
/* eslint-disable react/display-name */
import React from 'react'; import React from 'react';
import { ButtonEnums, Dialog, Input, Select } from '@ohif/ui'; import { ButtonEnums, Dialog, Input, Select } from '@ohif/ui';
export const CREATE_REPORT_DIALOG_RESPONSE = { export const CREATE_REPORT_DIALOG_RESPONSE = {
@ -7,7 +7,7 @@ export const CREATE_REPORT_DIALOG_RESPONSE = {
CREATE_REPORT: 1, CREATE_REPORT: 1,
}; };
export default function createReportDialogPrompt(uiDialogService, { extensionManager }) { export default function CreateReportDialogPrompt(uiDialogService, { extensionManager }) {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
let dialogId = undefined; let dialogId = undefined;
@ -97,33 +97,38 @@ export default function createReportDialogPrompt(uiDialogService, { extensionMan
}; };
return ( return (
<> <>
{dataSourcesOpts.length > 1 && ( {dataSourcesOpts.length > 1 && window.config?.allowMultiSelectExport && (
<Select <div>
closeMenuOnSelect={true} <label className="text-[14px] leading-[1.2] text-white">Data Source</label>
className="border-primary-main mr-2 bg-black" <Select
options={dataSourcesOpts} closeMenuOnSelect={true}
placeholder={ className="border-primary-main mt-2 bg-black"
dataSourcesOpts.find(option => option.value === value.dataSourceName) options={dataSourcesOpts}
.placeHolder placeholder={
} dataSourcesOpts.find(option => option.value === value.dataSourceName)
value={value.dataSourceName} .placeHolder
onChange={evt => { }
setValue(v => ({ ...v, dataSourceName: evt.value })); value={value.dataSourceName}
}} onChange={evt => {
isClearable={false} setValue(v => ({ ...v, dataSourceName: evt.value }));
/> }}
isClearable={false}
/>
</div>
)} )}
<Input <div className="mt-3">
autoFocus <Input
label="Enter the report name" autoFocus
labelClassName="text-white text-[14px] leading-[1.2]" label="Enter the report name"
className="border-primary-main bg-black" labelClassName="text-white text-[14px] leading-[1.2]"
type="text" className="border-primary-main bg-black"
value={value.label} type="text"
onChange={onChangeHandler} value={value.label}
onKeyPress={onKeyPressHandler} onChange={onChangeHandler}
required onKeyPress={onKeyPressHandler}
/> required
/>
</div>
</> </>
); );
}, },

View File

@ -1,12 +1,12 @@
import dcmjs from 'dcmjs'; import dcmjs from 'dcmjs';
import { classes, DicomMetadataStore } from '@ohif/core'; import { classes, DicomMetadataStore } from '@ohif/core';
import { adaptersSEG } from '@cornerstonejs/adapters'; import { adaptersRT } from '@cornerstonejs/adapters';
const { datasetToBlob } = dcmjs.data; const { datasetToBlob } = dcmjs.data;
const metadataProvider = classes.MetadataProvider; const metadataProvider = classes.MetadataProvider;
export default function dicomRTAnnotationExport(annotations) { export default function dicomRTAnnotationExport(annotations) {
const dataset = adaptersSEG.Cornerstone3D.RTStruct.RTSS.generateRTSSFromAnnotations( const dataset = adaptersRT.Cornerstone3D.RTSS.generateRTSSFromAnnotations(
annotations, annotations,
metadataProvider, metadataProvider,
DicomMetadataStore DicomMetadataStore

View File

@ -86,7 +86,7 @@ function _getCommonRowItems(measurement, seriesMetadata) {
return { return {
'Patient ID': firstInstance.PatientID, // Patient ID 'Patient ID': firstInstance.PatientID, // Patient ID
'Patient Name': firstInstance.PatientName.Alphabetic, // PatientName 'Patient Name': firstInstance.PatientName?.Alphabetic || '', // Patient Name
StudyInstanceUID: measurement.referenceStudyUID, // StudyInstanceUID StudyInstanceUID: measurement.referenceStudyUID, // StudyInstanceUID
SeriesInstanceUID: measurement.referenceSeriesUID, // SeriesInstanceUID SeriesInstanceUID: measurement.referenceSeriesUID, // SeriesInstanceUID
SOPInstanceUID: measurement.SOPInstanceUID, // SOPInstanceUID SOPInstanceUID: measurement.SOPInstanceUID, // SOPInstanceUID

View File

@ -184,6 +184,7 @@ if auth headers are used, a preflight request is required.
- `useSharedArrayBuffer` (default to 'TRUE', options: 'AUTO', 'FALSE', 'TRUE', note that these are strings), for volume loading we use sharedArrayBuffer to be able to - `useSharedArrayBuffer` (default to 'TRUE', options: 'AUTO', 'FALSE', 'TRUE', note that these are strings), for volume loading we use sharedArrayBuffer to be able to
load the volume progressively as the data arrives (each webworker has the shared buffer and can write to it). However, there might be certain environments that do not support sharedArrayBuffer. In that case, you can set this flag to false and the viewer will use the regular arrayBuffer which might be slower for large volume loading. load the volume progressively as the data arrives (each webworker has the shared buffer and can write to it). However, there might be certain environments that do not support sharedArrayBuffer. In that case, you can set this flag to false and the viewer will use the regular arrayBuffer which might be slower for large volume loading.
- `supportsWildcard`: (default to false), if set to true, the datasource will support wildcard matching for patient name and patient id. - `supportsWildcard`: (default to false), if set to true, the datasource will support wildcard matching for patient name and patient id.
- `allowMultiSelectExport`: (default to false), if set to true, the user will be able to select the datasource to export the report to.
- `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/> - `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/> Points to consider while using `dangerouslyUseDynamicConfig`:<br/>
- User have to enable this feature by setting `dangerouslyUseDynamicConfig.enabled:true`. By default it is `false`. - User have to enable this feature by setting `dangerouslyUseDynamicConfig.enabled:true`. By default it is `false`.

View File

@ -175,11 +175,12 @@ const HoveringIcons = ({
return ( return (
<div className="flex items-center"> <div className="flex items-center">
{!disableEditing && createIcon('row-edit', onEdit)} {!disableEditing && createIcon('row-edit', onEdit)}
{createIcon( {!disableEditing &&
isLocked ? 'row-lock' : 'row-unlock', createIcon(
onToggleLocked, isLocked ? 'row-lock' : 'row-unlock',
isLocked ? 'text-[#3d5871]' : null onToggleLocked,
)} isLocked ? 'text-[#3d5871]' : null
)}
{createIcon( {createIcon(
isVisible ? 'row-shown' : 'row-hidden', isVisible ? 'row-shown' : 'row-hidden',
onToggleVisibility, onToggleVisibility,