ome / omero-wndcharm

Scripts for using Pychrm in OMERO
GNU General Public License v2.0
0 stars 2 forks source link

Why are there two column indices in saveFeatures? #28

Closed manics closed 10 years ago

manics commented 10 years ago

col.values[0][idx] = value from https://github.com/manics/omero-pychrm/blob/de46941d7fee1729ec92072b9d7959bd2c9e5468/OmeroPychrm/PychrmStorage.py#L202

(Question from @colettace)

manics commented 10 years ago

saveFeatures takes a set of features for a single image. col (apart from the first column which is just a long id) is a DoubleArrayColumn, which means each cell in that table column holds an array. DoubleArrayColumn.values holds multiple cells, so that addData can add multiple rows at the same time. Since I'm only adding a single row at a time I'm always using values[0]. [idx] is then an index into the array within that cell.