Fix contour annotations RTSS saving (#5545)
* [WIP] Fix contour annotations RTSS saving * fix: Export image sop image reference provider * Fixes for download with filename * Updates to fix metadata issues with CS3D * Updates to save menu * Fixing some additional re-save metadata * Add support for saving with predecessor image sequence * PR comment fixes * fix: Load RTSS after save * fix segmentation save * fix load of mixed seg/rt studies * Use frame module to get information on the frame shown * Fix study browser to use instances.length when numImageFrames not present * fix: Load of display set split from multiple non-FOR referenes * Fix RT and SEG applying to wrong series because of using referenced series sequence without checkout sop instances * Fix save seg * Update to released CS3D versions * test: Add revokeObjectURL to test download blob * Add hard dependency on mode-basic to fix build order issues * fix: build * Try to fix build segmentation * PR comments * PR comment update
This commit is contained in:
1 parent
9c5043ca2c
commit
57205703bb
68 files changed
+962
-648
No files matched your search
@@ -1,12 +1,39 @@
|
||||
import PROMPT_RESPONSES from '../utils/_shared/PROMPT_RESPONSES';
|
||||
|
||||
/**
|
||||
* Creates and shows a report dialog prompt.
|
||||
* The input for this is:
|
||||
* - `title` shown in the dialog
|
||||
* - `modality` being stored, used to query existing series
|
||||
* - `minSeriesNumber` is the start of new series of this modality type.
|
||||
* Will get set to 4000 if not determined by the modality
|
||||
* - predecessorImageId is the image id that this series was currently loaded
|
||||
* from. That allows defaulting the dialog to show the specified series instead
|
||||
* of always creating a new series.
|
||||
*
|
||||
* The response is:
|
||||
* - `value`, the default name of the object/series being created
|
||||
* - `dataSourceName`, where to store the object to
|
||||
* - `series`, is the series to store do, as referenced by a predecessorImageId value.
|
||||
* - `priorSeriesNumber` is the previously lowest series number at least minSeriesNumber
|
||||
* of all the seris of the given modality type.
|
||||
*
|
||||
* This should be provided to the DICOM encoder, which will get the predecessor
|
||||
* sequence from the metaData provider so that the saved series will replace
|
||||
* the existing instance in the same series.
|
||||
* This will be falsy for a new series.
|
||||
*/
|
||||
export default function CreateReportDialogPrompt({
|
||||
title = 'Create Report',
|
||||
modality = 'SR',
|
||||
minSeriesNumber = 0,
|
||||
predecessorImageId,
|
||||
extensionManager,
|
||||
servicesManager,
|
||||
}): Promise<{
|
||||
value: string;
|
||||
dataSourceName: string;
|
||||
priorSeriesNumber?: number;
|
||||
series: string;
|
||||
action: (typeof PROMPT_RESPONSES)[keyof typeof PROMPT_RESPONSES];
|
||||
}> {
|
||||
@@ -16,18 +43,33 @@ export default function CreateReportDialogPrompt({
|
||||
|
||||
const allowMultipleDataSources = window.config.allowMultiSelectExport;
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
minSeriesNumber ||=
|
||||
(modality === 'SR' && 3000) ||
|
||||
(modality === 'SEG' && 3100) ||
|
||||
(modality === 'RTSTRUCT' && 3200) ||
|
||||
4000;
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
uiDialogService.show({
|
||||
id: 'report-dialog',
|
||||
title,
|
||||
content: ReportDialog,
|
||||
contentProps: {
|
||||
dataSources: allowMultipleDataSources ? dataSources : undefined,
|
||||
onSave: async ({ reportName, dataSource: selectedDataSource, series }) => {
|
||||
predecessorImageId,
|
||||
minSeriesNumber,
|
||||
modality,
|
||||
onSave: async ({
|
||||
reportName,
|
||||
dataSource: selectedDataSource,
|
||||
series,
|
||||
priorSeriesNumber,
|
||||
}) => {
|
||||
resolve({
|
||||
value: reportName,
|
||||
dataSourceName: selectedDataSource,
|
||||
series,
|
||||
priorSeriesNumber,
|
||||
action: PROMPT_RESPONSES.CREATE_REPORT,
|
||||
});
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user