diff --git a/LICENSE.txt~ b/LICENSE.txt~
deleted file mode 100644
index fc6dfdb..0000000
--- a/LICENSE.txt~
+++ /dev/null
@@ -1,17 +0,0 @@
-DoM_Utrecht plugin for ImageJ, generating kymographs
-Copyright (C) 2014 Eugene Katrukha, Jalmar Teeuw, Jens den Braber, Utrecht University
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
diff --git a/README.md~ b/README.md~
deleted file mode 100644
index 45f2309..0000000
--- a/README.md~
+++ /dev/null
@@ -1,13 +0,0 @@
-DoM_Utrecht-GPU
-===============
-
-Detection of Molecules (DoM) plugin for ImageJ, Utrecht University
-
-
This is open-source ImageJ plugin for analysis of single molecule microscopy images (superrsolution PALM/STORM, etc).
-
-
-For description and manual refer to Wiki page.
-
-
-Developed in Cell Biology group of Utrecht University.
-E-mail for any questions.
diff --git a/pom.xml b/pom.xml
index 9473d70..4c7a878 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
sc.fiji
DoM_
- 1.2.4
+ 1.2.5
DoM_Utrecht
Detection of Molecules plugin for ImageJ
diff --git a/release/DoM_-1.2.4.jar b/release/DoM_-1.2.5.jar
similarity index 52%
rename from release/DoM_-1.2.4.jar
rename to release/DoM_-1.2.5.jar
index da66d5e..4902c6e 100644
Binary files a/release/DoM_-1.2.4.jar and b/release/DoM_-1.2.5.jar differ
diff --git a/src/main/java/fiji/plugin/DOM/DOMConstants.java b/src/main/java/fiji/plugin/DOM/DOMConstants.java
index 5f76df4..e21c25e 100644
--- a/src/main/java/fiji/plugin/DOM/DOMConstants.java
+++ b/src/main/java/fiji/plugin/DOM/DOMConstants.java
@@ -2,33 +2,33 @@
public interface DOMConstants {
- public static final String DOMversion="1.2.4";
+ public static final String DOMversion="1.2.5";
public static final double FITRADIUS=3.0;
//order of results column in the table
- public static final int Col_X=0;
- public static final int Col_Y=1;
- public static final int Col_FrameN=2;
- public static final int Col_Xnm=3;
- public static final int Col_loc_errX=4;
- public static final int Col_Ynm=5;
- public static final int Col_loc_errY=6;
- public static final int Col_Znm=7;
- public static final int Col_loc_errZ=8;
- public static final int Col_AmplFit=9;
- public static final int Col_Amp_error=10;
- public static final int Col_BGfit=11;
- public static final int Col_BGfit_error=12;
- public static final int Col_SD_X=13;
- public static final int Col_SD_X_err=14;
- public static final int Col_SD_Y=15;
- public static final int Col_SD_Y_err=16;
- public static final int Col_Fp=17;
- public static final int Col_IntegrInt=18;
- public static final int Col_SNR=19;
- public static final int Col_chi=20;
- public static final int Col_IterN=21;
+ public static int Col_X=0;
+ public static int Col_Y=1;
+ public static int Col_FrameN=2;
+ public static int Col_Xnm=3;
+ public static int Col_loc_errX=4;
+ public static int Col_Ynm=5;
+ public static int Col_loc_errY=6;
+ public static int Col_Znm=7;
+ public static int Col_loc_errZ=8;
+ public static int Col_AmplFit=9;
+ public static int Col_Amp_error=10;
+ public static int Col_BGfit=11;
+ public static int Col_BGfit_error=12;
+ public static int Col_SD_X=13;
+ public static int Col_SD_X_err=14;
+ public static int Col_SD_Y=15;
+ public static int Col_SD_Y_err=16;
+ public static int Col_Fp=17;
+ public static int Col_IntegrInt=18;
+ public static int Col_SNR=19;
+ public static int Col_chi=20;
+ public static int Col_IterN=21;
public static final int Col_TrackID=22;
public static final int Col_ParticleID=23;
diff --git a/src/main/java/fiji/plugin/DOM/Import_MTrackJ.java b/src/main/java/fiji/plugin/DOM/Import_MTrackJ.java
index a1fce5f..4961627 100644
--- a/src/main/java/fiji/plugin/DOM/Import_MTrackJ.java
+++ b/src/main/java/fiji/plugin/DOM/Import_MTrackJ.java
@@ -15,14 +15,15 @@ public class Import_MTrackJ implements PlugIn {
double [] trackid;
double [] patid;
- double [] tracklength;
- long nPatNumber;
+ //double [] tracklength;
+ //long nPatNumber;
- SMLAnalysis sml_import = new SMLAnalysis();
+ SMLAnalysis smlImport = new SMLAnalysis();
@Override
public void run(String arg) {
String filename;
+ long nPatNumber;
IJ.register(Import_MTrackJ.class);
//if the function is called from macro and filename already provided
@@ -39,8 +40,9 @@ public void run(String arg) {
return;
filename = path+dgLoadMTrackJ.getFileName();
-
- sml_import.ptable.reset();
+ IJ.log(" --- DoM plugin version " + DOMConstants.DOMversion+ " --- ");
+ IJ.log("Loading MTrackJ file: "+filename);
+ smlImport.ptable.reset();
nPatNumber = 0;
int nTrackN = 0;
int nParticleN = 0;
@@ -61,15 +63,15 @@ public void run(String arg) {
{
nParticleN++;
nPatNumber++;
- sml_import.ptable.incrementCounter();
- sml_import.ptable.addValue("Abs_frame", (int)Float.parseFloat(line_array[5]));
- sml_import.ptable.addValue("X_(px)", Float.parseFloat(line_array[2]));
- sml_import.ptable.addValue("Y_(px)", Float.parseFloat(line_array[3]));
- sml_import.ptable.addValue("Channel", (int)Float.parseFloat(line_array[6]));
- sml_import.ptable.addValue("Slice", (int)Float.parseFloat(line_array[5]));
- sml_import.ptable.addValue("Frame", (int)Float.parseFloat(line_array[5]));
- sml_import.ptable.addValue("Track_ID", nTrackN);
- sml_import.ptable.addValue("Particle_ID", nParticleN);
+ smlImport.ptable.incrementCounter();
+ smlImport.ptable.addValue("Abs_frame", (int)Float.parseFloat(line_array[5]));
+ smlImport.ptable.addValue("X_(px)", Float.parseFloat(line_array[2]));
+ smlImport.ptable.addValue("Y_(px)", Float.parseFloat(line_array[3]));
+ smlImport.ptable.addValue("Channel", (int)Float.parseFloat(line_array[6]));
+ smlImport.ptable.addValue("Slice", (int)Float.parseFloat(line_array[5]));
+ smlImport.ptable.addValue("Frame", (int)Float.parseFloat(line_array[5]));
+ smlImport.ptable.addValue("Track_ID", nTrackN);
+ smlImport.ptable.addValue("Particle_ID", nParticleN);
}
}
@@ -84,25 +86,29 @@ public void run(String arg) {
}
- calculate_Tracks_Lengths();
- add_Tracks_Lengths();
- sml_import.showTable();
-
+ //calculate_Tracks_Lengths();
+ add_Tracks_Lengths(smlImport,calculate_Tracks_Lengths(smlImport));
+ smlImport.showTable();
+ IJ.log("Done loading "+Long.toString(nPatNumber)+" particles.");
}
}
//function calculating the number of detected particles per track
- void calculate_Tracks_Lengths()
+ public static double [] calculate_Tracks_Lengths(final SMLAnalysis sml_import)
{
int nCount,i;
int nCurrTrack, nMaxVal, nIniPosition;
+ long nPatNumber;
+
+ double [] trackid = sml_import.ptable.getColumnAsDoubles(6);
+ double [] patid = sml_import.ptable.getColumnAsDoubles(7);
+ nPatNumber = patid.length;
- tracklength = new double [(int) nPatNumber];
+ double [] tracklength = new double [(int) nPatNumber];
- trackid = sml_import.ptable.getColumnAsDoubles(6);
- patid = sml_import.ptable.getColumnAsDoubles(7);
+
nMaxVal = 0;
nCurrTrack = (int) trackid[0];
nIniPosition = 0;
@@ -134,16 +140,19 @@ void calculate_Tracks_Lengths()
}
}
-
+ return tracklength;
}
//function adding the number of detected particles per track to results table
- void add_Tracks_Lengths()
+ public static void add_Tracks_Lengths(final SMLAnalysis sml_import, final double [] tracklength)
{
int nCount;
//adding to final table
+ //init new column
sml_import.ptable.setValue("Track_Length", 0, tracklength[0]);
- for(nCount = 1; nCount TrackCoords;
//initializing Linker when no linking was performed
- SMLLinker( SMLAnalysis sml_, SMLDialog dlg_, Overlay ovTracks_, ImagePlus imp_)
+ SMLLinker( final SMLAnalysis sml_, final SMLDialog dlg_, final Overlay ovTracks_, final ImagePlus imp_)
{
settings = dlg_;
smllink = sml_;
@@ -68,7 +68,7 @@ public class SMLLinker {
}
//initializing Linker when linking was already performed
- SMLLinker(SMLAnalysis sml_)
+ SMLLinker(final SMLAnalysis sml_)
{
smllink = sml_;
@@ -89,6 +89,24 @@ public class SMLLinker {
nPatNumber = f.length;
}
+ //initialize for ShowTracks function only
+ SMLLinker( final SMLAnalysis sml_,final Overlay ovTracks_, final int indX, final int indY, final int indFrame, final int indTrack, final int indTrLength)
+ {
+ smllink = sml_;
+ ovTracks = ovTracks_;
+ //coordinates
+ x = smllink.ptable.getColumnAsDoubles(indX);
+ y = smllink.ptable.getColumnAsDoubles(indY);
+ //frame number
+ f = smllink.ptable.getColumnAsDoubles(indFrame);
+ //tracks ID
+ trackid = smllink.ptable.getColumnAsDoubles(indTrack);
+ //tracks length
+ tracklength = smllink.ptable.getColumnAsDoubles(indTrLength);
+ //total particles number
+ nPatNumber = f.length;
+ TrackCoords = new ArrayList();
+ }
void Link_Closest()
{
@@ -534,22 +552,24 @@ Color SwitchingColorPalette(int nNumber)
}
//adds all tracks from Results table to the overlay
- void addTracksToOverlay()
+ void addTracksToOverlay(boolean bUpdateVals)
{
int nCount=0;
int i, nPrevFrame, nCurrFrame;
int nTrackCount=0;
int nTrackLength, nTrackNumber;
-
- //table was sorted by track number
- //so let's update values
- //coordinates
- x = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_X);
- y = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_Y);
- //frame number
- f = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_FrameN);
- trackid = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_TrackID);
-
+ if(bUpdateVals)
+ {
+ //if table was sorted by track number
+ //let's update values
+ //coordinates
+ x = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_X);
+ y = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_Y);
+ //frame number
+ f = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_FrameN);
+ trackid = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_TrackID);
+ tracklength = smllink.ptable.getColumnAsDoubles(DOMConstants.Col_TrackLength);
+ }
//go through all table
while (nCountDoM v.1.2.4, "Detect Molecules", fiji.plugin.DOM.Detect_Molecules
-Analyze>DoM v.1.2.4, "Reconstruct Image", fiji.plugin.DOM.Reconstruct_Image
-Analyze>DoM v.1.2.4, "-"
-Analyze>DoM v.1.2.4, "Drift Correction", fiji.plugin.DOM.DriftCorrection
-Analyze>DoM v.1.2.4, "Load and Apply Drift Correction", fiji.plugin.DOM.LoadDriftCorrection
-Analyze>DoM v.1.2.4, "-"
-Analyze>DoM v.1.2.4>Z axis (astigmatism), "Make Z calibration", fiji.plugin.DOM.Z_Calibration
-Analyze>DoM v.1.2.4>Z axis (astigmatism), "Calculate Z values", fiji.plugin.DOM.Z_Calculation
-Analyze>DoM v.1.2.4>Z axis (astigmatism), "Save Z calibration", fiji.plugin.DOM.Z_Calibration("save")
-Analyze>DoM v.1.2.4>Z axis (astigmatism), "Load Z calibration", fiji.plugin.DOM.Z_Calibration("load")
-Analyze>DoM v.1.2.4>Z axis (astigmatism), "Show stored Z calibration", fiji.plugin.DOM.Z_Calibration("show")
-Analyze>DoM v.1.2.4, "-"
-Analyze>DoM v.1.2.4>Chromatic correction, "Make chromatic calibration", fiji.plugin.DOM.ColorCorrection
-Analyze>DoM v.1.2.4>Chromatic correction, "Table correction", fiji.plugin.DOM.ColorCorrection("table")
-Analyze>DoM v.1.2.4>Chromatic correction, "Image or stack correction", fiji.plugin.DOM.ColorCorrection("image")
-Analyze>DoM v.1.2.4>Chromatic correction, "Save current chromatic calibration", fiji.plugin.DOM.ColorCorrection("save")
-Analyze>DoM v.1.2.4>Chromatic correction, "Load chromatic calibration", fiji.plugin.DOM.ColorCorrection("load")
-Analyze>DoM v.1.2.4>Chromatic correction, "Show stored chromatic calibration", fiji.plugin.DOM.ColorCorrection("show")
-Analyze>DoM v.1.2.4, "-"
-Analyze>DoM v.1.2.4, "Link Particles to Tracks", fiji.plugin.DOM.Link_Particles
-Analyze>DoM v.1.2.4, "-"
-Analyze>DoM v.1.2.4, "Sort Results", fiji.plugin.DOM.Sort_Results
-Analyze>DoM v.1.2.4, "Load large Results Table", fiji.plugin.DOM.LoadLargeRT
-Analyze>DoM v.1.2.4, "-"
-Analyze>DoM v.1.2.4>Import, "ThunderSTORM import", fiji.plugin.DOM.Import_TS
-Analyze>DoM v.1.2.4>Import, "ONI import", fiji.plugin.DOM.Import_ONI
-Analyze>DoM v.1.2.4>Import, "MTrackJ import", fiji.plugin.DOM.Import_MTrackJ
-Analyze>DoM v.1.2.4>Import, "load old DoM .tif format", fiji.plugin.DOM.Load_Particles
-Analyze>DoM v.1.2.4>Export, "ThunderSTORM export", fiji.plugin.DOM.Export_TS
-Analyze>DoM v.1.2.4>Export, "ONI export", fiji.plugin.DOM.Export_ONI
-Analyze>DoM v.1.2.4>Export, "Fairy Dust export", fiji.plugin.DOM.Export_FD
-Analyze>DoM v.1.2.4>Export, "MTrackJ export", fiji.plugin.DOM.Export_MTrackJ
-Analyze>DoM v.1.2.4>Export, "save as old DoM .tif format", fiji.plugin.DOM.Save_Particles
+Analyze>DoM v.1.2.5, "Detect Molecules", fiji.plugin.DOM.Detect_Molecules
+Analyze>DoM v.1.2.5, "Reconstruct Image", fiji.plugin.DOM.Reconstruct_Image
+Analyze>DoM v.1.2.5, "-"
+Analyze>DoM v.1.2.5, "Drift Correction", fiji.plugin.DOM.DriftCorrection
+Analyze>DoM v.1.2.5, "Load and Apply Drift Correction", fiji.plugin.DOM.LoadDriftCorrection
+Analyze>DoM v.1.2.5, "-"
+Analyze>DoM v.1.2.5>Z axis (astigmatism), "Make Z calibration", fiji.plugin.DOM.Z_Calibration
+Analyze>DoM v.1.2.5>Z axis (astigmatism), "Calculate Z values", fiji.plugin.DOM.Z_Calculation
+Analyze>DoM v.1.2.5>Z axis (astigmatism), "Save Z calibration", fiji.plugin.DOM.Z_Calibration("save")
+Analyze>DoM v.1.2.5>Z axis (astigmatism), "Load Z calibration", fiji.plugin.DOM.Z_Calibration("load")
+Analyze>DoM v.1.2.5>Z axis (astigmatism), "Show stored Z calibration", fiji.plugin.DOM.Z_Calibration("show")
+Analyze>DoM v.1.2.5, "-"
+Analyze>DoM v.1.2.5>Chromatic correction, "Make chromatic calibration", fiji.plugin.DOM.ColorCorrection
+Analyze>DoM v.1.2.5>Chromatic correction, "Table correction", fiji.plugin.DOM.ColorCorrection("table")
+Analyze>DoM v.1.2.5>Chromatic correction, "Image or stack correction", fiji.plugin.DOM.ColorCorrection("image")
+Analyze>DoM v.1.2.5>Chromatic correction, "Save current chromatic calibration", fiji.plugin.DOM.ColorCorrection("save")
+Analyze>DoM v.1.2.5>Chromatic correction, "Load chromatic calibration", fiji.plugin.DOM.ColorCorrection("load")
+Analyze>DoM v.1.2.5>Chromatic correction, "Show stored chromatic calibration", fiji.plugin.DOM.ColorCorrection("show")
+Analyze>DoM v.1.2.5, "-"
+Analyze>DoM v.1.2.5, "Link Particles to Tracks", fiji.plugin.DOM.Link_Particles
+Analyze>DoM v.1.2.5, "Show Tracks", fiji.plugin.DOM.ShowTracks
+Analyze>DoM v.1.2.5, "-"
+Analyze>DoM v.1.2.5, "Sort Results", fiji.plugin.DOM.Sort_Results
+Analyze>DoM v.1.2.5, "Load large Results Table", fiji.plugin.DOM.LoadLargeRT
+Analyze>DoM v.1.2.5, "-"
+Analyze>DoM v.1.2.5>Import, "ThunderSTORM import", fiji.plugin.DOM.Import_TS
+Analyze>DoM v.1.2.5>Import, "TrackMate import", fiji.plugin.DOM.Import_TrackMate
+Analyze>DoM v.1.2.5>Import, "ONI import", fiji.plugin.DOM.Import_ONI
+Analyze>DoM v.1.2.5>Import, "MTrackJ import", fiji.plugin.DOM.Import_MTrackJ
+Analyze>DoM v.1.2.5>Import, "load old DoM .tif format", fiji.plugin.DOM.Load_Particles
+Analyze>DoM v.1.2.5>Export, "ThunderSTORM export", fiji.plugin.DOM.Export_TS
+Analyze>DoM v.1.2.5>Export, "ONI export", fiji.plugin.DOM.Export_ONI
+Analyze>DoM v.1.2.5>Export, "Fairy Dust export", fiji.plugin.DOM.Export_FD
+Analyze>DoM v.1.2.5>Export, "MTrackJ export", fiji.plugin.DOM.Export_MTrackJ
+Analyze>DoM v.1.2.5>Export, "save as old DoM .tif format", fiji.plugin.DOM.Save_Particles