PhysiCell icon indicating copy to clipboard operation
PhysiCell copied to clipboard

find coordinates of a cell

Open sessler opened this issue 1 year ago • 2 comments

I have not found the name of certain variables. To clarify why I need them, I will shortly describe my scenario.

This is a wound healing essay, where cells have two state: if a cell has 4 neighbors it will become quiescent, when it has less, it will transition back to proliferating cell. When 90% of cells have turned into quiescent cells, a scratch is introduced by deleting cells in the middle of the simulation area. After this, the simulation is continued for three more simulated days.

As I have read, the neighbor array is not used presently. I would need:

  • the coordinates of a cell (I also need this to "inflict" the wound)
  • and the variable, where the end of the simulation is stored.

Thank you. Judit Sessler

sessler avatar Apr 14 '23 09:04 sessler

To obtain the coords of a cell, you can use pC->position[0] for X (and [1]=Y, [2]=Z) where pC is a pointer to a cell. Rf to various sample projects' custom.cpp that do this, e.g., predator prey.

For your primary goal of changing cell cycle based on # of neighbors, you might experiment with using simple_pressure (in the cell's state) instead of manually testing for # neighbors yourself. And in PhysiCell 1.11.0, you can use signals and behaviors and modify a cell cycle. See the interactions sample project's custom.cpp, for example, which does this (and more).

rheiland avatar Apr 14 '23 13:04 rheiland

Thanks very much for the speedy reply!!!

Randy Heiland @.***> ezt írta (időpont: 2023. ápr. 14., P, 15:01):

To obtain the coords of a cell, you can use pC->position[0] for X (and [1]=Y, [2]=Z) where pC is a pointer to a cell. Rf to various sample projects' custom.cpp that do this, e.g., predator prey.

For your primary goal of changing cell cycle based on # of neighbors, you might experiment with using simple_pressure (in the cell's state) instead of manually testing for # neighbors yourself. And in PhysiCell 1.11.0, you can use signals and behaviors and modify a cell cycle. See the interactions sample project's custom.cpp, for example, which does this (and more).

— Reply to this email directly, view it on GitHub https://github.com/MathCancer/PhysiCell/issues/151#issuecomment-1508472462, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHQ47UHA5HIU7EX6DMXVLLXBFDDPANCNFSM6AAAAAAW6GRI5Q . You are receiving this because you authored the thread.Message ID: @.***>

sessler avatar Apr 14 '23 14:04 sessler