Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MSD Track Processor
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bioimage Analysis
MSD Track Processor
Commits
09b12404
Commit
09b12404
authored
2 years ago
by
Stéphane DALLONGEVILLE
Browse files
Options
Downloads
Patches
Plain Diff
Added file selection for XLS export
parent
93314fce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
src/main/java/plugins/fab/trackmanager/processors/TrackProcessorMSD.java
+18
-14
18 additions, 14 deletions
...lugins/fab/trackmanager/processors/TrackProcessorMSD.java
with
19 additions
and
15 deletions
pom.xml
+
1
−
1
View file @
09b12404
...
...
@@ -13,7 +13,7 @@
<!-- Project Information -->
<artifactId>
msd-track-processor
</artifactId>
<version>
1.1.
1
</version>
<version>
1.1.
2
</version>
<packaging>
jar
</packaging>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/plugins/fab/trackmanager/processors/TrackProcessorMSD.java
+
18
−
14
View file @
09b12404
...
...
@@ -29,7 +29,9 @@ import org.jfree.data.xy.XYSeries;
import
org.jfree.data.xy.XYSeriesCollection
;
import
icy.canvas.IcyCanvas
;
import
icy.gui.dialog.SaveDialog
;
import
icy.gui.util.GuiUtil
;
import
icy.main.Icy
;
import
icy.painter.Painter
;
import
icy.preferences.GeneralPreferences
;
import
icy.sequence.Sequence
;
...
...
@@ -188,18 +190,23 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
{
WritableWorkbook
workbook
=
null
;
WritableSheet
page
=
null
;
String
outputName
;
if
((
trackPool
.
getDisplaySequence
()
==
null
)
||
StringUtil
.
isEmpty
(
trackPool
.
getDisplaySequence
().
getFilename
()))
outputName
=
GeneralPreferences
.
getResultFolder
()
+
"Tracks"
;
else
outputName
=
trackPool
.
getDisplaySequence
().
getFilename
();
outputName
+=
".msd.xls"
;
if
(
xlsExport
)
{
String
outputName
;
if
(
Icy
.
getMainInterface
().
isHeadLess
())
{
if
((
trackPool
.
getDisplaySequence
()
==
null
)
||
StringUtil
.
isEmpty
(
trackPool
.
getDisplaySequence
().
getFilename
()))
outputName
=
GeneralPreferences
.
getResultFolder
()
+
"Tracks"
;
else
outputName
=
trackPool
.
getDisplaySequence
().
getFilename
();
outputName
+=
".msd.xls"
;
}
else
outputName
=
SaveDialog
.
chooseFileForResult
(
"XLS MSD export"
,
"tracks-msd"
,
".xls"
);
if
(
StringUtil
.
isEmpty
(
outputName
))
return
;
try
{
workbook
=
XLSUtil
.
createWorkbook
(
new
File
(
outputName
));
...
...
@@ -208,7 +215,6 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
{
e
.
printStackTrace
();
}
}
if
(
workbook
!=
null
)
...
...
@@ -380,8 +386,7 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
private
static
double
scaledSquaredDistance
(
Detection
d1
,
Detection
d2
,
double
sx
,
double
sy
,
double
sz
)
{
return
Math
.
pow
((
d1
.
getX
()
-
d2
.
getX
())
*
sx
,
2
)
+
Math
.
pow
((
d1
.
getY
()
-
d2
.
getY
())
*
sy
,
2
)
+
Math
.
pow
((
d1
.
getZ
()
-
d2
.
getZ
())
*
sz
,
2
);
return
Math
.
pow
((
d1
.
getX
()
-
d2
.
getX
())
*
sx
,
2
)
+
Math
.
pow
((
d1
.
getY
()
-
d2
.
getY
())
*
sy
,
2
)
+
Math
.
pow
((
d1
.
getZ
()
-
d2
.
getZ
())
*
sz
,
2
);
}
// public static double getScaledDistance(double x1, double y1, double z1, double x2, double y2, double z2)
...
...
@@ -467,8 +472,7 @@ public class TrackProcessorMSD extends PluginTrackManagerProcessor implements Ac
Rectangle2D
transformedChartRectangleInSequence
=
(
Rectangle2D
)
chartRectangleInSequence
.
clone
();
transformedChartRectangleInSequence
.
setRect
((-
chartRectangleInSequence
.
getWidth
()
/
2
)
*
(
1
d
/
scale
),
(-
chartRectangleInSequence
.
getHeight
()
/
2
)
*
(
1
d
/
scale
),
chartRectangleInSequence
.
getWidth
()
*
(
1
d
/
scale
),
(-
chartRectangleInSequence
.
getHeight
()
/
2
)
*
(
1
d
/
scale
),
chartRectangleInSequence
.
getWidth
()
*
(
1
d
/
scale
),
chartRectangleInSequence
.
getHeight
()
*
(
1
d
/
scale
));
Graphics2D
g2
=
(
Graphics2D
)
g
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment