How can I know the total count of cells for specific cell type?

10 months ago by
system: Windows 7
CC3D Version: 3.7.5
Community: CompuCell3D

1 Answer

10 months ago by

Assuming you have two cell types - Condensing and NonCondensing you could do the following:

    def step(self, mcs):

        print 'num condensing=', len(self.cellListByType(self.CONDENSING))
        print 'num noncondensing=', len(self.cellListByType(self.NONCONDENSING))

Alternatively, instead of using self.CONDENSING and self.NONCONDENSING you may use cell type ids directly (I assume Condensing has cell type id =1 and NonCondensing has cell type id =2):

    def step(self, mcs):

        print 'num condensing=', len(self.cellListByType(1))
        print 'num noncondensing=', len(self.cellListByType(2))
Please login to add an answer/comment or follow this question.

Similar posts:
Search »