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

Shanoir issue#1602 nifti management #1849

Conversation

jcomedouteau
Copy link
Collaborator

No description provided.

- Move conversion to microservice
# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/importer/dto/ImportJob.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/studycard/service/CardsProcessingService.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/ImporterApi.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/ImporterApiController.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverter.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverterApi.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverterApiController.java
#	shanoir-ng-nifti-conversion/src/main/java/org/shanoir/ng/service/DatasetsCreatorAndNIfTIConverterService.java
- Merge develop
- Management of DB (not resolved yet)
- nifti-conversion compilation
- Import correctly
- unify download logic
# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/CarminDataApi.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/CarminDataApiController.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/DatasetApi.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetDownloaderServiceImpl.java
#	shanoir-ng-front/src/app/datasets/dataset/dataset.component.ts
#	shanoir-ng-front/src/app/import/shared/import.service.ts
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/ImporterApi.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/ImporterApiController.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverter.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverterType.java
#	shanoir-ng-import/src/main/resources/scripts/import.sql
#	shanoir-ng-nifti-conversion/src/main/java/org/shanoir/ng/service/DatasetsCreatorAndNIfTIConverterService.java
# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/CarminDataApi.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/CarminDataApiController.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/DatasetApi.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetDownloaderServiceImpl.java
#	shanoir-ng-front/src/app/datasets/dataset/dataset.component.ts
#	shanoir-ng-front/src/app/import/shared/import.service.ts
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/ImporterApi.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/ImporterApiController.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverter.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverterType.java
#	shanoir-ng-import/src/main/resources/scripts/import.sql
#	shanoir-ng-nifti-conversion/src/main/java/org/shanoir/ng/service/DatasetsCreatorAndNIfTIConverterService.java
# Conflicts:
#	shanoir-ng-front/src/app/shared/mass-download/download-setup/download-setup.component.html
#	shanoir-ng-front/src/app/shared/mass-download/download-setup/download-setup.component.ts
# Conflicts:
#	shanoir-ng-front/src/app/shared/mass-download/download-setup/download-setup.component.html
#	shanoir-ng-front/src/app/shared/mass-download/download-setup/download-setup.component.ts
- Clean old files from import
- Reorganise nifti conversion logic
- Clean old converters and old windows files
- Reorganise nifti conversion logic in the front
- Correct mriconverter
- Move dicomifier (and remove bruker2dicom microservice)
- Remove from application yml
- Clean code from nifti dataset expression generation
- SQL script
@jcomedouteau jcomedouteau marked this pull request as ready for review November 16, 2023 14:41
@jcomedouteau jcomedouteau added the REVIEWABLE Has to be reviewed label Nov 16, 2023
@jcomedouteau
Copy link
Collaborator Author

What I've done in the PR:

  • Factorize code in the front to download, now we have almost only one entry to download datasets.
  • Factorize code in the back to download, now both (multiple download and single) use the same logic.
  • Move all nifti converters to new microservice
  • Including dicomifier that is now included in the nifti-conversion micro-service (the bruker2dicom disapeared)
  • Clean up useless old converters
  • Remove nifti conversion from import (and all code associated)
  • Allow mass reconversion in nifti incorporated with new mass download logic.
  • Download correctly EEG and BIDS datasets too

What to test:

  1. Every f*ing types of download:
  • EEG only
  • BIDS only
  • Nifti, single, multiple
  • Dicom, single, multiple
  • Processed dataset
  • Mixed datasets
  1. All import
  • Bruker import (important)
  • Dicom
  • Bids
  • EEG
  • Processed dataset
  • Processed dataset with ANIMA image (yes yes)

- Clean code from nimport MS
- Refactor front code
- Clean code for alt methods
- Deployment logic
- Add conversion logic to BIDS where necessary

if (!HttpStatus.OK.equals(response.getStatusCode()) && !HttpStatus.NO_CONTENT.equals(response.getStatusCode())) {
LOG.error(ERROR_BRUKER2DICOM_REQUEST);
boolean result = (boolean) rabbitTemplate.convertSendAndReceive(RabbitMQConfiguration.BRUKER_CONVERSION_QUEUE, request);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have

Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "org.springframework.amqp.rabbit.core.RabbitTemplate.convertSendAndReceive(String, Object)" is null
qualif-preclinical-1  | 	at org.shanoir.ng.preclinical.bruker.BrukerApiController.startBruker2Dicom(BrukerApiController.java:145)
qualif-preclinical-1  | 	at org.shanoir.ng.preclinical.bruker.BrukerApiController.uploadBrukerFile(BrukerApiController.java:108)
qualif-preclinical-1  | 	... 95 common frames omitted

when I try to upload a bruker file at the beginning of a bruker import.
The file works in prod.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll check !

@julien-louis
Copy link
Collaborator

reminder : add an error msg when the nifti convertion fails

- Don't write errors
# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/bids/service/BIDSServiceImpl.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/DatasetApi.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/controler/DatasetApiController.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetDownloaderServiceImpl.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/download/WADODownloaderService.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/shared/service/SubjectStudyServiceImpl.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/studycard/service/CardsProcessingService.java
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/vip/controller/ExecutionDataApiController.java
#	shanoir-ng-front/src/app/datasets/dataset/dataset.component.html
#	shanoir-ng-front/src/app/shared/mass-download/mass-download.service.ts
#	shanoir-ng-front/src/app/solr/solr.search.component.ts
#	shanoir-ng-front/src/app/subjects/tree/subject-node.component.ts
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/SerieToDatasetsSeparator.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/DatasetsCreatorAndNIfTIConverterService.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/SerieToDatasetsSeparator.java
#	shanoir-ng-ms-common/src/main/java/org/shanoir/ng/shared/dicom/SerieToDatasetsSeparator.java
# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetDownloaderServiceImpl.java
# Conflicts:
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/DatasetsCreatorAndNIfTIConverterService.java
# Conflicts:
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverter.java
#	shanoir-ng-import/src/main/java/org/shanoir/ng/importer/dcm2nii/NIfTIConverterApi.java
#	shanoir-ng-ms-common/src/main/java/org/shanoir/ng/shared/configuration/RabbitMQConfiguration.java
#	shanoir-ng-nifti-conversion/src/main/java/org/shanoir/ng/utils/ShanoirExec.java
#	shanoir-uploader/src/test/java/org/shanoir/uploader/test/importer/ZipFileImportTest.java
jcomedouteau and others added 6 commits February 28, 2024 16:34
# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/download/WADODownloaderService.java
#	shanoir-ng-front/src/app/import/pre-clinical-context/pre-clinical-context.component.ts
…b.com/jcomedouteau/shanoir-ng into shanoir-issue#1602-nifti-management
# Conflicts:
#	shanoir-ng-front/src/app/examinations/examination/examination.component.ts
@julien-louis
Copy link
Collaborator

@jcomedouteau the download fixes & evolutions pr has been merged, maybe I could do the merge in your pr ? Maybe I will try a pr on your branch ? (I had bad experiences with prs on prs but we will be careful !)

@julien-louis
Copy link
Collaborator

@jcomedouteau I'm currently working on the merge

@jcomedouteau
Copy link
Collaborator Author

Thanks !

@julien-louis julien-louis mentioned this pull request Mar 13, 2024
@jcomedouteau
Copy link
Collaborator Author

replaced by #2143

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REVIEWABLE Has to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants