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

Updated for Icy kernel 2.4.0 (interruptible process)

parent 13eb7dff
No related branches found
No related tags found
No related merge requests found
......@@ -8,12 +8,12 @@
<parent>
<groupId>org.bioimageanalysis.icy</groupId>
<artifactId>parent-pom-plugin</artifactId>
<version>1.0.3</version>
<version>1.0.6</version>
</parent>
<!-- Project Information -->
<artifactId>path-intensity-profiler</artifactId>
<version>1.2.2</version>
<version>1.2.3</version>
<packaging>jar</packaging>
......
......@@ -11,6 +11,7 @@ import javax.swing.JComponent;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import icy.gui.dialog.MessageDialog;
import icy.gui.frame.progress.FailedAnnounceFrame;
import icy.math.Line3DIterator;
import icy.math.MathUtil;
import icy.roi.BooleanMask2D;
......@@ -18,6 +19,7 @@ import icy.roi.ROI;
import icy.roi.ROI2D;
import icy.roi.ROI3D;
import icy.sequence.Sequence;
import icy.system.IcyExceptionHandler;
import icy.type.collection.CollectionUtil;
import icy.type.geom.Line3D;
import icy.type.point.Point3D;
......@@ -171,6 +173,14 @@ public class PathIntensityProfiler extends EzPlug implements Block, EzStoppable
varWorkbook.setValue(
getPathIntensityProfil(sequence, validRois, varRealUnit.getValue().booleanValue(), getUI()));
}
catch (IllegalArgumentException e)
{
IcyExceptionHandler.handleException(e, true);
}
catch (InterruptedException e)
{
new FailedAnnounceFrame("Path intensity profile process interrupted..");
}
finally
{
// interactive mode
......@@ -187,8 +197,10 @@ public class PathIntensityProfiler extends EzPlug implements Block, EzStoppable
* Computes intensity profil along path (contour for area ROI) for the given list of ROI.
*
* @return result in a XLSX workbook where we have one sheet per ROI.
* @throws InterruptedException
*/
private static XSSFWorkbook getPathIntensityProfil(Sequence sequence, List<ROI> rois, boolean useRealUnit, EzGUI ui)
throws InterruptedException
{
final XSSFWorkbook result = (XSSFWorkbook) Workbooks.createEmptyWorkbook(WorkbookFormat.XLSX);
......@@ -401,8 +413,10 @@ public class PathIntensityProfiler extends EzPlug implements Block, EzStoppable
* Computes intensity profil along path (contour for area ROI) for the given list of ROI.<br>
*
* @return result in a XLSX workbook where we have one sheet per ROI.
* @throws InterruptedException
*/
public static XSSFWorkbook getPathIntensityProfil(Sequence sequence, List<ROI> rois, boolean useRealUnit)
throws InterruptedException
{
return getPathIntensityProfil(sequence, rois, useRealUnit, null);
}
......
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