Commit bc2f9207 authored by Amandine  TOURNAY's avatar Amandine TOURNAY
Browse files

Mavenized plugin

parent edad632c
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="var" path="ICY_PLUGINS/tprovoost/sequenceblocks/SequenceBlocks.jar"/>
<classpathentry kind="var" path="ICY_PLUGINS/adufour/blocks/Blocks.jar"/>
<classpathentry kind="var" path="ICY_PLUGINS/adufour/ezplug/EzPlug.jar"/>
<classpathentry kind="var" path="ICY_JAR"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" path="F:/SDKs/Java/jdk1.8.0_241/lib/tools.jar"/>
<classpathentry kind="var" path="USER_HOME/SDKs/Java/jdk1.8.0_251/lib/tools.jar"/>
<classpathentry kind="var" path="USER_HOME/SDKs/Java/jdk1.8.0_251/lib/tools.jar"/>
<classpathentry kind="lib" path="D:/SDKs/Java/jdk1.8.0_241/lib/tools.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-kernel:2.1.0"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: net.sf.ehcache:ehcache:2.10.6"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.slf4j:slf4j-api:1.7.25"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-bioformats:6.3.1"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-insubstantial:7.3.7"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-vtk:6.3.0.1"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: net.imagej:ij:1.52q"/>
<classpathentry kind="var" path="USER_HOME/SDKs/Java/jdk1.8.0_251/lib/tools.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: javax.media:jai-core:1.1.3"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: javax.media:jai-codec:1.1.3"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.jogl:jogl-all:2.1.5-01"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.jogl:jogl-all-natives-linux-amd64:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.jogl:jogl-all-natives-linux-i586:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.jogl:jogl-all-natives-macosx-universal:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.jogl:jogl-all-natives-windows-amd64:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.jogl:jogl-all-natives-windows-i586:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.gluegen:gluegen-rt:2.1.5-01"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.gluegen:gluegen-rt-natives-linux-amd64:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.gluegen:gluegen-rt-natives-linux-i586:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.gluegen:gluegen-rt-natives-macosx-universal:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.gluegen:gluegen-rt-natives-windows-amd64:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.jogamp.gluegen:gluegen-rt-natives-windows-i586:2.1.5"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.javassist:javassist:3.22.0-GA"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: net.sourceforge.jexcelapi:jxl:2.6.12"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: log4j:log4j:1.2.14"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.swinglabs.swingx:swingx-all:1.6.5-1"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-sequence-blocks:2.0.14"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-blocks:1.0.1"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-protocols:3.0.9"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-javadocparser:1.0.0"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: com.nativelibs4java:ochafik-util:0.12"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/Maven: org.bioimageanalysis.icy:icy-ezplug:3.15.13"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
bin
/*.jar
.idea/
.settings/
build/
target/
*.iml
*.eml
.classpath
.project
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.bioimageanalysis.icy</groupId>
<artifactId>icy-roi-block</artifactId>
<version>1.0.0</version>
<name>RoiBlocks</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<outputJar>${project.build.outputDirectory}/../plugin</outputJar>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<outputDirectory>${outputJar}</outputDirectory>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>plugins.stef.roi.bloc.RoiBlocks</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.bioimageanalysis.icy</groupId>
<artifactId>icy-kernel</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.bioimageanalysis.icy</groupId>
<artifactId>icy-sequence-blocks</artifactId>
<version>2.0.14</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>icy</id>
<url>https://icy-nexus.pasteur.fr/repository/Icy/</url>
</repository>
</repositories>
<distributionManagement>
<snapshotRepository>
<id>icy-dev</id>
<name>icy-dev</name>
<url>https://icy-nexus-dev.pasteur.cloud/repository/icy-core/</url>
</snapshotRepository>
<repository>
<id>icy-prod</id>
<name>icy-prod</name>
<url>https://icy-nexus.pasteur.fr/repository/icy-core/</url>
</repository>
</distributionManagement>
</project>
\ No newline at end of file
/**
*
*/
package plugins.stef.roi.bloc.convert;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginBundled;
import icy.plugin.interface_.PluginLibrary;
import icy.roi.ROI;
import icy.roi.ROIUtil;
import plugins.adufour.blocks.tools.roi.ROIBlock;
import plugins.adufour.blocks.util.VarList;
import plugins.adufour.vars.lang.VarDouble;
import plugins.adufour.vars.lang.VarROIArray;
import plugins.stef.roi.bloc.RoiBlocks;
/**
* Block to convert input ROI(s) to 2D ellipse type ROI(s) centered on the mass center.<br>
*
* @author Stephane
*/
public class ROIToEllipse extends Plugin implements ROIBlock, PluginLibrary, PluginBundled
{
protected final VarROIArray input;
protected final VarDouble radiusX;
protected final VarDouble radiusY;
protected final VarROIArray output;
public ROIToEllipse()
{
super();
input = new VarROIArray("Roi(s)");
radiusX = new VarDouble("Radius X", 1d);
radiusY = new VarDouble("Radius Y", 1d);
output = new VarROIArray("Ellipse roi(s)");
}
@Override
public void run()
{
final ROI[] rois = input.getValue();
final ROI[] result = new ROI[(rois != null) ? rois.length : 0];
final double rx = radiusX.getValue().doubleValue();
final double ry = radiusY.getValue().doubleValue();
try
{
if (rois != null)
{
for (int r = 0; r < rois.length; r++)
result[r] = ROIUtil.convertToEllipse(rois[r], rx, ry);
}
}
catch (InterruptedException e)
{
System.err.println("ROIToEllipse process interrupted !");
output.setValue(null);
return;
}
output.setValue(result);
}
@Override
public void declareInput(VarList inputMap)
{
inputMap.add("input", input);
inputMap.add("radiusX", radiusX);
inputMap.add("radiuxY", radiusY);
}
@Override
public void declareOutput(VarList outputMap)
{
outputMap.add("output", output);
}
@Override
public String getMainPluginClassName()
{
return RoiBlocks.class.getName();
}
}
/**
*
*/
package plugins.stef.roi.bloc.convert;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginBundled;
import icy.plugin.interface_.PluginLibrary;
import icy.roi.ROI;
import icy.roi.ROIUtil;
import plugins.adufour.blocks.tools.roi.ROIBlock;
import plugins.adufour.blocks.util.VarList;
import plugins.adufour.vars.lang.VarDouble;
import plugins.adufour.vars.lang.VarROIArray;
import plugins.stef.roi.bloc.RoiBlocks;
/**
* Block to convert input ROI(s) to 2D ellipse type ROI(s) centered on the mass center.<br>
*
* @author Stephane
*/
public class ROIToEllipse extends Plugin implements ROIBlock, PluginLibrary, PluginBundled
{
protected final VarROIArray input;
protected final VarDouble radiusX;
protected final VarDouble radiusY;
protected final VarROIArray output;
public ROIToEllipse()
{
super();
input = new VarROIArray("Roi(s)");
radiusX = new VarDouble("Radius X", 1d);
radiusY = new VarDouble("Radius Y", 1d);
output = new VarROIArray("Ellipse roi(s)");
}
@Override
public void run()
{
final ROI[] rois = input.getValue();
final ROI[] result = new ROI[(rois != null) ? rois.length : 0];
final double rx = radiusX.getValue().doubleValue();
final double ry = radiusY.getValue().doubleValue();
try
{
if (rois != null)
{
for (int r = 0; r < rois.length; r++)
result[r] = ROIUtil.convertToEllipse(rois[r], rx, ry);
}
}
catch (InterruptedException e)
{
System.err.println("ROIToEllipse process interrupted !");
output.setValue(null);
return;
}
output.setValue(result);
}
@Override
public void declareInput(VarList inputMap)
{
inputMap.add("input", input);
inputMap.add("radiusX", radiusX);
inputMap.add("radiuxY", radiusY);
}
@Override
public void declareOutput(VarList outputMap)
{
outputMap.add("output", output);
}
@Override
public String getMainPluginClassName()
{
return RoiBlocks.class.getName();
}
}
/**
*
*/
package plugins.stef.roi.bloc.convert;
import java.util.ArrayList;
import java.util.List;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginBundled;
import icy.plugin.interface_.PluginLibrary;
import icy.roi.ROI;
import icy.roi.ROIUtil;
import plugins.adufour.blocks.tools.roi.ROIBlock;
import plugins.adufour.blocks.util.VarList;
import plugins.adufour.vars.lang.VarROIArray;
import plugins.stef.roi.bloc.RoiBlocks;
/**
* Block to convert input ROI(s) to single point type ROI(s) representing the mass center.
*
* @author Stephane
*/
public class ROIToPoint extends Plugin implements ROIBlock, PluginLibrary, PluginBundled
{
protected final VarROIArray input;
protected final VarROIArray output;
public ROIToPoint()
{
super();
input = new VarROIArray("Roi(s)");
output = new VarROIArray("Point roi(s)");
}
@Override
public void run()
{
final ROI[] rois = input.getValue();
final List<ROI> result = new ArrayList<ROI>();
try
{
if (rois != null)
{
for (ROI roi : rois)
result.add(ROIUtil.convertToPoint(roi));
}
}
catch (InterruptedException e)
{
System.err.println("ROIToPoint process interrupted !");
output.setValue(null);
return;
}
output.setValue(result.toArray(new ROI[result.size()]));
}
@Override
public void declareInput(VarList inputMap)
{
inputMap.add("input", input);
}
@Override
public void declareOutput(VarList outputMap)
{
outputMap.add("output", output);
}
@Override
public String getMainPluginClassName()
{
return RoiBlocks.class.getName();
}
}
/**
*
*/
package plugins.stef.roi.bloc.convert;
import java.util.ArrayList;
import java.util.List;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginBundled;
import icy.plugin.interface_.PluginLibrary;
import icy.roi.ROI;
import icy.roi.ROIUtil;
import plugins.adufour.blocks.tools.roi.ROIBlock;
import plugins.adufour.blocks.util.VarList;
import plugins.adufour.vars.lang.VarROIArray;
import plugins.stef.roi.bloc.RoiBlocks;
/**
* Block to convert input ROI(s) to single point type ROI(s) representing the mass center.
*
* @author Stephane
*/
public class ROIToPoint extends Plugin implements ROIBlock, PluginLibrary, PluginBundled
{
protected final VarROIArray input;
protected final VarROIArray output;
public ROIToPoint()
{
super();
input = new VarROIArray("Roi(s)");
output = new VarROIArray("Point roi(s)");
}
@Override
public void run()
{
final ROI[] rois = input.getValue();
final List<ROI> result = new ArrayList<ROI>();
try
{
if (rois != null)
{
for (ROI roi : rois)
result.add(ROIUtil.convertToPoint(roi));
}
}
catch (InterruptedException e)
{
System.err.println("ROIToPoint process interrupted !");
output.setValue(null);
return;
}
output.setValue(result.toArray(new ROI[result.size()]));
}
@Override
public void declareInput(VarList inputMap)
{
inputMap.add("input", input);
}
@Override
public void declareOutput(VarList outputMap)
{
outputMap.add("output", output);
}
@Override
public String getMainPluginClassName()
{
return RoiBlocks.class.getName();
}
}
/**
*
*/
package plugins.stef.roi.bloc.convert;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginBundled;
import icy.plugin.interface_.PluginLibrary;
import icy.roi.ROI;
import icy.roi.ROIUtil;
import plugins.adufour.blocks.tools.roi.ROIBlock;
import plugins.adufour.blocks.util.VarList;
import plugins.adufour.vars.lang.VarDouble;
import plugins.adufour.vars.lang.VarROIArray;
import plugins.stef.roi.bloc.RoiBlocks;
/**
* Block to convert input ROI(s) to 2D rectangle type ROI(s) centered on the mass center.<br>
*
* @author Stephane
*/
public class ROIToRectangle extends Plugin implements ROIBlock, PluginLibrary, PluginBundled
{
protected final VarROIArray input;
protected final VarDouble width;
protected final VarDouble height;
protected final VarROIArray output;
public ROIToRectangle()
{
super();
input = new VarROIArray("Roi(s)");
width = new VarDouble("Width", 1d);
height = new VarDouble("Height", 1d);
output = new VarROIArray("Rectangle roi(s)");
}
@Override
public void run()
{
final ROI[] rois = input.getValue();
final ROI[] result = new ROI[(rois != null) ? rois.length : 0];
final double w = width.getValue().doubleValue();
final double h = height.getValue().doubleValue();
try
{
if (rois != null)
{
for (int r = 0; r < rois.length; r++)
result[r] = ROIUtil.convertToRectangle(rois[r], w, h);
}
}
catch (InterruptedException e)
{
System.err.println("ROIToRectangle process interrupted !");
output.setValue(null);
return;
}
output.setValue(result);
}
@Override
public void declareInput(VarList inputMap)
{
inputMap.add("input", input);
inputMap.add("width", width);
inputMap.add("height", height);
}
@Override
public void declareOutput(VarList outputMap)
{
outputMap.add("output", output);
}
@Override
public String getMainPluginClassName()
{
return RoiBlocks.class.getName();
}
}
/**
*
*/
package plugins.stef.roi.bloc.convert;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginBundled;
import icy.plugin.interface_.PluginLibrary;
import icy.roi.ROI;
import icy.roi.ROIUtil;
import plugins.adufour.blocks.tools.roi.ROIBlock;
import plugins.adufour.blocks.util.VarList;
import plugins.adufour.vars.lang.VarDouble;
import plugins.adufour.vars.lang.VarROIArray;
import plugins.stef.roi.bloc.RoiBlocks;
/**
* Block to convert input ROI(s) to 2D rectangle type ROI(s) centered on the mass center.<br>
*
* @author Stephane
*/
public class ROIToRectangle extends Plugin implements ROIBlock, PluginLibrary, PluginBundled
{
protected final VarROIArray input;
protected final VarDouble width;
protected final VarDouble height;
protected final VarROIArray output;
public ROIToRectangle()
{
super();
input = new VarROIArray("Roi(s)");
width = new VarDouble("Width", 1d);
height = new VarDouble("Height", 1d);
output = new VarROIArray("Rectangle roi(s)");
}
@Override
public void run()
{
final ROI[] rois = input.getValue();