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

Merge branch 'add-xls-header' into 'master'

Update POM, add XLS head generation

See merge request !3
parents be26cac7 7f0140f8
No related branches found
No related tags found
1 merge request!3Update POM, add XLS head generation
...@@ -8,18 +8,18 @@ ...@@ -8,18 +8,18 @@
<parent> <parent>
<artifactId>pom-icy</artifactId> <artifactId>pom-icy</artifactId>
<groupId>org.bioimageanalysis.icy</groupId> <groupId>org.bioimageanalysis.icy</groupId>
<version>2.0.0</version> <version>2.1.0</version>
</parent> </parent>
<!-- Project Information --> <!-- Project Information -->
<artifactId>msd-track-processor</artifactId> <artifactId>msd-track-processor</artifactId>
<version>1.1.3</version> <version>1.1.4-SNAPSHOT</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>MSD Track Processor</name> <name>MSD Track Processor</name>
<description>Track Processor computing the MSD (Mean Square Displacement).</description> <description>Track Processor computing the MSD (Mean Square Displacement).</description>
<url>http://icy.bioimageanalysis.org/plugin/track-processor-msd/</url> <url>https://icy.bioimageanalysis.org/plugin/track-processor-msd/</url>
<inceptionYear>2020</inceptionYear> <inceptionYear>2020</inceptionYear>
<organization> <organization>
...@@ -58,52 +58,31 @@ ...@@ -58,52 +58,31 @@
</properties> </properties>
<profiles>
<profile>
<id>icy-plugin</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<!-- List of project's dependencies --> <!-- List of project's dependencies -->
<dependencies> <dependencies>
<!-- The core of Icy -->
<dependency>
<groupId>org.bioimageanalysis.icy</groupId>
<artifactId>icy-kernel</artifactId>
<version>${icy-kernel.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.bioimageanalysis.icy</groupId> <groupId>org.bioimageanalysis.icy</groupId>
<artifactId>jfreechart</artifactId> <artifactId>jfreechart</artifactId>
<version>${jfreechart.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.sourceforge.jexcelapi</groupId> <groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId> <artifactId>jxl</artifactId>
<version>${jxl.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bioimageanalysis.icy</groupId> <groupId>org.bioimageanalysis.icy</groupId>
<artifactId>spot-detection-utilities</artifactId> <artifactId>spot-detection-utilities</artifactId>
<version>${spot-detection-utilities.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bioimageanalysis.icy</groupId> <groupId>org.bioimageanalysis.icy</groupId>
<artifactId>distance-profiler</artifactId> <artifactId>distance-profiler</artifactId>
<version>${distance-profiler.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.bioimageanalysis.icy</groupId> <groupId>org.bioimageanalysis.icy</groupId>
<artifactId>track-manager</artifactId> <artifactId>track-manager</artifactId>
<version>${track-manager.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -238,7 +238,9 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac ...@@ -238,7 +238,9 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
if (useRealScalesBox.isSelected()) if (useRealScalesBox.isSelected())
{ {
int cnt = 0; int cnt = 0;
int row = 0; int row = 1; // Start from 1 because of table head
int cols = 0;
for (TrackSegment ts : trackPool.getTrackSegmentList()) for (TrackSegment ts : trackPool.getTrackSegmentList())
{ {
// Better to allow partially clipped tracks otherwise we cannot get MSD for them (Stephane) // Better to allow partially clipped tracks otherwise we cannot get MSD for them (Stephane)
...@@ -249,6 +251,10 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac ...@@ -249,6 +251,10 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
if (msd.length > 0) if (msd.length > 0)
{ {
// Get max cols for the table
if (msd.length > cols)
cols = msd.length;
System.out.println("track " + cnt); System.out.println("track " + cnt);
if (page != null) if (page != null)
...@@ -268,11 +274,22 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac ...@@ -268,11 +274,22 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
} }
} }
} }
// Write table head
if (page != null) {
XLSUtil.setCellString(page, 0, 0, "frame");
if (cols > 0) {
for (int c = 0; c < cols; c++) {
XLSUtil.setCellString(page, c+1, 0, String.valueOf(c));
}
}
}
} }
else else
{ {
int cnt = 0; int cnt = 0;
int row = 0; int row = 1; // Start from 1 because of table head
int cols = 0;
for (TrackSegment ts : trackPool.getTrackSegmentList()) for (TrackSegment ts : trackPool.getTrackSegmentList())
{ {
...@@ -284,6 +301,10 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac ...@@ -284,6 +301,10 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
if (msd.length > 0) if (msd.length > 0)
{ {
// Get max cols for the table
if (msd.length > cols)
cols = msd.length;
System.out.println("track " + cnt); System.out.println("track " + cnt);
if (page != null) if (page != null)
...@@ -302,6 +323,16 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac ...@@ -302,6 +323,16 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
} }
} }
} }
// Write table head
if (page != null) {
XLSUtil.setCellString(page, 0, 0, "frame");
if (cols > 0) {
for (int c = 0; c < cols; c++) {
XLSUtil.setCellString(page, c+1, 0, String.valueOf(c));
}
}
}
} }
if (workbook != null) if (workbook != 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