Differences
This shows you the differences between two versions of the page.
gs [2013/11/05 16:37] igor created |
gs [2014/06/05 14:23] (current) igor |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | TODO: write this | + | ====== 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 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:javadoc|JavaDoc]] for the details. |