Skip to content
Snippets Groups Projects
Commit 16eed21e authored by tpylak's avatar tpylak
Browse files

move convert transformation to the api package

SVN: 20870
parent 2565b7ce
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ import java.util.List; ...@@ -20,7 +20,7 @@ import java.util.List;
import ch.systemsx.cisd.base.image.IImageTransformerFactory; import ch.systemsx.cisd.base.image.IImageTransformerFactory;
import ch.systemsx.cisd.common.shared.basic.utils.StringUtils; import ch.systemsx.cisd.common.shared.basic.utils.StringUtils;
import ch.systemsx.cisd.openbis.dss.etl.biozentrum.ConvertToolImageTransformerFactory; import ch.systemsx.cisd.openbis.dss.etl.dto.api.v1.transformations.ConvertToolImageTransformerFactory;
import ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.Geometry; import ch.systemsx.cisd.openbis.plugin.screening.shared.api.v1.dto.Geometry;
import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.ScreeningConstants; import ch.systemsx.cisd.openbis.plugin.screening.shared.basic.dto.ScreeningConstants;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package ch.systemsx.cisd.openbis.dss.etl.biozentrum; package ch.systemsx.cisd.openbis.dss.etl.dto.api.v1.transformations;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.BufferedReader; import java.io.BufferedReader;
...@@ -50,6 +50,9 @@ import ch.systemsx.cisd.imagereaders.ImageReaderFactory; ...@@ -50,6 +50,9 @@ import ch.systemsx.cisd.imagereaders.ImageReaderFactory;
/** /**
* An {@link IImageTransformer} using the convert command line tool for transformations. * An {@link IImageTransformer} using the convert command line tool for transformations.
* <p>
* Warning: The serialized version of this class can be stored in the database for each image.
* Moving this class to a different package would make all the saved transformations invalid.
* *
* @author Kaloyan Enimanev * @author Kaloyan Enimanev
*/ */
...@@ -113,7 +116,7 @@ public class ConvertToolImageTransformer implements IImageTransformer ...@@ -113,7 +116,7 @@ public class ConvertToolImageTransformer implements IImageTransformer
final ByteArrayOutputStream bos = new ByteArrayOutputStream(); final ByteArrayOutputStream bos = new ByteArrayOutputStream();
final List<String> errorLines = new ArrayList<String>(); final List<String> errorLines = new ArrayList<String>();
ProcessIOStrategy customIOStrategy = createCustomProcessIOStrategy(input, bos, errorLines); ProcessIOStrategy customIOStrategy = createCustomProcessIOStrategy(input, bos, errorLines);
ProcessResult result = ProcessResult result =
ProcessExecutionHelper.run(getCommandLine(), operationLog, machineLog, ProcessExecutionHelper.run(getCommandLine(), operationLog, machineLog,
ConcurrencyUtilities.NO_TIMEOUT, customIOStrategy, false); ConcurrencyUtilities.NO_TIMEOUT, customIOStrategy, false);
...@@ -137,9 +140,9 @@ public class ConvertToolImageTransformer implements IImageTransformer ...@@ -137,9 +140,9 @@ public class ConvertToolImageTransformer implements IImageTransformer
{ {
return ProcessIOStrategy.createCustom(new IProcessIOHandler() return ProcessIOStrategy.createCustom(new IProcessIOHandler()
{ {
public void handle(AtomicBoolean processRunning, OutputStream stdin, InputStream stdout, public void handle(AtomicBoolean processRunning, OutputStream stdin,
InputStream stderr) throws IOException InputStream stdout, InputStream stderr) throws IOException
{ {
stdin.write(input); stdin.write(input);
stdin.flush(); stdin.flush();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package ch.systemsx.cisd.openbis.dss.etl.biozentrum; package ch.systemsx.cisd.openbis.dss.etl.dto.api.v1.transformations;
import ch.systemsx.cisd.base.image.IImageTransformer; import ch.systemsx.cisd.base.image.IImageTransformer;
import ch.systemsx.cisd.base.image.IImageTransformerFactory; import ch.systemsx.cisd.base.image.IImageTransformerFactory;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package ch.systemsx.cisd.openbis.dss.etl.biozentrum; package ch.systemsx.cisd.openbis.dss.etl.dto.api.v1.transformations;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.File; import java.io.File;
...@@ -23,6 +23,7 @@ import org.testng.AssertJUnit; ...@@ -23,6 +23,7 @@ import org.testng.AssertJUnit;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import ch.systemsx.cisd.base.image.IImageTransformer; import ch.systemsx.cisd.base.image.IImageTransformer;
import ch.systemsx.cisd.openbis.dss.etl.dto.api.v1.transformations.ConvertToolImageTransformerFactory;
import ch.systemsx.cisd.openbis.dss.generic.shared.utils.ImageUtil; import ch.systemsx.cisd.openbis.dss.generic.shared.utils.ImageUtil;
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment