Skip to content
Snippets Groups Projects
Commit 26b58f91 authored by Stéphane  DALLONGEVILLE's avatar Stéphane DALLONGEVILLE
Browse files

Updated for Icy kernel 2.4.0 (interruptible process)

parent 0a6fecc0
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,11 @@
<parent>
<artifactId>parent-pom-plugin</artifactId>
<groupId>org.bioimageanalysis.icy</groupId>
<version>1.0.3</version>
<version>1.0.6</version>
</parent>
<artifactId>roi-intensity-evolution</artifactId>
<version>2.1.0</version>
<version>2.1.1</version>
<packaging>jar</packaging>
......
......@@ -40,7 +40,7 @@ public class ROIAnalysis
ReentrantLock initLock = new ReentrantLock();
public ROIAnalysis(ROI roi, Sequence sequence, String description, double threshold, boolean overthreshold,
double scaling)
double scaling) throws InterruptedException
{
try
{
......@@ -87,7 +87,7 @@ public class ROIAnalysis
}
};
private void fillSeriesNoLock(double threshold, boolean overthreshold, double areaScale)
private void fillSeriesNoLock(double threshold, boolean overthreshold, double areaScale) throws InterruptedException
{
for (int c = 0; c < sequence.getSizeC(); c++)
{
......@@ -228,7 +228,7 @@ public class ROIAnalysis
}
}
public void fillSeries(double threshold, boolean overthreshold, double scale)
public void fillSeries(double threshold, boolean overthreshold, double scale) throws InterruptedException
{
try
{
......
......@@ -50,6 +50,7 @@ import icy.gui.frame.IcyFrame;
import icy.gui.frame.IcyFrameEvent;
import icy.gui.frame.IcyFrameListener;
import icy.gui.frame.progress.AnnounceFrame;
import icy.gui.frame.progress.FailedAnnounceFrame;
import icy.gui.main.GlobalROIListener;
import icy.gui.main.GlobalSequenceListener;
import icy.image.IcyBufferedImage;
......@@ -244,7 +245,7 @@ public class ROIIntensityEvolution extends PluginActionable
}
public static ArrayList<ROIAnalysis> analyseRoisInSequence(Sequence seq, boolean useRealScales, double threshold,
boolean pixelAboveThreshold)
boolean pixelAboveThreshold) throws InterruptedException
{
ArrayList<ROI> toFill = seq.getROIs();
ArrayList<ROIAnalysis> analyzed = new ArrayList<ROIAnalysis>();
......@@ -913,25 +914,26 @@ public class ROIIntensityEvolution extends PluginActionable
seriesToFillCondition.await();
toFill.addAll(seriesToFill);
seriesToFill.clear();
// fill the series
if (selectedSequence != null)
fillSeries(toFill, selectedSequence);
else
SwingUtilities.invokeLater(ROIIntensityEvolution.this::updateDisplay);
}
catch (InterruptedException e)
{
e.printStackTrace();
new FailedAnnounceFrame("ROI intensity evolution process interrupted..");
}
finally
{
seriesToFillLock.unlock();
}
// fill the series
if (selectedSequence != null)
fillSeries(toFill, selectedSequence);
else
SwingUtilities.invokeLater(ROIIntensityEvolution.this::updateDisplay);
}
}
}
private void fillSeries(ArrayList<ROI> toFill, Sequence selectedSequence)
void fillSeries(ArrayList<ROI> toFill, Sequence selectedSequence) throws InterruptedException
{
if (toFill.isEmpty())
return;
......
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