Skip to content

Commit

Permalink
Merge branch 'master' into find-refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
amazy committed Oct 1, 2024
2 parents f64c1f8 + 4db7b01 commit 0000bef
Show file tree
Hide file tree
Showing 13 changed files with 593 additions and 503 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
- name: show gitref / tags
run: echo ${{ github.ref }} ${{needs.pre-build.outputs.current_branch_tag}} ${{needs.pre-build.outputs.is_tag}}

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4.1.7
id: download
with:
name: web-app-dist
Expand Down Expand Up @@ -206,13 +206,13 @@ jobs:

steps:
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ matrix.config.artifact }}
path: ./

- name: Download URL
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: upload_url
path: ./
Expand Down
660 changes: 370 additions & 290 deletions WebApplication/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion WebApplication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"vite": "^5.1.7"
"vite": "^5.4.8"
}
}
2 changes: 0 additions & 2 deletions WebApplication/src/components/BulkLabelsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export default {
this.$emit("bulkModalClosed");
});
},
watch: {
},
methods: {
async showModal() {
var myModal = new bootstrap.Modal(this.$el, {});
Expand Down
54 changes: 28 additions & 26 deletions WebApplication/src/components/InstanceDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,32 +49,34 @@ export default {

<template>
<table v-if="loaded" class="table table-responsive table-sm instance-details-table">
<tr>
<td width="80%" class="cut-text">
<TagsTree
:tags="headers">
</TagsTree>
</td>
<td width="20%" class="instance-button-group">
<ResourceButtonGroup
:resourceOrthancId="this.instanceId"
:resourceLevel="'instance'"
:studyMainDicomTags="this.studyMainDicomTags"
:seriesMainDicomTags="this.seriesMainDicomTags"
:patientMainDicomTags="this.patientMainDicomTags"
:instanceTags="this.tags"
:instanceHeaders="this.headers"
@deletedResource="onDeletedInstance"
></ResourceButtonGroup>
</td>
</tr>
<tr>
<td width="80%" class="cut-text">
<TagsTree
:tags="tags">
</TagsTree>
</td>
</tr>
<tbody>
<tr>
<td width="80%" class="cut-text">
<TagsTree
:tags="headers">
</TagsTree>
</td>
<td width="20%" class="instance-button-group">
<ResourceButtonGroup
:resourceOrthancId="this.instanceId"
:resourceLevel="'instance'"
:studyMainDicomTags="this.studyMainDicomTags"
:seriesMainDicomTags="this.seriesMainDicomTags"
:patientMainDicomTags="this.patientMainDicomTags"
:instanceTags="this.tags"
:instanceHeaders="this.headers"
@deletedResource="onDeletedInstance"
></ResourceButtonGroup>
</td>
</tr>
<tr>
<td width="80%" class="cut-text">
<TagsTree
:tags="tags">
</TagsTree>
</td>
</tr>
</tbody>
</table>
</template>

Expand Down
16 changes: 9 additions & 7 deletions WebApplication/src/components/InstanceList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ export default {
<template>
<table class="table table-responsive table-sm instance-table">
<thead>
<th width="2%" scope="col" class="instance-table-header"></th>
<th width="7%" scope="col" class="instance-table-header cut-text" data-bs-toggle="tooltip"
:title="$t('dicom_tags.InstanceNumber')">{{ $t('dicom_tags.InstanceNumber') }}</th>
<th width="40%" scope="col" class="instance-table-header cut-text" data-bs-toggle="tooltip"
title="SOP Instance UID">SOP Instance UID</th>
<th width="5%" scope="col" class="series-table-header cut-text text-center" data-bs-toggle="tooltip"
:title="$t('dicom_tags.NumberOfFrames')"># {{$t('frames')}}</th>
<tr>
<th width="2%" scope="col" class="instance-table-header"></th>
<th width="7%" scope="col" class="instance-table-header cut-text" data-bs-toggle="tooltip"
:title="$t('dicom_tags.InstanceNumber')">{{ $t('dicom_tags.InstanceNumber') }}</th>
<th width="40%" scope="col" class="instance-table-header cut-text" data-bs-toggle="tooltip"
title="SOP Instance UID">SOP Instance UID</th>
<th width="5%" scope="col" class="series-table-header cut-text text-center" data-bs-toggle="tooltip"
:title="$t('dicom_tags.NumberOfFrames')"># {{$t('frames')}}</th>
</tr>
</thead>
<InstanceItem v-for="instanceId in sortedInstancesIds" :key="instanceId" :instanceId="instanceId"
:instanceInfo="instancesInfo[instanceId]" :studyMainDicomTags="this.studyMainDicomTags"
Expand Down
11 changes: 10 additions & 1 deletion WebApplication/src/components/ModifyModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export default {
}
this.tags = {};
this.dateTags = {};
this.originalTags = {};
this.removedTags = {};
this.insertedTags = new Set();
Expand Down Expand Up @@ -313,7 +314,7 @@ export default {
} else {
console.log("create-new-study-from-series: warning accepted, copying existing Patient tags");
this.tags['PatientName'] = targetPatient['MainDicomTags']['PatientName'];
this.tags['PatientBirthDate'] = this.tags['PatientBirthDate'] = targetPatient['MainDicomTags']['PatientBirthDate'];
this.tags['PatientBirthDate'] = targetPatient['MainDicomTags']['PatientBirthDate'];
this.dateTags['PatientBirthDate'] = dateHelpers.fromDicomDate(targetPatient['MainDicomTags']['PatientBirthDate']);
this.tags['PatientSex'] = targetPatient['MainDicomTags']['PatientSex'];
}
Expand Down Expand Up @@ -365,6 +366,7 @@ export default {
const uuid = uuidv4();
this.tags = {};
this.dateTags = {};
this.tags['PatientID'] = uuid;
this.tags['PatientName'] = 'Anonymized ' + uuid.substr(0, 8);
this.tags['PatientBirthDate'] = '';
Expand All @@ -375,19 +377,24 @@ export default {
}
} else if (action == 'attach-study-to-existing-patient') {
this.tags = {};
this.dateTags = {};
this.tags['PatientID'] = this.patientMainDicomTags['PatientID'];
} else if (action == 'modify-any-tags-in-one-study') {
this.tags = {};
this.dateTags = {};
this.setTagsFromDicomTags(this.patientMainDicomTags);
this.setTagsFromDicomTags(this.studyMainDicomTags);
} else if (action == 'modify-patient-tags-in-all-studies') {
this.tags = {};
this.dateTags = {};
this.setTagsFromDicomTags(this.patientMainDicomTags);
} else if (action == 'attach-series-to-existing-study') {
this.tags = {};
this.dateTags = {};
this.tags['StudyInstanceUID'] = "";
} else if (action == 'create-new-study-from-series') {
this.tags = {};
this.dateTags = {};
this.tags['PatientID'] = '';
this.tags['PatientName'] = '';
this.tags['PatientBirthDate'] = '';
Expand All @@ -396,11 +403,13 @@ export default {
this.tags['StudyDescription'] = '';
} else if (action == 'modify-series-tags') {
this.tags = {};
this.dateTags = {};
this.setTagsFromDicomTags(this.seriesMainDicomTags);
} else if (action == 'anonymize-series') {
const uuid = uuidv4();
this.tags = {};
this.dateTags = {};
this.tags['PatientID'] = uuid;
this.tags['PatientName'] = 'Anonymized ' + uuid.substr(0, 8);
this.tags['PatientBirthDate'] = '';
Expand Down
62 changes: 32 additions & 30 deletions WebApplication/src/components/SeriesDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,39 +80,41 @@ export default {
<template>
<table class="table table-responsive table-sm series-details-table">
<tr>
<td width="70%" class="cut-text">
<ul>
<ResourceDetailText v-for="tag in uiOptions.SeriesMainTags" :key="tag" :tags="seriesMainDicomTags" :tag="tag" :showIfEmpty="true"></ResourceDetailText>
</ul>
</td>
<td width="30%" class="series-button-group">
<ResourceButtonGroup
:resourceOrthancId="this.seriesId"
:resourceLevel="'series'"
:resourceDicomUid="this.seriesMainDicomTags.SeriesInstanceUID"
:studyMainDicomTags="this.studyMainDicomTags"
:seriesMainDicomTags="this.seriesMainDicomTags"
:patientMainDicomTags="this.patientMainDicomTags"
:seriesInstances="this.seriesInstances"
:customClass="'instance-button-group'"
@deletedResource="onDeletedSeries"
></ResourceButtonGroup>
</td>
</tr>
<tr>
<td colspan="100">
<InstanceList
:seriesId="this.seriesId"
<tbody>
<tr>
<td width="70%" class="cut-text">
<ul>
<ResourceDetailText v-for="tag in uiOptions.SeriesMainTags" :key="tag" :tags="seriesMainDicomTags" :tag="tag" :showIfEmpty="true"></ResourceDetailText>
</ul>
</td>
<td width="30%" class="series-button-group">
<ResourceButtonGroup
:resourceOrthancId="this.seriesId"
:resourceLevel="'series'"
:resourceDicomUid="this.seriesMainDicomTags.SeriesInstanceUID"
:studyMainDicomTags="this.studyMainDicomTags"
:seriesMainDicomTags="this.seriesMainDicomTags"
:patientMainDicomTags="this.patientMainDicomTags"
:studyMainDicomTags="this.studyMainDicomTags"
:instancesIds="this.instancesIds"
:seriesInstances="this.seriesInstances"
@deletedInstance="onDeletedInstance"
></InstanceList>
</td>
</tr>
:customClass="'instance-button-group'"
@deletedResource="onDeletedSeries"
></ResourceButtonGroup>
</td>
</tr>
<tr>
<td colspan="100">
<InstanceList
:seriesId="this.seriesId"
:seriesMainDicomTags="this.seriesMainDicomTags"
:patientMainDicomTags="this.patientMainDicomTags"
:studyMainDicomTags="this.studyMainDicomTags"
:instancesIds="this.instancesIds"
:seriesInstances="this.seriesInstances"
@deletedInstance="onDeletedInstance"
></InstanceList>
</td>
</tr>
</tbody>
</table>
</template>
Expand Down
18 changes: 10 additions & 8 deletions WebApplication/src/components/SeriesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ export default {
<template>
<table class="table table-responsive table-sm series-table">
<thead>
<th width="2%" scope="col" class="series-table-header"></th>
<th
width="7%"
scope="col"
class="series-table-header cut-text"
data-bs-toggle="tooltip"
:title="columnTooltip('SeriesNumber')"
>{{columnTitle('SeriesNumber')}}</th>
<tr>
<th width="2%" scope="col" class="series-table-header"></th>
<th
width="7%"
scope="col"
class="series-table-header cut-text"
data-bs-toggle="tooltip"
:title="columnTooltip('SeriesNumber')"
>{{columnTitle('SeriesNumber')}}</th>
<th
width="40%"
scope="col"
Expand All @@ -86,6 +87,7 @@ export default {
data-bs-toggle="tooltip"
:title="columnTooltip('instances_number')"
>{{columnTitle('instances_number')}}</th>
</tr>
</thead>
<SeriesItem
v-for="seriesId in sortedSeriesIds"
Expand Down
9 changes: 0 additions & 9 deletions WebApplication/src/components/SettingsLabels.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ export default {
|| (this.availableLabels.length != this.allOriginalLabels.length)
|| !this.availableLabels.every((v, i) => v === this.allOriginalLabels[i]);
},
},
watch: {
// limitAvailableLabels(newValue, oldValue) {
// if (newValue) {
// this.availableLabels = [...this.allOriginalLabels];
// } else {
// this.availableLabels = [];
// }
// }
}
}
</script>
Expand Down
Loading

0 comments on commit 0000bef

Please sign in to comment.