sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] branch geoapi-4.0 updated: Renamed ImageOperations as ImageProcessor.
Date Thu, 26 Mar 2020 14:03:49 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 1e87bbd  Renamed ImageOperations as ImageProcessor.
1e87bbd is described below

commit 1e87bbd36436b9e2d3133d89f3fc3404a7500536
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Thu Mar 26 15:01:57 2020 +0100

    Renamed ImageOperations as ImageProcessor.
---
 .../java/org/apache/sis/internal/gui/ImageRenderings.java  |  8 ++++----
 .../image/{ImageOperations.java => ImageProcessor.java}    | 12 ++++++------
 .../org/apache/sis/image/StatisticsCalculatorTest.java     | 14 +++++++-------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/ImageRenderings.java
b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/ImageRenderings.java
index 0b33812..0cad35a 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/ImageRenderings.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/gui/ImageRenderings.java
@@ -17,7 +17,7 @@
 package org.apache.sis.internal.gui;
 
 import java.awt.image.RenderedImage;
-import org.apache.sis.image.ImageOperations;
+import org.apache.sis.image.ImageProcessor;
 
 
 /**
@@ -37,9 +37,9 @@ public final class ImageRenderings {
      * @todo Creates our own instance which listen to logging messages.
      *       We need to create a logging panel first.
      */
-    private static final ImageOperations OPERATIONS = new ImageOperations();
+    private static final ImageProcessor PROCESSOR = new ImageProcessor();
     static {
-        OPERATIONS.setErrorAction(ImageOperations.ErrorAction.LOG);
+        PROCESSOR.setErrorAction(ImageProcessor.ErrorAction.LOG);
     }
 
     /**
@@ -56,6 +56,6 @@ public final class ImageRenderings {
      * @return the rescaled image.
      */
     public static RenderedImage automaticScale(final RenderedImage image) {
-        return OPERATIONS.automaticColorRamp(image, 3);
+        return PROCESSOR.automaticColorRamp(image, 3);
     }
 }
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/ImageOperations.java b/core/sis-feature/src/main/java/org/apache/sis/image/ImageProcessor.java
similarity index 97%
rename from core/sis-feature/src/main/java/org/apache/sis/image/ImageOperations.java
rename to core/sis-feature/src/main/java/org/apache/sis/image/ImageProcessor.java
index 9beda4d..4a24e6b 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/ImageOperations.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/ImageProcessor.java
@@ -29,7 +29,7 @@ import org.apache.sis.internal.coverage.j2d.ImageUtilities;
 
 /**
  * A predefined set of operations on images as convenience methods.
- * After instantiation, {@code ImageOperations} can be configured for the following aspects:
+ * After instantiation, {@code ImageProcessor} can be configured for the following aspects:
  *
  * <ul class="verbose">
  *   <li>
@@ -48,7 +48,7 @@ import org.apache.sis.internal.coverage.j2d.ImageUtilities;
  * </ul>
  *
  * <h2>Error handling</h2>
- * If an exception occurs during the computation of a tile, then the {@code ImageOperations}
behavior
+ * If an exception occurs during the computation of a tile, then the {@code ImageProcessor}
behavior
  * is controlled by the {@link #getErrorAction() errorAction} property:
  *
  * <ul>
@@ -61,14 +61,14 @@ import org.apache.sis.internal.coverage.j2d.ImageUtilities;
  * </ul>
  *
  * <h2>Thread-safety</h2>
- * {@code ImageOperations} is thread-safe if its configuration is not modified after construction.
+ * {@code ImageProcessor} is thread-safe if its configuration is not modified after construction.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.1
  * @since   1.1
  * @module
  */
-public class ImageOperations {
+public class ImageProcessor {
     /**
      * Execution modes specifying whether operations can be executed in parallel.
      * If {@link #SEQUENTIAL}, operations are executed sequentially in the caller thread.
@@ -161,7 +161,7 @@ public class ImageOperations {
      * Creates a new set of image operations with default configuration.
      * The execution mode is initialized to {@link Mode#DEFAULT} and the error action to
{@link ErrorAction#THROW}.
      */
-    public ImageOperations() {
+    public ImageProcessor() {
         executionMode = Mode.DEFAULT;
         errorAction   = ErrorAction.THROW;
     }
@@ -259,7 +259,7 @@ public class ImageOperations {
         ArgumentChecks.ensureNonNull("source", source);
         final StatisticsCalculator calculator = new StatisticsCalculator(source, parallel(source),
failOnException());
         final Object property = calculator.getProperty(StatisticsCalculator.PROPERTY_NAME);
-        calculator.logAndClearError(ImageOperations.class, "statistics", errorListener());
+        calculator.logAndClearError(ImageProcessor.class, "statistics", errorListener());
         if (property instanceof Statistics[]) {
             return (Statistics[]) property;
         }
diff --git a/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
b/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
index 47de299..38021df 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/image/StatisticsCalculatorTest.java
@@ -80,8 +80,8 @@ public final strictfp class StatisticsCalculatorTest extends TestCase {
      */
     @Test
     public void testParallelExecution() {
-        final ImageOperations operations = new ImageOperations();
-        operations.setExecutionMode(ImageOperations.Mode.PARALLEL);
+        final ImageProcessor operations = new ImageProcessor();
+        operations.setExecutionMode(ImageProcessor.Mode.PARALLEL);
         final TiledImageMock image = createImage();
         final Statistics[] expected = StatisticsCalculator.computeSequentially(image);
         final Statistics[] actual = operations.statistics(image);
@@ -100,8 +100,8 @@ public final strictfp class StatisticsCalculatorTest extends TestCase
{
      */
     @Test
     public void testWithFailures() {
-        final ImageOperations operations = new ImageOperations();
-        operations.setExecutionMode(ImageOperations.Mode.PARALLEL);
+        final ImageProcessor operations = new ImageProcessor();
+        operations.setExecutionMode(ImageProcessor.Mode.PARALLEL);
         final TiledImageMock image = createImage();
         image.failRandomly(new Random(-8739538736973900203L));
         try {
@@ -120,9 +120,9 @@ public final strictfp class StatisticsCalculatorTest extends TestCase
{
      */
     @Test
     public void testWithLoggings() {
-        final ImageOperations operations = new ImageOperations();
-        operations.setExecutionMode(ImageOperations.Mode.PARALLEL);
-        operations.setErrorAction(ImageOperations.ErrorAction.LOG);
+        final ImageProcessor operations = new ImageProcessor();
+        operations.setExecutionMode(ImageProcessor.Mode.PARALLEL);
+        operations.setErrorAction(ImageProcessor.ErrorAction.LOG);
         final TiledImageMock image = createImage();
         image.failRandomly(new Random(8004277484984714811L));
         final Statistics[] stats = operations.statistics(image);


Mime
View raw message