### How can I know the number of cells in a certain volume interval

60

views

0

I want to know the volume distribution of cells in the model.

Community: CompuCell3D

Probably easy way would be to check whether (cell.xCOM,cell.yCOM,cell.zCOM) lies within your interval (some min_x:some max_x,some min_y: some max_y, some min_z:some max_z), then quantifying how many cells do? If you wanted something fancier could find out the location of the boundary pixels and impose a stricter constraint maybe

written
9 weeks ago by
priyomadhyapok

It may not be possible to indirectly represent the volume of cells by limiting the intervals of each axis, because the shape of the cells is irregular and the length gap is very large on each axis. Can't it be retrieved directly through the cell specific volume value?

written
9 weeks ago by
dali Zan

### 1 Answer

0

Attached is a zip file with one approach. The space is divided up into cubes of a fixed size, then the number of cells of each type that have their center of mass in a particular cube is counted.

Scroll down to the bottom of the steppables file for the code. I've used ### to comment the counting routine.

The output looks like this;

So the first line says that for the cube 80<=x<100, 60<=y<80, z=0 there are 7 cells of type 1, 5 of type 2 and none of type 3.

The size of the cube is defined by "cubeEdge" in the steppables file.

File attached: CountCellsInVolume_cellsort_2D_growing_cells_mitosis_using_steppable.zip (11.19 KB)

Scroll down to the bottom of the steppables file for the code. I've used ### to comment the counting routine.

The output looks like this;

```
80 60 0 Type=1 #= 7 Type=2 #= 5 Type=3 #= 0
80 80 0 Type=1 #= 8 Type=2 #= 8 Type=3 #= 0
80 100 0 Type=1 #= 10 Type=2 #= 7 Type=3 #= 0
80 120 0 Type=1 #= 6 Type=2 #= 8 Type=3 #= 0
```

The first three columns are the x,y,z coordinates for the pixel nearest the origin in a box. 80,100,0 means a box 20 pixels in each direction (except Z since this is a 2D model) with 80=<x<100 and 100<=y<120. The model has three cells types, 1,2,3, and the counts of each cell type in each cube is given. So the first line says that for the cube 80<=x<100, 60<=y<80, z=0 there are 7 cells of type 1, 5 of type 2 and none of type 3.

The size of the cube is defined by "cubeEdge" in the steppables file.

File attached: CountCellsInVolume_cellsort_2D_growing_cells_mitosis_using_steppable.zip (11.19 KB)

Please login to add an answer/comment or follow this question.