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

Fixed a small bug on ROI track statistics (T position not properly updated)

parent 281361e7
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,8 @@ import org.math.plot.plots.Plot;
import icy.plugin.abstract_.Plugin;
import icy.plugin.interface_.PluginBundled;
import icy.roi.ROI;
import icy.roi.ROI2D;
import icy.roi.ROI3D;
import icy.roi.ROIDescriptor;
import icy.sequence.Sequence;
import icy.type.collection.CollectionUtil;
......@@ -48,8 +50,8 @@ public class ROITrackStatistics extends Plugin implements ROIBlock, PluginBundle
* @throws InterruptedException
* @throws UnsupportedOperationException
*/
public static void buildPlot(List<TrackGroup> trackGroups, Sequence sequence, int channel, ROIDescriptor descriptor,
Plot2DPanel plotPanel) throws UnsupportedOperationException, InterruptedException
public static void buildPlot(List<TrackGroup> trackGroups, Sequence sequence, int channel, ROIDescriptor descriptor, Plot2DPanel plotPanel)
throws UnsupportedOperationException, InterruptedException
{
final int sizeZ = (sequence != null) ? sequence.getSizeZ() : 1;
final double timeInterval = (sequence != null) ? sequence.getTimeInterval() : 1d;
......@@ -147,6 +149,12 @@ public class ROITrackStatistics extends Plugin implements ROIBlock, PluginBundle
if (descriptor.separateChannel() && (channel != -1))
roi = roi.getSubROI(-1, -1, channel);
// set ROI T position from detection T position
if (roi instanceof ROI2D)
((ROI2D) roi).setT(det.getT());
else if (roi instanceof ROI3D)
((ROI3D) roi).setT(det.getT());
if (roi.isEmpty())
{
xy[detInd] = new double[] {det.getT() * timeInterval, 0d};
......
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