From 5640810508d887e14967618ef587b439b22776b2 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Thu, 28 Oct 2010 15:05:24 +0000
Subject: [PATCH] LMS-1852 1. version of image transformation API

SVN: 18479
---
 .../cisd/base/image/IImageTransformer.java    | 33 +++++++++++++++++++
 .../base/image/IImageTransformerFactory.java  | 33 +++++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100644 base/source/java/ch/systemsx/cisd/base/image/IImageTransformer.java
 create mode 100644 base/source/java/ch/systemsx/cisd/base/image/IImageTransformerFactory.java

diff --git a/base/source/java/ch/systemsx/cisd/base/image/IImageTransformer.java b/base/source/java/ch/systemsx/cisd/base/image/IImageTransformer.java
new file mode 100644
index 00000000000..099f1653782
--- /dev/null
+++ b/base/source/java/ch/systemsx/cisd/base/image/IImageTransformer.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.base.image;
+
+import java.awt.image.BufferedImage;
+
+/**
+ * Interface for classes which can transform images. The transformation depends only some parameters
+ * and an image as input.
+ * 
+ * @author Franz-Josef Elmer
+ */
+public interface IImageTransformer
+{
+    /**
+     * Transforms the specified image. The transformation should change the input image.
+     */
+    public BufferedImage transform(BufferedImage image);
+}
diff --git a/base/source/java/ch/systemsx/cisd/base/image/IImageTransformerFactory.java b/base/source/java/ch/systemsx/cisd/base/image/IImageTransformerFactory.java
new file mode 100644
index 00000000000..5a7e61ca7f8
--- /dev/null
+++ b/base/source/java/ch/systemsx/cisd/base/image/IImageTransformerFactory.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2010 ETH Zuerich, CISD
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package ch.systemsx.cisd.base.image;
+
+import java.io.Serializable;
+
+/**
+ * Factory creating an {@link IImageTransformer}. The parameters of the transformer should be
+ * stored as serializable attributes of concrete implementations of this interface.
+ *
+ * @author Franz-Josef Elmer
+ */
+public interface IImageTransformerFactory extends Serializable
+{
+    /**
+     * Creates a transformer object based on the attributes of the factory.
+     */
+    public IImageTransformer createTransformer();
+}
-- 
GitLab