Installation dev: Difference between revisions

From Bactimas
Jump to navigation Jump to search
(Created page with "====== A note to the developers ====== To add a new algorithm one has to do two things: **(a)** Write a class that implements the ITrackingAlgorithm interface (javadoc here: http://homer.zpr.fer.hr/bactimas/doku.php?id=javadoc:javadoc). These are the summaries of the requested methods: void beforeBatch(int firstFrameNo) Invoked before processing batch. void beforeStep(int frameNo) Invoked before every step(). java.lang.String g...")
 
No edit summary
 
Line 1: Line 1:
====== A note to the developers ======
== A note to the developers ==
To add a new algorithm one has to do two things:
To add a new algorithm one has to do two things:


**(a)** Write a class that implements the  ITrackingAlgorithm interface (javadoc here: http://homer.zpr.fer.hr/bactimas/doku.php?id=javadoc:javadoc).
*(a) Write a class that implements the  ITrackingAlgorithm interface (javadoc here: http://homer.zpr.fer.hr/bactimas/doku.php?id=javadoc:javadoc).


  These are the summaries of the requested methods:
  These are the summaries of the requested methods:
Line 33: Line 33:




**(b)** Append the full class name in the conf/all.algorithms file text file so that Bactimas can instantiate it at run time.
* (b)  Append the full class name in the conf/all.algorithms file text file so that Bactimas can instantiate it at run time.




Line 40: Line 40:


Recommended:
Recommended:
   * See the already available algorithms implementing the //ITrackingAlgorithm// interface.
   * See the already available algorithms implementing the //ITrackingAlgorithm// interface.
   * Consult the [[javadoc:javadoc|JavaDoc]] for the details.
   * Consult the [[javadoc:javadoc|JavaDoc]] for the details.

Latest revision as of 11:12, 18 July 2023

A note to the developers

To add a new algorithm one has to do two things:

These are the summaries of the requested methods:
   void beforeBatch(int firstFrameNo) 
            Invoked before processing batch.
   void beforeStep(int frameNo) 
            Invoked before every step().
   java.lang.String getAbbrev() 
            Algorihm name abbreviation, used for display in the frame tree.
   java.lang.String getClassName() 
            Class name, used for instantiation.
   java.lang.String getName() 
            A friendly name, to be shown to the user.
   void step(int frameNo, VPoint translation) 
            This is the main function to implement - the one that performs the tracking / segmentation.     
From within the these methods, primarily step() method, a develeoper has at his disposal the entire ImageJ library and several
additional Bactimas methods, such as (from the CurrentExperiment class):      
  
  ImagePlus getImagePlus(ImageStripType channel, int frameNo, String altFormat) 
     Returns the ImageJ's ImagePlus object for the given frameNo, channel and (not required) alternative image format (tif, jpg, ...) with png being default
  LinkedList<Bacteria> getBacteriasForFrame(int frameNo) getBacteriasForFrame(int frameNo)
     Returns the list of bacterias on the given frame.
  boolean saveROI(Roi roi, int frameNo, Bacteria b, int roiType) 
     Perists the (caluculated) roi for the bacteria b into the database.
  etc.
Also, it is probably helpful to take a look at the implementation of proposed "Copy And Adjust" algorihtm in the class:
  bactimas.algorithms.CopyAndAdjustAlgorithm implements ITrackingAlgorithm 


  • (b) Append the full class name in the conf/all.algorithms file text file so that Bactimas can instantiate it at run time.



Recommended:

 * See the already available algorithms implementing the //ITrackingAlgorithm// interface.
 * Consult the JavaDoc for the details.