Visualization of cells

This template is used to write a java class that describes the drawing of cells of different types depending on certain conditions.

import ru.biosoft.physicell.ui.AgentColorer;
import java.awt.Color;

public class Visualizer implements AgentColorer
{

   // class fields if needed

   @Override
   public Color[] findColors(Cell cell)
   {

      // Code that creates and returns an array where each element is a color. The array can contain 4, 2, or 1 element.
      // For example:
      // Color[] result = new Color[2];
      // result[0] = Color.cyan;
      // result[1] = new Color( 250, 138, 38 );
      // return result;

   }

   // additional methods if needed

}

Important

If the array (for example, result) that the findColors method returns consists of 4 colors, then:

  • result[0] - color of the internal contents of the cell.

  • result[1] - cell border color.

  • result[2] - цвет ядра клетки.

  • result[3] - цвет контура ядра.

If the array consists of 2 colors, then:

  • result[0] - color of the internal contents of the cell.

  • result[1] - cell border color.

If the array consists of 1 color, then the internal contents of the cell will be drawn with this color, and its border will be black.

In the last two cases, the nucleus of the cell will not be drawn.