@@ -0,0 +1,2422 @@
+package fiji.plugin.filamentdetector.tests;%0A%0Aimport java.util.List;%0A%0Aimport org.scijava.Context;%0Aimport org.scijava.log.LogService;%0A%0Aimport fiji.plugin.filamentdetector.detection.DetectionParameters;%0Aimport fiji.plugin.filamentdetector.detection.FilamentsDetector;%0Aimport fiji.plugin.filamentdetector.kymograph.KymographGenerator;%0Aimport fiji.plugin.filamentdetector.model.Filaments;%0Aimport fiji.plugin.filamentdetector.model.TrackedFilaments;%0Aimport fiji.plugin.filamentdetector.tracking.FilamentsTracker;%0Aimport fiji.plugin.filamentdetector.tracking.TrackingParameters;%0Aimport ij.plugin.frame.RoiManager;%0Aimport net.imagej.Dataset;%0Aimport net.imagej.ImageJ;%0Aimport net.imagej.display.ImageDisplay;%0A%0Apublic class TestKymograph %7B%0A%0A%09public static void main(final String... args) throws Exception %7B%0A%09%09final ImageJ ij = net.imagej.Main.launch(args);%0A%09%09final Context context = ij.getContext();%0A%0A%09%09LogService log = ij.log();%0A%0A%09%09String fpath = %22/home/hadim/.doc/Code/Postdoc/ij/testdata/seeds.tif%22;%0A%09%09Dataset dataset = ij.dataset().open(fpath);%0A%09%09ij.ui().show(dataset);%0A%0A%09%09ImageDisplay imageDisplay = ij.imageDisplay().getActiveImageDisplay();%0A%0A%09%09// Detect filaments%0A%09%09DetectionParameters params = new DetectionParameters();%0A%09%09FilamentsDetector detector = new FilamentsDetector(ij.context(), imageDisplay, params);%0A%09%09detector.detect();%0A%09%09Filaments filaments = detector.getFilaments();%0A%0A%09%09log.info(%22Filaments : %22 + filaments.size());%0A%0A%09%09// Track filaments over time%0A%09%09TrackingParameters trackingParameters = new TrackingParameters();%0A%09%09FilamentsTracker tracker = new FilamentsTracker(ij.context(), filaments, trackingParameters);%0A%09%09tracker.track();%0A%09%09TrackedFilaments trackedFilaments = tracker.getTrackedFilaments();%0A%0A%09%09log.info(%22Tracked filaments : %22 + trackedFilaments.size());%0A%09%09%0A%09%09// Generate kymographs%0A%09%09KymographGenerator kymographGenerator = new KymographGenerator(context);%0A%09%09kymographGenerator.setImageDisplay(imageDisplay);%0A%09%09kymographGenerator.setTrackedFilaments(trackedFilaments);%0A%09%09%0A%09%09kymographGenerator.getKymographParameters().setShowKymographs(false);%0A%09%09kymographGenerator.getKymographParameters().setSaveKymographLines(true);%0A%09%09kymographGenerator.getKymographParameters().setSaveKymographs(false);%0A%09%09%0A%09%09kymographGenerator.build();%0A%09%09%0A%09%09List%3CDataset%3E kymographs = kymographGenerator.getKymographs();%0A%09%09log.info(kymographs);%0A%09%09%0A%09%09RoiManager rm = RoiManager.getRoiManager();%0A%09%09rm.runCommand(%22Show All%22);%0A%09%09%0A%09%7D%0A%7D%0A

Set test for kymograph builder