@@ -0,0 +1,1442 @@
+/*%0A * OtoRing plugin%0A * %0A * Name must have an underscore _%0A * %0A * This is the entrypoint. The execution continues in ProcessaV6%0A * %0A * 2017 - VVS%0A */%0A%0Aimport ij.IJ;%0Aimport ij.ImagePlus;%0Aimport ij.gui.Roi;%0Aimport ij.plugin.filter.PlugInFilter;%0Aimport ij.process.ImageProcessor;%0A%0A/**%0A * OtoRing_%0A * %0A * Plugin to aid Otolith ring counting%0A * %0A * @author Vitor Vaz da Silva%0A *%0A */%0Apublic class OtoRing_ implements PlugInFilter%7B%0A%09protected ImagePlus image;%0A%09protected ImageProcessor iProc;%0A%09private Roi roi;%0A%09Option opcao = new Option();%0A%09%0A%09public int setup(String arg, ImagePlus image) %7B%0A%09%09if(arg.equals(%22about%22))%7B%0A%09%09%09showAbout();%0A%09%09%09return DONE;%0A%09%09%7D%0A%09%09this.image =image;%0A%09%09return DOES_ALL+ROI_REQUIRED;%0A%09%7D%0A%09private void showAbout()%7B%0A%09%09IJ.showMessage(%22Otolith Ring identifier%22,%0A%09%09%22%5CtThis plugin is an automatic attempt to identify rings of an otolith.%5Cn%22+%0A%09%09%22%5CtAfter opening an image containing an otolith, please select a line%5Cn%22+%0A%09%09%22that intersects the otolith along which rings are expected.%5Cn%22+%0A%09%09%22%5CtPlease send feedback to vsilva@deetc.isel.ipl.pt and patricia@ipimar.pt%5Cn%22%0A%09%09);%09%0A%09%7D%0A%09%0A%09%0A%09@Override%0A%09public void run(ImageProcessor ip) %7B%0A%09%09iProc=ip;%0A%09%09if(getROI())%7B%0A%09%09%09opcao.readParameters();%0A%09%09%09Process.exec(ip, roi, image, opcao);  // the algorithm%0A%09%09%7D%0A%09%7D%0A%09%0A%09private boolean getROI()%7B%0A%09%09roi = image.getRoi();%0A%09%09if (roi==null %7C%7C roi.getType()!=Roi.LINE) %7B%0A%09%09%09IJ.error(%22Line selection required.%22);%0A%09%09%09return false;%0A%09%09%7D%09%09%0A%09%09return true;%0A%09%7D%0A%0A%7D%0A

Create OtoRing_.java