diff --git a/pom.xml b/pom.xml index 176cd2242a1181e62c279b245e1e9bd5af00f594..aad2a4ec64e03fdc03411728ae827e6cbac665c1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,12 +8,12 @@ <parent> <groupId>org.bioimageanalysis.icy</groupId> <artifactId>pom-icy</artifactId> - <version>3.0.0-a.2</version> + <version>3.0.0-a.3</version> </parent> <!-- Project Information --> <artifactId>water-shed-3d</artifactId> - <version>2.0.0-a.1</version> + <version>2.0.0-a.2</version> <name>Water Shed 3D</name> <description> @@ -70,12 +70,4 @@ <artifactId>mcib3d-core</artifactId> </dependency> </dependencies> - - <!-- Icy Maven repository (to find parent POM) --> - <repositories> - <repository> - <id>icy</id> - <url>https://nexus-icy.pasteur.cloud/repository/icy/</url> - </repository> - </repositories> </project> \ No newline at end of file diff --git a/src/main/java/plugins/tboudier/watershed3d/Watershed3d.java b/src/main/java/plugins/tboudier/watershed3d/Watershed3d.java index 7daffec071b8372b7c078f76a20f3eb6588891e4..725ae27741677c6279c564a63e8bbe1fcc6afe06 100644 --- a/src/main/java/plugins/tboudier/watershed3d/Watershed3d.java +++ b/src/main/java/plugins/tboudier/watershed3d/Watershed3d.java @@ -26,9 +26,6 @@ import mcib3d.image3d.processing.FastFilters3D; import mcib3d.image3d.regionGrowing.Watershed3D; import org.bioimageanalysis.icy.common.collection.array.ArrayUtil; import org.bioimageanalysis.icy.common.type.DataType; -import org.bioimageanalysis.icy.extension.plugin.PluginDescriptor; -import org.bioimageanalysis.icy.extension.plugin.PluginInstaller; -import org.bioimageanalysis.icy.extension.plugin.PluginLoader; import org.bioimageanalysis.icy.extension.plugin.annotation_.IcyPluginIcon; import org.bioimageanalysis.icy.extension.plugin.annotation_.IcyPluginName; import org.bioimageanalysis.icy.model.image.IcyBufferedImage; @@ -54,15 +51,11 @@ public class Watershed3d extends EzPlug implements Block { @Override protected void initialize() { - this.EZVarRad.setToolTipText( - "The radius is used to compute seeds automatically as local maxima of the image, when no sequence is selected for seeds."); + this.EZVarRad.setToolTipText("The radius is used to compute seeds automatically as local maxima of the image, when no sequence is selected for seeds."); this.EZSequence.setToolTipText("The signal image to be processed by watershed."); - this.EZSequence2.setToolTipText( - "The image containing the seeds for the watershed, if no sequence is selected, local maxima will be computed as seeds."); - this.EZVarThSignal.setToolTipText( - "Only the values from the signal image above this threshold will be processed by watershed"); - this.EZVarThSeeds - .setToolTipText("Only the values from the seeds image above this threshold will be used as seeds"); + this.EZSequence2.setToolTipText("The image containing the seeds for the watershed, if no sequence is selected, local maxima will be computed as seeds."); + this.EZVarThSignal.setToolTipText("Only the values from the signal image above this threshold will be processed by watershed"); + this.EZVarThSeeds.setToolTipText("Only the values from the seeds image above this threshold will be used as seeds"); super.addEzComponent(this.EZSequence); super.addEzComponent(this.EZSequence2); @@ -73,14 +66,6 @@ public class Watershed3d extends EzPlug implements Block { @Override protected void execute() { - // Stephane: try to uninstall the olds annoying version of the plugin silently - PluginDescriptor plugin = PluginLoader.getPlugin("plugins.tboudier.watershed3D.WatershedSeeded3D"); - if (plugin != null) - PluginInstaller.desinstall(plugin, false, false); - plugin = PluginLoader.getPlugin("plugins.tboudier.watershed3D.Watershed3D"); - if (plugin != null) - PluginInstaller.desinstall(plugin, false, false); - final Sequence signal = this.EZSequence.getValue(); DataType type = signal.getDataType(); @@ -130,20 +115,30 @@ public class Watershed3d extends EzPlug implements Block { IcyLogger.warn(this.getClass(), "basic type " + type + " not supported; converting to float"); for (int z = 0; z < nbSlice; z++) - arrayImg[z] = ((float[]) ArrayUtil.arrayToFloatArray(seeds.getDataXY(0, z, 0), - type.isSigned())); + arrayImg[z] = ((float[]) ArrayUtil.arrayToFloatArray(seeds.getDataXY(0, z, 0), type.isSigned())); seedsImg = new ImageFloat(arrayImg, "tmp", signal.getWidth()); break; } } else { - seedsImg = FastFilters3D.filterImage(signalImg, 4, this.EZVarRad.getValue().floatValue(), - this.EZVarRad.getValue().floatValue(), this.EZVarRad.getValue().floatValue(), 0, false); + seedsImg = FastFilters3D.filterImage( + signalImg, + 4, + this.EZVarRad.getValue().floatValue(), + this.EZVarRad.getValue().floatValue(), + this.EZVarRad.getValue().floatValue(), + 0, + false + ); } - final Watershed3D water = new Watershed3D(signalImg, seedsImg, this.EZVarThSignal.getValue().intValue(), - this.EZVarThSeeds.getValue().intValue()); + final Watershed3D water = new Watershed3D( + signalImg, + seedsImg, + this.EZVarThSignal.getValue().intValue(), + this.EZVarThSeeds.getValue().intValue() + ); final ImageHandler res = water.getWatershedImage3D(); final Sequence seqOut = new Sequence();