This shows you the differences between two versions of the page.

Link to this comparison view

gs [2013/12/21 21:21]
gs [2014/06/05 14:23] (current)
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 implement ​new tracking/​segmentation algoritm you must implement ​the //ITrackingAlgorithm// interface\\ +**(a)** Write a class that implements ​the  ​ITrackingAlgorithm interface (javadoc here: http://homer.zpr.fer.hr/bactimas/doku.php?id=javadoc:​javadoc).
-Please consult the [[javadoc:​javadoc|JavaDoc]] for the details.+
-See the already available algorithms implementing the //​ITrackingAlgorithm//​ interface.+ 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. 
 +  * See the already available algorithms implementing the //​ITrackingAlgorithm//​ interface
 +  * Consult the [[javadoc:​javadoc|JavaDoc]] for the details.
-Once you've implemented the algorithm, insert it's full class name in the conf/​all.algorithms file so that BacTrack can instantiate it at run time. 
QR Code
QR Code gs (generated for current page)