Skip to content

refactorisation of AutoCropCalling, and PATHS#17

Open
YoussefELANTRAOUI wants to merge 9 commits into
GReD-Clermont:mainfrom
ppouchin:refactoriser_et_unifier
Open

refactorisation of AutoCropCalling, and PATHS#17
YoussefELANTRAOUI wants to merge 9 commits into
GReD-Clermont:mainfrom
ppouchin:refactoriser_et_unifier

Conversation

@YoussefELANTRAOUI
Copy link
Copy Markdown

refactorisation of AutoCropCalling . Add Mermaid call graph diagrams for all menu components.

IJ.error("Cannot run autocrop on " + file.getName());
} finally {
// GARANTIE : le latch décrémente toujours, même en cas d'erreur
latch.countDown();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why this change?

for (File file : files) {
generalInfoBuilder.append(cropInfo.get(file.getName()));
if (cropInfo.containsKey(file.getName())) {
generalInfoBuilder.append(cropInfo.get(file.getName()));
Copy link
Copy Markdown
Member

@ppouchin ppouchin May 6, 2026

Choose a reason for hiding this comment

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

This is code improvement unrelated to methods refactoring.
Instead of a check with "if", this could probably also be used:
generalInfoBuilder.append(cropInfo.getOrDefault(file.getName(), ""));

private String processAutoCropWorkflowOMERO(AutoCrop autoCrop, ImageWrapper image, Long[] outputsDatImages,
Client client, String prefix, long outputProject)
throws AccessException, ServiceException, ExecutionException, OMEROServerError, IOException {
String fileImg = image.getName();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why the difference between "local" and "OMERO" workflows?
Autocrop is created in "process" for local, but is passed as an argument for OMERO?

} catch (ServiceException | AccessException | ExecutionException e) {
LOGGER.error("Cannot create AutoCrop for image: {}", fileImg, e);
// Si l'initialisation échoue, on débloque le latch ici !
latch.countDown();
Copy link
Copy Markdown
Member

@ppouchin ppouchin May 6, 2026

Choose a reason for hiding this comment

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

Potential bugfix but unrelated to current objective, and could introduce other bugs.

Copy link
Copy Markdown
Member

@ppouchin ppouchin left a comment

Choose a reason for hiding this comment

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

The code refactoring looks promising, but there are code modifications unrelated to the current objective that could alter how the program runs.
These bugfixes could be interesting but should be pushed separately.

Moreover, there could be more code homogeneity between local and OMERO workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants