PS : ImageJ : Breeds
 
"Breeds" are essentially plugins to the the Census plugin, and are the fundamental component of the Census measurent system. Conceptually, a digital image used in research has elements in them that need to be quantified, such as nuclei, probe stains, lattice branches, etc. Each of these elements has different requirements for identification. The simplest element might be adequately measured merely by noting that it is there (such as counting cell types in a blood smear). However, sometimes a complicated measurement is necessary (measuring the distribution of stained chromosome territory signal intensities within a nucleus).
The Census plugin itself treats these measurements the same, you just click on the element within the image and Census does the rest. All of the details of the measurements are define in the "Breed".

Point
Census comes with a few simple Breeds, useful both to measure simple elements, as well as to be starting points for writing your own. The simplest of these is the “point”. When you click on an image with Point as the active Breed, a 1 by 1 point is marked. This could be used simply to count the total number of objects in an image.

Circle
Circle is also a simple Breed. When you click on an image with Circle as the active Breed, a circular region is marked with the center at the point where you clicked. This Breed could also be used to simple count image objects: these markings are larger than the Point breed markings and can be easier to see on a large image. However they can also be used for simple measurements. For example, if an image contains red FISH probe strains which are smaller in size than the circle, then the total intensity of the red channel within the circle could be measured and used to compare intensities. Clicking the “IJ Measure” button will output the intensities for each object marked.

An example of making your own breed:
Let's say that the Circle breed fits your needs, but you need a bigger circle with a radius of 15 pixels. This is very easy to do. First, you would open the CircleBreed.java file in the census directory. You need to find the line that says radius=7 and change it to 15. Also, you need to rename the Class. Do this by finding the line that says “public class CircleBreed” and replace it with a new name, such as “public class Circle15Breed” (it has to end with "Breed")

package census;

import ij.*;
import ij.plugin.frame.PlugInFrame;
import ij.process.*;
import ij.gui.*;
import java.awt.event.*;
import java.awt.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;

public class Circle15Breed extends CensusObject {
    static final int radius = 15;
    
    
    public boolean find(int x, int y, ImagePlus img, int color) {
        super.find(x,y,img,color);
        roi = new OvalRoi(x-radius,y-radius,radius*2+1,radius*2+1);
        return true;
    }
    
    
}
Then, save this file with a new name. Call it Circle15Breed.java.

When you next start Census, it will detect the new file Circle15Breed.java (because it ends with "breed.java"), and compile it. Then, when Census starts, the Circle15 Breed should be in the list of breeds you can use. Whenever you click on the image, you will be measuring circles with radius of 15 pixels.

Pretty simple. The whole point of Census is to have a nice interface to measuring in a specific way, while minimizing the amount the user needs to change.

Note: one potential problem is with ImageJ and not Census itself. If you have errors about compiling the file, make sure that your ImageJ can compile a plugin. Sometime a few extra files need to be installed, and the ImageJ documentation can explain this.

Roi Breed
Sometimes the region of interest is not the same for every object. One such example would be a nucleus. With this kind of object, the Roi Breed becomes handy. This plugin will use the active marked Roi as the region to be marked. There is one trick to using this Breed. In order to mark a region of interest, say with the freehand ROI tool, you need to be able to click on the image without making a mark. You do this by selecting “None” on the “Active Color” line. This disables Census markings and allows ImageJ to behave normally. You can then use the freehand tool to draw your ROI. You can then go back to your active color (for example by pressing the “Blue” button on the “Active Color” line). Now just click anywhere on the image, and Census will use the active region marked as the region to be marked.
If the “Save” button is pressed, the ROI is saved to the same folder as the image with the image's name, then a timestamp, then the suffix ".roi". When you use the "Load" button, Census will reload all the RoiBreed marking you had saved earlier.
Note: this can be combined with other region marking tools. A personal favorite of mine is the excellent SplineSnake tool. Using this with Census active, I can run SplineSnake, easily circumscribe a nucleus, close the SpineSnake plugin, and use Census to make my measurements.

Wand Breed
This should be the most useful plugin of the ones available, however I need to find a good "wand" algorithm. What should happen is that when you click on an image, a contiguous roi will be selected around the spot, marking the edge of the object. This might use the infection point of an intensity gradient graph or something. For now I use the ImageJ “wand” tool, but this does not seem to work well for me at all.

ARnaDnaRatio Breed
I don't yet have the source for this on this website, as my research project using this has not yet been published. I include it here to show how specialized the census plugins can be. What I have are nuclei with RNA and DNA probes marked for certain genes. I can click on an image somewhere near an RNA DNA pair and I get the ratio of RAN and DNA intensities returned. The ARnaDnaRatio Breed does the following in the background:

  1. Based on the 2D projection image I have open, it opens the corresponding deconvoluted single-channel 16bit stack files for that spot pair.
  2. It uses a 3 pixel diameter sphere kernel to identify the brightest spot in 3D space near the point where I clicked (while subtracting adjacent background for each sphere tested). This is done for both red and green channels.
  3. A large set of statistics is outputted for each 3D sphere marked, including mean, mode, max, background intensities. The total signal intensity for the RNA channel is divided by the DNA channel for the ratio output.

Obviously writing a Breed like this is elaborate. However it does EXACTLY what I need, and once done, anyone in our lab can use it and merely by clicking on an image, perform the complicated processing described above.