-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathChangeLog
169 lines (109 loc) · 12.7 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
2018-05-04 Inge Wortel <[email protected]>
* Updated some examples in examples-node and example-browser to demonstrate torus.
2018-04-23 Inge Wortel <[email protected]>
* src/CPM.js (neighi2D, neighi3D ) : changed computation of neighborhood to create a
torus grid. Both functions have an argument torus (true by default). If torus is false,
the neighbors that cross the grid border are returned as NaN.
* src/CPMStats.js (getCentroidOf) : changed computation of centroids to account for
torus. New functions now return the pixel coordinates of connected components of a
cell (returnConnectedComponentsOfCell), compute the centroids of each (pixelsToCentroid),
and compute the weighted average of these centroids, corrected for crossing the border
(getCentroidOfCellWithTorus).
* src/CPMStats.js (getConnectedComponents, getConnectedness, getPercentageAct,
getCentroids ) : these functions now take an object cpi (result of this.cellpixelsi())
as an optional argument, to make code more efficient when several metrics are
computed on cpi.
2018-03-29 Inge Wortel <[email protected]>
* src/CPM.js : rewritten with new javascript "class" syntax. Also restructured the
code, implemented a dynamic computation of the hamiltonian. The attribute
"this.terms" contains the terms of the Hamiltonian to be considered. By default, the
terms are ["adhesion","volume","perimeter", "actmodel"]. The basic CPM class also
supports terms "connectivity" and "invasiveness", but these are not part of the
Hamiltonian by default. Add them by typing eg C.terms.push["connectivity"]. Changed
"var" to the new "const" and "let" wherever possible.
* src/CPM.js ( deltaH ) : computes the Hamiltonian depending on this.terms.
Also logs Hamiltonian terms to the console if this.logterms = true.
* src/CPM.js ( deltaHadhesion, deltaHvolume, deltaHperimeter, deltaHconnectivity,
deltaHinvasiveness, deltaHactmodel ) : new functions to compute the different terms
of the Hamiltonian.
* src/CPM.js ( deltaHconnectivity ) : changed so that it computes the cost appropriately
in a case where both the source and target cell have a non-zero lambda connectivity.
* src/CPM.js ( monteCarloStep ) : simplified, now computes Hamiltonian via a call to
deltaH instead of within the function itself.
* src/CPM.js ( neighi2D, neighi3D ) : changed order of output of
the neighbourhood pixels, which fixes the bug in the connectivity constraint.
* src/CPM.js ( neighC2D, neighC3D ) : changed into a method because the new class
syntax requires this.
* src/CPMchemotaxis.js : rewritten to extend the CPM class according to the new syntax.
This now also works in node.
* examples-node/run-2d-chemokine.js : added an example of chemotaxis in node.
* examples-node/Makefile : modified to make movie of the chemotaxis example.
* examples-node & examples-browser : added the line C.addStromaBorder() where
necessary to prevent cells from moving off te grid. (The stroma border was present by
default in an earlier version, but not anymore).
* src/CPMStats.js : changed computation of orderindex for normalized version, using
only the cellborderpixels.
2018-03-22 Inge Wortel <[email protected]>
* src/CPMStats.js : added functions to compute percentage of active pixels in a cell.
* src/CPMStats.js : added functions to compute order index of the act gradient in a cell.
2018-03-20 (2) Inge Wortel <[email protected]>
* src/BGCanvas.js : added special class to create a chemokine canvas to be copied
onto the CPMCanvas.
* src/CPMchemotaxis.js : instead of altering CPMCanvas, now use BGCanvas.
* examples-node/2d-chemokine.html : added example of chemotaxis
2018-03-20 Inge Wortel <[email protected]>
* src/CPMCanvas.js : small change in creating canvas in line with commit in jtextor
* src/CPMStats.js : Added functions from jtextor to compute "connectedness" of the cell
* examples-node/run-2d.js : now logs connectedness to the console.
2018-03-15 Inge Wortel <[email protected]>
* src/CPM.js (pointAttractor) : small adjustment in pointAttractor
* src/CPMchemotaxis.js : added new class to extend the CPM with a chemokine gradient.
2018-03-06 Inge Wortel <[email protected]>
* src/CPM.js : adjusted the computation of X_BITS, Y_BITS, Z_BITS (number of bits was higher than necessary, which limited the possible grid size in 3D too much). Turned off the default generation of a stroma border.
* src/CPM.js ( addStromaBorder ) : this implementation did not work for 3D (produced stroma lines instead of planes at the grid border, so no real barrier for the cells). Instead, this now uses a new function addStromaPlane.
* src/CPMCanvas.js : changed the generation of the canvas in the html document so that its size depends on the field size and the wrap option (before, only the drawing of cells was wrapped, but not the canvas itself).
2018-02-28 Inge Wortel <[email protected]>
* src/CPMStats.js (getCentroids, getCentroidOf, centroids) : replaced separate 2D/3D functions with a single function. getCentroids and centroid now call getCentroidOf internally.
* src/CPMStats.js (updateOnline, newOnline, cellStats) : new functions to compute mean and variance of pixel coordinates in a given dimension (0,1,2 for x,y,z).
* src/CPMStats.js (getLengthOf, getRangeOf) : new functions to compute the length of a cell in a given dimension. getLengthOf actually returns the variance (a little more robust); getRangeOf returns the distance between the outer pixels in a given dimension.
* src/CPMCanvas.js (this.wrap) : an array "wrap" can now be passed to options, useful for displaying large grids. The grid is displayed as a smaller grid of size "wrap" with linked borders (using modulo operations on the coordinates). If left unspecified, this.wrap is [0,0,0] -- indicating no wrapping in x,y,and z dimensions. See also this.i2p (below).
* src/CPMCanvas.js (this.i2p) : replaces this.C.i2p to compute pixel coordinates for drawing. this.i2p also implements modulo operations for wrapping (see above), to convert grid coordinates to the coordinates on the smaller grid.
2018-01-29 Inge Wortel <[email protected]>
* src/CPMStats.js (centroids2D,centroids3D) : fixed eslint no-console error.
2018-01-29 Inge Wortel <[email protected]>
* ChangeLog : created.
* src/CPM.js (general) : merged with another version optimized for speed (fewer pixel coordinate to index conversions; see also other changes). Commented code and reordered some functions for easier annotation. Removed support for the torus option (linked grid border) and for cell nuclei. Removed use of LAMBDA_DIR.
* src/CPM.js (this.id2t) : attribute id2t renamed to t2k for consistency with variable naming in other functions (t for the cell id, k for the cellkind). Replaced calls to this.t2k with the functions cellKind and setCellKind wherever possible.
* src/CPM.js (this.centerofmass) : attribute centerofmass removed. The center of mass of each cell is no longer updated for every copy attempt, because this requires internal conversions from pixel index to coordinates (slow). Instead, the center of mass can still be computed for every MCS - see src/CPMstats.js.
* src/CPM.js (getCenterOfMass) : removed, because no longer needed now that center of mass is not tracked internally.
* src/CPM.js (pixt,pixk) : modified and renamed to pixti, pixki. The new functions work on pixel index i rather than coordinates p. pixt is still available for compatibility with other classes, but calls pixti internally.
* src/CPM.js (perconstraint) : modified and renamed to perconstrainti, which works on pixel index rather than coordinates p. Perimeter now only monitored for the two cells involved in the copy attempt (old type and new type) rather than all types in the neighborhood (because the perimeter can only change for the cells that gain or lose a pixel, tracking perimeter for other cells is redundant).
* src/CPM.js (activityAtArith, activityAtGeom) : modified to use pixel index i rather than coordinates p.
* src/CPM.js (connectivityConstraint) : modified to work with pixel index i rather than coordinates p.
* src/CPM.js (setpix,delpix) : modified to work with pixel index i rather than coordinates p, renamed to setpixi and delpixi. Center of mass no longer updated (see above). If setpix succeeds in a copy attempt into the last pixel of a cell, this cellid is now removed from the CPM (for consistency with delpix). Both setpix and delpix are still available for compatibility with other classes, but internally use setpixi and delpixi.
* src/CPM.js (updatebordernear) : modified to work with pixel index i rather than coordinates p, renamed to updateborderneari.
* src/CPM.js (isViable) : modified to work with pixel index i rather than coordinates p. However, this function is currently not used and always returns true.
* src/CPM.js (neigh) : commented out old functions to compute pixel neighborhood (neigh, neigh2D, and neigh3D), and replaced them with new functions that use pixel index instead of coordinates (neighi, neighi2D, neighi3D). This speeds up the CPM because much fewer conversions between pixel index and pixel coordinates are required, but is not compatible with the grid torus functionality (linked grid borders). This functionality has therefore been removed in this version (see other changes below).
* src/CPM.js (this.torus) : removed the torus functionality of the CPM (linked grid borders; see previous point for explanation). Instead, the outer pixels of every CPM are by default given a special "static" celltype (Stroma) that does not move and repels any cells that approach the grid border ( line this.addStromaBorder() ).
* src/CPM.js (addStromaBorder) : function added to add a stroma border to the CPM grid. All the outer pixels of the current grid will be converted to the stroma cellkind.
* src/CPM.js (fmodx,fmody,fmodz) : because of the removed torus functionality (see above), a modified modulus function is no longer required to compute pixel neighborhoods. This code has therefore been commented out, and fmodx, fmody, and fmodz now just return their input value.
* src/CPM.js (crossesBorder) : removed because this is no longer required without the torus option.
* src/CPM.js (monteCarloStep) : modified to work with pixel index i rather than coordinates p (no internal conversions anymore). Removed option of pohibiting copy attempts across the grid border (no longer necessary now the torus option is no longer supported). Simplified.
* src/CPM.js (neighC) : fixed bug in neighC2D and neighC3D (for computing neighborhoods for the connectivity constraint).
* src/CPM.js (killCell) : removed (not used anymore).
* src/CPM.js (isViable) : removed (not used anymore without support of cell nucleus).
* src/DiceSet.js (general) : commented.
* src/CPMGridManipulator (general) : commented code.
* src/CPMGridManipulator (doDivision2D) : Replaced the old getCenterOfMass() from the CPM object (no longer supported) with the new getCentroidOf() function from the CPMStats object. Moved the computation of the minimum volume (target volume of this cellkind minus 50 pixels) to the beginning so it is not repeated in the loop.
* src/CPMCanvas.js : commented.
* src/TrackCanvas.js : commented.
* src/CPMStats.js (general) : commented.
* src/CPMStats.js (getCentroids, centroids ) : created separate 2D and 3D functions (to avoid unnecessary 3rd coordinate for 2D simulations). Functions getCentroids() and centroids() are now wrappers that call the correct function depending on the grid dimensionality.
* src/CPMStats.js (getCentroidOf) : new function that computes the center of mass of a specific cell t. Wrapper calls either getCentroidOf2D or getCentroidOf3D depending on the dimensions of the grid. The output is an array with centroid coordinates - the same that was in the previous version returned by the old getCenterOfMass() function in CPM.js (which doesn't exist anymore).
* src/CPMStats.js (cellsOnNetwork) : changed to work with neighi/pixti instead of neigh/pixt in from the CPM class.
* src/CPMImageDumper.js : Removed. CPMCanvas does the same but better (supports both browser and node).
* examples-browser/basic-potts-model.html : some slight changes to make compatible with the stroma border that is now present around each grid. Updated conf of the CPM object and commented.
* examples-browser/2d.html : Commented and removed obsolete parameters from conf. Added a few other visualization examples and used two different celltypes.
* examples-browser/single-amoeboid-cell.html : Commented and removed obsolete parameters from conf. Added track to the right.
* examples-node/run-2d.js : Removed obsolete parameters from conf.
* examples-node/run-3d.js : fixed bug (conf had opt USE_CONNECTIVITY instead of LAMBDA_CONNECTIVITY, and Cstat.celltypeMap does not exist ). Added cells of two cellkinds (because parameters are also for two cellkinds).