Skip to content
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(export): wrong export for the tmtv RT function #3715

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 33 additions & 28 deletions extensions/default/src/Panels/createReportDialogPrompt.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable react/display-name */
import React from 'react';

import { ButtonEnums, Dialog, Input, Select } from '@ohif/ui';

export const CREATE_REPORT_DIALOG_RESPONSE = {
CANCEL: 0,
CREATE_REPORT: 1,
};

export default function createReportDialogPrompt(uiDialogService, { extensionManager }) {
export default function CreateReportDialogPrompt(uiDialogService, { extensionManager }) {
return new Promise(function (resolve, reject) {
let dialogId = undefined;

Expand Down Expand Up @@ -97,33 +97,38 @@ export default function createReportDialogPrompt(uiDialogService, { extensionMan
};
return (
<>
{dataSourcesOpts.length > 1 && (
<Select
closeMenuOnSelect={true}
className="border-primary-main mr-2 bg-black"
options={dataSourcesOpts}
placeholder={
dataSourcesOpts.find(option => option.value === value.dataSourceName)
.placeHolder
}
value={value.dataSourceName}
onChange={evt => {
setValue(v => ({ ...v, dataSourceName: evt.value }));
}}
isClearable={false}
/>
{dataSourcesOpts.length > 1 && window.config.allowMultipleExport && (
<div>
sedghi marked this conversation as resolved.
Show resolved Hide resolved
<label className="text-[14px] leading-[1.2] text-white">Data Source</label>
<Select
closeMenuOnSelect={true}
className="border-primary-main mt-2 bg-black"
options={dataSourcesOpts}
placeholder={
dataSourcesOpts.find(option => option.value === value.dataSourceName)
.placeHolder
}
value={value.dataSourceName}
onChange={evt => {
setValue(v => ({ ...v, dataSourceName: evt.value }));
}}
isClearable={false}
/>
</div>
)}
<Input
autoFocus
label="Enter the report name"
labelClassName="text-white text-[14px] leading-[1.2]"
className="border-primary-main bg-black"
type="text"
value={value.label}
onChange={onChangeHandler}
onKeyPress={onKeyPressHandler}
required
/>
<div className="mt-3">
<Input
autoFocus
label="Enter the report name"
labelClassName="text-white text-[14px] leading-[1.2]"
className="border-primary-main bg-black"
type="text"
value={value.label}
onChange={onChangeHandler}
onKeyPress={onKeyPressHandler}
required
/>
</div>
</>
);
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import dcmjs from 'dcmjs';
import { classes, DicomMetadataStore } from '@ohif/core';
import { adaptersSEG } from '@cornerstonejs/adapters';
import { adaptersRT } from '@cornerstonejs/adapters';

const { datasetToBlob } = dcmjs.data;
const metadataProvider = classes.MetadataProvider;

export default function dicomRTAnnotationExport(annotations) {
const dataset = adaptersSEG.Cornerstone3D.RTStruct.RTSS.generateRTSSFromAnnotations(
const dataset = adaptersRT.Cornerstone3D.RTSS.generateRTSSFromAnnotations(
annotations,
metadataProvider,
DicomMetadataStore
Expand Down
2 changes: 1 addition & 1 deletion platform/core/src/utils/downloadCSVReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function _getCommonRowItems(measurement, seriesMetadata) {

return {
'Patient ID': firstInstance.PatientID, // Patient ID
'Patient Name': firstInstance.PatientName.Alphabetic, // PatientName
'Patient Name': firstInstance.PatientName?.Alphabetic || '', // Patient Name
StudyInstanceUID: measurement.referenceStudyUID, // StudyInstanceUID
SeriesInstanceUID: measurement.referenceSeriesUID, // SeriesInstanceUID
SOPInstanceUID: measurement.SOPInstanceUID, // SOPInstanceUID
Expand Down
1 change: 1 addition & 0 deletions platform/docs/docs/configuration/configurationFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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.
- `allowMultipleExport`: (default to false), if set to true, the user will be able to select the datasource to export the report to.
sedghi marked this conversation as resolved.
Show resolved Hide resolved
- `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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ const HoveringIcons = ({
return (
<div className="flex items-center">
{!disableEditing && createIcon('row-edit', onEdit)}
{createIcon(
isLocked ? 'row-lock' : 'row-unlock',
onToggleLocked,
isLocked ? 'text-[#3d5871]' : null
)}
{!disableEditing &&
createIcon(
isLocked ? 'row-lock' : 'row-unlock',
onToggleLocked,
isLocked ? 'text-[#3d5871]' : null
)}
{createIcon(
isVisible ? 'row-shown' : 'row-hidden',
onToggleVisibility,
Expand Down
Loading