Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ppouchin authored Nov 6, 2023
2 parents c3817a8 + 14365f3 commit 86fd399
Show file tree
Hide file tree
Showing 22 changed files with 1,436 additions and 623 deletions.
49 changes: 25 additions & 24 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ ij_java_array_initializer_new_line_after_left_brace = false
ij_java_array_initializer_right_brace_on_new_line = false
ij_java_array_initializer_wrap = on_every_item
ij_java_assert_statement_colon_on_next_line = false
ij_java_assert_statement_wrap = off
ij_java_assert_statement_wrap = normal
ij_java_assignment_wrap = off
ij_java_binary_operation_sign_on_next_line = false
ij_java_binary_operation_wrap = normal
ij_java_blank_lines_after_anonymous_class_header = 0
ij_java_blank_lines_after_class_header = 0
ij_java_blank_lines_after_imports = 1
ij_java_blank_lines_after_package = 1
ij_java_blank_lines_around_class = 1
ij_java_blank_lines_after_class_header = 1
ij_java_blank_lines_after_imports = 2
ij_java_blank_lines_after_package = 2
ij_java_blank_lines_around_class = 2
ij_java_blank_lines_around_field = 0
ij_java_blank_lines_around_field_in_interface = 0
ij_java_blank_lines_around_initializer = 1
ij_java_blank_lines_around_method = 2
ij_java_blank_lines_around_method_in_interface = 1
ij_java_blank_lines_around_method_in_interface = 2
ij_java_blank_lines_before_class_end = 1
ij_java_blank_lines_before_imports = 1
ij_java_blank_lines_before_method_body = 0
Expand All @@ -63,23 +63,23 @@ ij_java_block_brace_style = end_of_line
ij_java_block_comment_at_first_column = true
ij_java_call_parameters_new_line_after_left_paren = false
ij_java_call_parameters_right_paren_on_new_line = false
ij_java_call_parameters_wrap = off
ij_java_call_parameters_wrap = normal
ij_java_case_statement_on_separate_line = true
ij_java_catch_on_new_line = false
ij_java_class_annotation_wrap = split_into_lines
ij_java_class_brace_style = end_of_line
ij_java_class_count_to_use_import_on_demand = 11
ij_java_class_count_to_use_import_on_demand = 20
ij_java_class_names_in_javadoc = 1
ij_java_do_not_indent_top_level_class_members = false
ij_java_do_not_wrap_after_single_annotation = false
ij_java_do_while_brace_force = never
ij_java_do_while_brace_force = always
ij_java_doc_add_blank_line_after_description = true
ij_java_doc_add_blank_line_after_param_comments = true
ij_java_doc_add_blank_line_after_return = true
ij_java_doc_add_p_tag_on_empty_lines = true
ij_java_doc_align_exception_comments = true
ij_java_doc_align_param_comments = true
ij_java_doc_do_not_wrap_if_one_line = false
ij_java_doc_do_not_wrap_if_one_line = true
ij_java_doc_enable_formatting = true
ij_java_doc_enable_leading_asterisks = true
ij_java_doc_indent_on_continuation = false
Expand All @@ -92,35 +92,36 @@ ij_java_doc_param_description_on_new_line = false
ij_java_doc_preserve_line_breaks = false
ij_java_doc_use_throws_not_exception_tag = true
ij_java_else_on_new_line = false
ij_java_enum_constants_wrap = off
ij_java_extends_keyword_wrap = normal
ij_java_enum_constants_wrap = on_every_item
ij_java_extends_keyword_wrap = off
ij_java_extends_list_wrap = on_every_item
ij_java_field_annotation_wrap = split_into_lines
ij_java_finally_on_new_line = false
ij_java_for_brace_force = never
ij_java_for_brace_force = always
ij_java_for_statement_new_line_after_left_paren = false
ij_java_for_statement_right_paren_on_new_line = false
ij_java_for_statement_wrap = on_every_item
ij_java_generate_final_locals = false
ij_java_generate_final_parameters = false
ij_java_if_brace_force = never
ij_java_imports_layout = *,|,javax.**,java.**,|,$*
ij_java_if_brace_force = always
ij_java_imports_layout = *, |, javax.**, java.**, |, $*
ij_java_indent_case_from_switch = true
ij_java_insert_inner_class_imports = false
ij_java_insert_override_annotation = true
ij_java_keep_blank_lines_before_right_brace = 2
ij_java_keep_blank_lines_between_package_declaration_and_header = 2
ij_java_keep_blank_lines_in_code = 2
ij_java_keep_blank_lines_in_declarations = 2
ij_java_keep_builder_methods_indents = true
ij_java_keep_control_statement_in_one_line = true
ij_java_keep_first_column_comment = true
ij_java_keep_indents_on_empty_lines = false
ij_java_keep_line_breaks = true
ij_java_keep_multiple_expressions_in_one_line = false
ij_java_keep_simple_blocks_in_one_line = false
ij_java_keep_simple_classes_in_one_line = false
ij_java_keep_simple_lambdas_in_one_line = false
ij_java_keep_simple_methods_in_one_line = false
ij_java_keep_simple_classes_in_one_line = true
ij_java_keep_simple_lambdas_in_one_line = true
ij_java_keep_simple_methods_in_one_line = true # <- For empty methods
ij_java_label_indent_absolute = false
ij_java_label_indent_size = 0
ij_java_lambda_brace_style = end_of_line
Expand All @@ -129,10 +130,10 @@ ij_java_line_comment_add_space = false
ij_java_line_comment_at_first_column = true
ij_java_method_annotation_wrap = split_into_lines
ij_java_method_brace_style = end_of_line
ij_java_method_call_chain_wrap = normal
ij_java_method_call_chain_wrap = on_every_item
ij_java_method_parameters_new_line_after_left_paren = false
ij_java_method_parameters_right_paren_on_new_line = false
ij_java_method_parameters_wrap = on_every_item
ij_java_method_parameters_wrap = normal
ij_java_modifier_list_wrap = false
ij_java_names_count_to_use_import_on_demand = 11
ij_java_new_line_after_lparen_in_record_header = false
Expand All @@ -149,7 +150,7 @@ ij_java_replace_null_check = true
ij_java_replace_sum_lambda_with_method_ref = true
ij_java_resource_list_new_line_after_left_paren = false
ij_java_resource_list_right_paren_on_new_line = false
ij_java_resource_list_wrap = normal
ij_java_resource_list_wrap = on_every_item
ij_java_rparen_on_new_line_in_record_header = false
ij_java_space_after_closing_angle_bracket_in_type_argument = false
ij_java_space_after_colon = true
Expand Down Expand Up @@ -232,16 +233,16 @@ ij_java_ternary_operation_signs_on_next_line = false
ij_java_ternary_operation_wrap = normal
ij_java_test_name_suffix = Test
ij_java_throws_keyword_wrap = normal
ij_java_throws_list_wrap = normal
ij_java_throws_list_wrap = on_every_item
ij_java_use_external_annotations = false
ij_java_use_fq_class_names = false
ij_java_use_relative_indents = false
ij_java_use_single_class_imports = true
ij_java_variable_annotation_wrap = off
ij_java_visibility = public
ij_java_while_brace_force = never
ij_java_while_brace_force = always
ij_java_while_on_new_line = false
ij_java_wrap_comments = false
ij_java_wrap_comments = true
ij_java_wrap_first_method_in_call_chain = false
ij_java_wrap_long_lines = false

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ An ImageJ plugin to run a script on a batch of images from/to OMERO.

1. Install the [OMERO.insight plugin](https://omero-guides.readthedocs.io/en/latest/fiji/docs/installation.html) (if you
haven't already).
2. Download the JAR file for this [library](https://github.com/GReD-Clermont/simple-omero-client/releases/tag/5.12.1/).
3. Download the JAR file ([for this plugin](https://github.com/GReD-Clermont/omero_batch-plugin/releases/tag/1.0.5/)).
2. Download the JAR file for this [library](https://github.com/GReD-Clermont/simple-omero-client/releases/tag/5.16.0/).
3. Download the JAR file ([for this plugin](https://github.com/GReD-Clermont/omero_batch-plugin/releases/tag/2.0.0/)).
4. Place these JAR files in your "plugins" folder.

## How to use
Expand Down
24 changes: 4 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<artifactId>pom-scijava</artifactId>
<groupId>org.scijava</groupId>
<version>33.2.0</version>
<version>37.0.0</version>
</parent>

<groupId>fr.igred</groupId>
<artifactId>omero_batch-plugin</artifactId>
<version>1.0.5</version>
<version>2.0.0-SNAPSHOT</version>

<name>omero_batch-plugin</name>
<description>ImageJ plugin to batch process images from OMERO.</description>
Expand Down Expand Up @@ -48,7 +48,7 @@
<id>ppouchin</id>
<name>Pierre Pouchin</name>
<email>[email protected]</email>
<url>https://www.igred.fr/directory/member/pierre-pouchin/</url>
<url>https://www.igred.fr/en/member/pierre_pouchin/</url>
<organization>GReD (INSERM U1103 / CNRS UMR 6293 / UCA)</organization>
<organizationUrl>https://www.igred.fr</organizationUrl>
<roles>
Expand Down Expand Up @@ -114,8 +114,6 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<license.licenseName>gpl_v2</license.licenseName>
<license.copyrightOwners>MICA &amp; GReD</license.copyrightOwners>
</properties>
Expand Down Expand Up @@ -144,7 +142,7 @@
<dependency>
<groupId>fr.igred</groupId>
<artifactId>simple-omero-client</artifactId>
<version>5.12.1</version>
<version>5.16.0</version>
</dependency>
<dependency>
<groupId>org.scijava</groupId>
Expand Down Expand Up @@ -174,9 +172,7 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -204,16 +200,4 @@
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<detectJavaApiLink>false</detectJavaApiLink>
</configuration>
</plugin>
</plugins>
</reporting>

</project>
14 changes: 11 additions & 3 deletions src/main/java/fr/igred/ij/gui/OMEROConnectDialog.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 MICA & GReD
* Copyright (C) 2021-2023 MICA & GReD
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
Expand All @@ -16,6 +16,7 @@
*/
package fr.igred.ij.gui;


import fr.igred.omero.Client;
import fr.igred.omero.exception.ServiceException;
import ij.Prefs;
Expand All @@ -39,27 +40,34 @@

import static javax.swing.JOptionPane.showMessageDialog;


/**
* Connection dialog for OMERO.
*/
public class OMEROConnectDialog extends JDialog implements ActionListener {

/** The host field. */
private final JTextField hostField = new JTextField("");
/** The port field. */
private final JFormattedTextField portField = new JFormattedTextField(NumberFormat.getIntegerInstance());
/** The user field. */
private final JTextField userField = new JTextField("");
/** The password field. */
private final JPasswordField passwordField = new JPasswordField("");
/** The login button. */
private final JButton login = new JButton("Login");
/** The cancel button. */
private final JButton cancel = new JButton("Cancel");
/** The client. */
private transient Client client;
/** True if cancel was pressed. */
private boolean cancelled = false;


/**
* Creates a new dialog to connect the specified client, but does not display it.
*/
public OMEROConnectDialog() {
super();

final int width = 350;
final int height = 200;

Expand Down
13 changes: 11 additions & 2 deletions src/main/java/fr/igred/ij/gui/ProgressDialog.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 MICA & GReD
* Copyright (C) 2021-2023 MICA & GReD
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
Expand All @@ -16,6 +16,7 @@
*/
package fr.igred.ij.gui;


import fr.igred.ij.macro.ProgressMonitor;

import javax.swing.BoxLayout;
Expand All @@ -27,12 +28,19 @@
import java.awt.Container;
import java.awt.Font;


/**
* Progress dialog for batch processing.
*/
public class ProgressDialog extends JFrame implements ProgressMonitor {

/** The progress label. */
private final JLabel progressLabel = new JLabel("", SwingConstants.CENTER);

/** The state label. */
private final JLabel stateLabel = new JLabel("", SwingConstants.CENTER);

/** The OK button. */
private final JButton ok = new JButton("OK");


Expand All @@ -48,7 +56,8 @@ public ProgressDialog() {
Font progFont = new Font("Arial", Font.BOLD, 12);
JLabel warnLabel = new JLabel("", SwingConstants.CENTER);
warnLabel
.setText("<html> <body style='text-align:center;'> Warning: <br>Image processing can take time <br>depending on your network rate </body> </html>");
.setText(
"<html> <body style='text-align:center;'> Warning: <br>Image processing can take time <br>depending on your network rate </body> </html>");
warnLabel.setFont(warnFont);
progressLabel.setFont(progFont);
stateLabel.setFont(progFont);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/fr/igred/ij/gui/package-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 MICA & GReD
* Copyright (C) 2021-2023 MICA & GReD
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
Expand Down
56 changes: 56 additions & 0 deletions src/main/java/fr/igred/ij/io/BatchImage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright (C) 2021-2023 MICA & GReD
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
* Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package fr.igred.ij.io;


import fr.igred.omero.repository.ImageWrapper;
import ij.ImagePlus;


/**
* Interface to open images and retrieve the corresponding image on OMERO, if applicable.
*/
public interface BatchImage {

/**
* Returns the related ImageWrapper, or null if there is none.
*
* @return See above.
*/
ImageWrapper getImageWrapper();


/**
* Opens the image and returns the corresponding ImagePlus.
*
* @param mode The mode used to load ROIs.
*
* @return See above.
*/
ImagePlus getImagePlus(ROIMode mode);


/**
* Opens the image and returns the corresponding ImagePlus, with no ROI.
*
* @return See above.
*/
default ImagePlus getImagePlus() {
return getImagePlus(ROIMode.DO_NOT_LOAD);
}

}
Loading

0 comments on commit 86fd399

Please sign in to comment.