Skip to content

Commit

Permalink
Merge branch 'develop' into 2547
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckflipXYZ authored Jan 17, 2025
2 parents 12a187d + b844374 commit aed37b5
Show file tree
Hide file tree
Showing 17 changed files with 205 additions and 139 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,17 @@ jobs:
# - we push the cache (cache_to) after development builds of the
# main branch only
# - we never use the cache on production builds
#
# The image is exported in the OCI format ('image-manifest=true')
# to avoid a "failed to solve: not found" error when pushing to the
# github container registry.
enable_cache_from = not env['PRODUCTION'] and not env['NO_CACHE']
enable_cache_to = not env['PRODUCTION'] and (
main_branch_sha == env['IMAGE_TAG'] == env['SHA'])
print(f"{enable_cache_from = }\n{enable_cache_to = }\n")
def cache_arg(enabled: bool, image: str, extra=""):
return [f"type=registry,ref={env['DOCKER_REPOSITORY']}/{image}:cache{extra}"
return [f"type=registry,image-manifest=true,ref={env['DOCKER_REPOSITORY']}/{image}:cache{extra}"
] if enabled else []
# extract the list of images to be built from the docker-compose config
Expand Down
57 changes: 57 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
In alphabetic order:

Alexandre Abadie, Anthony Baire, Elise Bannier, Emmanuel Barbier, Christian Barillot, Marjolaine Bodin, Olivier Commowick, Isabelle Corouge, Yao Chi, Pierre-Henri Dauvergne, Jean-Côme Douteau, Michel Dojat, Quentin Duché, Alae Es-Saki, Inès Fakhfakh, Adrien Férial, Bernard Gibaud, Justine Guillaumont, Malo Gaubert, Wefa Hakem, Guewen Hubert, Michael Kain, Khalil Kessa, Romain Lahaxe, Julien Lamy, Julien Louis, Simon Loury, Camille Maumet, Arthur Masson, Youenn Merel, Olivier Montignon, Aneta Morawin, Farid Ouhmich, Alexandre Pron, Guillaume Renard, Mathieu Simon, Arnaud Touboulic, Laurent Vallet, Nicolas Wiest Daessle.

Inclusion of authors of research articles dealing with Shanoir [[1], [2]](https://www.zotero.org/google-docs/?Uc9jGd), [Inria BIL ](https://team.inria.fr/bilv2/fr/software/) (shanoir, shanoir-ng, qtshanoir, shanoirtk, shanoir-uploader, shanoir-uploader-ofsep) as well as all contributors to the Github code repositories shanoir-ng, shanoir-downloader, shanoir-deploy on January 7 th 2025, sorted by surname in alphabetical order.

[1] C. Barillot et al., “Shanoir: Applying the Software as a Service Distribution Model to Manage Brain Imaging Research Repositories,” Front. ICT, vol. 3, Dec. 2016, doi: 10.3389/fict.2016.00025.

[2] M. Kain et al., “Small Animal Shanoir (SAS) A Cloud-Based Solution for Managing Preclinical MR Brain Imaging Studies,” Front. Neuroinformatics, vol. 14, p. 20, May 2020, doi: 10.3389/fninf.2020.00020.

Contributions detailed following [https://allcontributors.org/docs/en/emoji-key](https://allcontributors.org/docs/en/emoji-key)
All possible contributions ordered:

🔊 ♿️ 🐛 📝 💼 💻 🖋 🔣 📖 🎨 💡 📋 💵 🔍 🤔 🚇 🚧 🧑‍🏫 📦 🔌 📆 📣 💬 🔬 👀 🛡️ 🔧 🌍 ⚠️ ✅ 📢 📓 📹

|Contributor | Contribution(s) |
|----------------------|----------------------------------------------------------------------------------------------------- |
|Alexandre Abadie | |
|Anthony Baire | ♿️ 🐛 💻 📖 🤔 🚇 🚧 🧑‍🏫 📦 🔌 💬 👀 🛡️ 🔧 ⚠️ ✅ |
|Elise Bannier | ♿️ 🐛 🖋 🔣 📖 💵 🔍 🤔 📆 📣 🔧 ✅ 📓 |
|Emmanuel Barbier | |
|Christian Barillot | |
|Marjolaine Bodin | |
|Olivier Commowick | |
|Isabelle Corouge | |
|Yao Chi | |
|Pierre-Henri Dauvergne| ♿️ 🐛 💻 📖 📋 🚧 🧑‍🏫 🔌 💬 👀 ⚠️ ✅ 📓 |
|Jean Côme Douteau | ♿️ 🐛 📝 💻 🖋 📖 📋 🤔 🚇 🚧 🧑‍🏫 📦 🔌 📣 💬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 |
|Michel Dojat | |
|Quentin Duché | 🐛 💻 📖 💡 🤔 🧑‍🏫 👀 🔧 📢 📓 |
|Alae Es-Saki | |
|Inès Fakhfakh | |
|Adrien Férial | |
|Bernard Gibaud | |
|Justine Guillaumont | |
|Malo Gaubert | 🐛 💻 📖 💡 🤔 🧑‍🏫 👀 🔧 📢 📓 |
|Wefa Hakem | |
|Guewen Hubert | ♿️ 🐛 💻 📖 📋 🚧 🧑‍🏫 🔌 💬 👀 ⚠️ ✅ 📓 |
|Michael Kain | ♿️ 🐛 📝 💻 🖋 🔣 📖 🎨 💡 📋 🔍 🤔 🚇 🚧 🧑‍🏫 📦 🔌 📆 📣 💬 🔬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 |
|Khalil Kessa | |
|Romain Lahaxe | |
|Julien Lamy | |
|Julien Louis | ♿️ 🐛 💻 🖋 📖 🎨 💡 📋 🤔 🚇 🚧 🧑‍🏫 📦 💬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 |
|Simon Loury | |
|Camille Maumet | ♿️ 🐛 🖋 🔣 📖 📋 🤔 🔌 📆 📣 💬 👀 🛡️ 🔧 📢 📓 |
|Arthur Masson | |
|Youenn Merel | ♿️ 🐛 💻 🖋 📖 💡 📋 🤔 🚇 🚧 🧑‍🏫 📦 🔌 💬 👀 🛡️ 🔧 ⚠️ ✅ 📢 📓 📹 |
|Olivier Montignon | |
|Aneta Morawin | |
|Farid Ouhmich | |
|Alexandre Pron | ♿️ 🐛 💻 📖 🔌 ⚠️ ✅ 📓 |
|Guillaume Renard | |
|Mathieu Simon | |
|Arnaud Touboulic | |
|Laurent Vallet | ♿️ 🐛 💻 🖋 📖 💡 📋 🤔 🚧 🧑‍🏫 📦 🔌 💬 👀 🔧 ⚠️ 📓|
|Nicolas Wiest Daessle | |

8 changes: 8 additions & 0 deletions FUNDINGS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Fundings

This page lists the funding that has contributed to the development of Shanoir and its software ecosystem.
| Funding |
|: ----------------------------------------------------:|
| _Technological development program_ of Inria |
| Brittany region council |
| _Investments for the Future program_: ANR-11-INBS-006 |
2 changes: 1 addition & 1 deletion shanoir-ng-back/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.html
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.2</version>
<version>3.4.0</version>
<relativePath/>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

@Service
public class EegImporterService {
Expand Down Expand Up @@ -67,7 +68,12 @@ public class EegImporterService {
public void createEegDataset(final EegImportJob importJob) throws IOException {

Long userId = KeycloakUtil.getTokenUserId();
ShanoirEvent event = new ShanoirEvent(ShanoirEventType.IMPORT_DATASET_EVENT, importJob.getExaminationId().toString(), userId, "Starting import...", ShanoirEvent.IN_PROGRESS, 0f, importJob.getStudyId());
ShanoirEvent event;
if(Objects.isNull(importJob.getShanoirEvent())){
event = new ShanoirEvent(ShanoirEventType.IMPORT_DATASET_EVENT, importJob.getExaminationId().toString(), userId, "Starting import...", ShanoirEvent.IN_PROGRESS, 0f, importJob.getStudyId());
} else {
event = importJob.getShanoirEvent();
}
eventService.publishEvent(event);

if (importJob == null || importJob.getDatasets() == null || importJob.getDatasets().isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ a { text-decoration: underline; }
.ct-warn i { color: orangered; }

.global-loading { color: var(--color-b); }
.global-loading i { font-size: 30px; color: var(--color-b-light2); }
.global-loading i { font-size: 30px; color: var(--color-b-light2); }

.new-subject { margin-left: 20px !important; }
.new-subject:active,
.new-subject:enabled:hover { cursor: pointer; }
.secondary { font-size: 8px; margin-right: 7px; margin-left: 2px; }

.subject-select { width: 185px; }
.examination-select { width: 154px; }
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,18 @@
<li class="required">
<label class="required-label">Select a subject</label>
<span class="right-col">
<select-box
<select-box class="subject-select"
[disabled]="loading || !study || !acquisitionEquipment"
[(ngModel)]="subject"
(userChange)="onSelectSubject();"
[viewRoute]="'/subject/details/' + subject?.id" [viewDisabled]="!subject"
(onNewClick)="openCreateSubject()" [newDisabled]="!study || !acquisitionEquipment"
[viewRoute]="'/subject/details/' + this.subject?.id" [viewDisabled]="!subject"
[optionArr]="subjects">
</select-box>
<button class="new-subject" (click)="openCreateSubject()" [disabled]="!study || !acquisitionEquipment">
<i class="fa-solid fa-user"></i>
<i class="fa-solid fa-plus secondary"></i>
New subject
</button>
</span>
</li>
<li *ngIf="editSubjectStudy" class="required">
Expand Down Expand Up @@ -209,10 +213,16 @@
<li>
<label class="required-label">Select an examination</label>
<span class="right-col">
<select-box [disabled]="!study || !subject || loading" [(ngModel)]="examination" (userChange)="onSelectExam()"
[viewRoute]="'/examination/details/' + examination?.id" [viewDisabled]="!examination"
(onNewClick)="openCreateExam()" [newDisabled]="!study || !subject" [optionArr]="examinations" [pipe]="subjectExaminationLabelPipe">
<select-box class="examination-select"
[disabled]="!study || !subject || loading" [(ngModel)]="examination" (userChange)="onSelectExam()"
[viewRoute]="'/examination/details/' + this.examination?.id" [viewDisabled]="!examination"
[optionArr]="examinations" [pipe]="subjectExaminationLabelPipe">
</select-box>
<button class="new-subject" (click)="openCreateExam()" [disabled]="!study || !subject">
<i class="fa-solid fa-stethoscope"></i>
<i class="fa-solid fa-plus secondary"></i>
New examination
</button>
</span>
</li>
</ol>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ input[type="number"] { width: 52px; }

.msg { max-width: 600px; color: blue; line-height: 20px; text-align: left; background-color: lightsteelblue; padding: 10px 20px; border-radius: 2px; }
.msg i { font-size: 20px; color: blue; opacity: 0.5; }
.msg a { cursor: pointer; }
.msg a { cursor: pointer; }

.loading { margin-top: 15px; }
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ <h2 class="header">Download Datasets</h2>
See the list of compatible browsers :
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/showDirectoryPicker#browser_compatibility" target="_blank">https://developer.mozilla.org/en-US/docs/Web/API/Window/showDirectoryPicker#browser_compatibility</a>
</div>
<div *ngIf="loading">
<div class="loading" *ngIf="loading">
<i *ngIf="loading" class="fas fa-cog fa-spin"></i> Retrieving download informations...
</div>
<fieldset class="body" disabled="loading"> <ol>
<fieldset class="body" [disabled]="loading"> <ol>
<li *ngIf="hasDicom">
<label>Dataset files format</label>
<span class="right-col">
Expand All @@ -40,7 +40,7 @@ <h2 class="header">Download Datasets</h2>
</ol>
</fieldset>
<div class="footer">
<button type="button" type="button" (click)="downloadNow()" class="alt left-icon" [disabled]="form.dirty && !form.valid">
<button type="button" type="button" (click)="downloadNow()" class="alt left-icon" [disabled]="loading || (form.dirty && !form.valid)">
<i class="fas fa-download"></i>Download zip
</button>
<button type="button" (click)="cancel()">Cancel</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class MassDownloadService {
}).catch(error => {
if (error == this.BROWSER_COMPAT_ERROR_MSG) {
return this.openAltModal(inputIds).then(ret => {
if (ret != 'cancel') {
if (ret != 'cancel' && ret.datasets) {
return this._downloadAlt(ret.datasets.map(ds => ds.id), ret.format, ret.converter, downloadState).catch(error => {
if (ret.datasets.length > this.datasetService.MAX_DATASETS_IN_ZIP_DL) {
this.dialogService.error('Too many datasets', 'You are trying to download '
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,8 @@ public ResponseEntity<Void> startImportEEGJob(
// Comment: Anonymisation is not necessary for pure brainvision EEGs data
try {
importJob.setUsername(KeycloakUtil.getTokenUserName());
ShanoirEvent event = new ShanoirEvent(ShanoirEventType.IMPORT_DATASET_EVENT, importJob.getExaminationId().toString(), KeycloakUtil.getTokenUserId(), "Starting import...", ShanoirEvent.IN_PROGRESS, 0f, importJob.getStudyId());
importJob.setShanoirEvent(event);
Integer integg = (Integer) rabbitTemplate.convertSendAndReceive(RabbitMQConfiguration.IMPORT_EEG_QUEUE, objectMapper.writeValueAsString(importJob));
return new ResponseEntity<Void>(HttpStatusCode.valueOf(integg.intValue()));
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public void testStartImportEEGJob() throws Exception {

EegImportJob importJob = new EegImportJob();
EegDataset dataset = new EegDataset();
importJob.setExaminationId(1L);
importJob.setDatasets(Collections.singletonList(dataset));
dataset.setName("Ceci est un nom bien particulier");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public void actionPerformed(ActionEvent event) {
mainWindow.birthDateTF.setText("");
mainWindow.mSexR.setSelected(true);
mainWindow.fSexR.setSelected(false);
mainWindow.oSexR.setSelected(false);

Media media = new Media();
// when the open file from CD/DVD menu is clicked
Expand Down Expand Up @@ -165,19 +166,7 @@ else if (!firstName1.equals(""))
+ firstName1.toUpperCase();
else
patientNameFinal = lastName.toUpperCase();

String modality = null;
if (!mainWindow.noRB.isSelected()) {
if (mainWindow.mrRB.isSelected()) {
modality = "MR";
} else if (mainWindow.ctRB.isSelected()) {
modality = "CT";
} else if (mainWindow.ptRB.isSelected()) {
modality = "PT";
} else if (mainWindow.nmRB.isSelected()) {
modality = "NM";
}
}
String modality = mainWindow.modality;
boolean studyRootQuery = false;
if (mainWindow.sRB.isSelected()) {
studyRootQuery = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private void readAndCopyDicomFilesToUploadFolder(String studyInstanceUID, List<S
} else {
downloadOrCopyReport.append("Error: Download: serie "
+ (serie.getSeriesNumber() != null ? "(No. " + serie.getSeriesNumber() + ") " : "")
+ serie.getSeriesDescription() + " downloaded with not existing serie folder.\n");
+ serie.getSeriesDescription() + " downloaded without an existing serie folder.\n");
logger.error(uploadFolder.getName() + ":\n\n Download of " + fileNamesForSerie.size()
+ " DICOM files for serie " + seriesInstanceUID + ": " + serie.getSeriesDescription()
+ " has failed.\n\n");
Expand Down
Loading

0 comments on commit aed37b5

Please sign in to comment.