We're Hiring!

Adding Data to a Table

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

Adding Data to a Table

Postby icaoberg » Mon Jan 24, 2011 7:03 pm

I am having an issue. We moved from a columnar data model to a row data model, meaning, instead of having one column and 173 rows, now we have 1 row with 173 columns. i am running the following code
Code: Select all
#icaoberg@cmu.edu - Login to OMERO
import omero, pslid3, numpy

execfile( 'login.py' );

#icaoberg@cmu.edu - Calculate SLF34 and SLF36
set = 'slf34'
iid = 4628
features = pslid3.calculateFeatures( session, gateway, iid, set )

resources = session.sharedResources()
repositories = resources.repositories()
flink = omero.model.ImageAnnotationLinkI()

# link features table   
table = resources.newTable( 1, 'iid' + str(iid) + '_' + set + '.h5' )
annotation = omero.model.FileAnnotationI()
annotation.file = table.getOriginalFile()
flink.link( omero.model.ImageI(iid, False), annotation )
session.getUpdateService().saveObject( flink )

columns = []
for i in range(len(features[1])):
      #create columns and append headers
      columns.append( omero.grid.DoubleColumn(features[0][i], features[0][i], []));
     
table.initialize( columns )
   
for i in range(len(features[1])):
        #add data to the columns
        columns[i].values.append( float(features[1][i]) ) 

table.addData( columns )


when you look at the columns, you get the following
Code: Select all
columns
Out[2]:
[object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.66
    description = SLF27.66
    values =
    {
        [0] = 0.544625946665
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.67
    description = SLF27.67
    values =
    {
        [0] = 2.02694732422
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.68
    description = SLF27.68
    values =
    {
        [0] = 0.759363566649
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.69
    description = SLF27.69
    values =
    {
        [0] = 4.21093689578
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.70
    description = SLF27.70
    values =
    {
        [0] = 0.822551551673
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.71
    description = SLF27.71
    values =
    {
        [0] = 1.81648018097
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.72
    description = SLF27.72
    values =
    {
        [0] = 16.2999363308
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.73
    description = SLF27.73
    values =
    {
        [0] = 1.8691681026
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.74
    description = SLF27.74
    values =
    {
        [0] = 2.35325686528
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.75
    description = SLF27.75
    values =
    {
        [0] = 0.0174453695829
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.76
    description = SLF27.76
    values =
    {
        [0] = 1.31444313534
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.77
    description = SLF27.77
    values =
    {
        [0] = -0.271935985637
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.78
    description = SLF27.78
    values =
    {
        [0] = 0.722621083439
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.37
    description = SLF33.37
    values =
    {
        [0] = 0.595203524095
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.38
    description = SLF33.38
    values =
    {
        [0] = 0.807421470632
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.39
    description = SLF33.39
    values =
    {
        [0] = 0.859023785364
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.40
    description = SLF33.40
    values =
    {
        [0] = 2.8636172924
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.41
    description = SLF33.41
    values =
    {
        [0] = 0.873855741431
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.42
    description = SLF33.42
    values =
    {
        [0] = 1.47497937524
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.43
    description = SLF33.43
    values =
    {
        [0] = 11.3476328987
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.44
    description = SLF33.44
    values =
    {
        [0] = 1.63826091473
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.45
    description = SLF33.45
    values =
    {
        [0] = 2.01521330573
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.46
    description = SLF33.46
    values =
    {
        [0] = 0.0197348126535
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.47
    description = SLF33.47
    values =
    {
        [0] = 1.00618750716
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.48
    description = SLF33.48
    values =
    {
        [0] = -0.429901660335
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.49
    description = SLF33.49
    values =
    {
        [0] = 0.817211171512
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.50
    description = SLF33.50
    values =
    {
        [0] = 0.562374956462
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.51
    description = SLF33.51
    values =
    {
        [0] = 0.56563725681
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.52
    description = SLF33.52
    values =
    {
        [0] = 0.898452264301
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.53
    description = SLF33.53
    values =
    {
        [0] = 2.78482797173
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.54
    description = SLF33.54
    values =
    {
        [0] = 0.881551242454
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.55
    description = SLF33.55
    values =
    {
        [0] = 1.47794608123
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.56
    description = SLF33.56
    values =
    {
        [0] = 11.280054636
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.57
    description = SLF33.57
    values =
    {
        [0] = 1.75396778513
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.58
    description = SLF33.58
    values =
    {
        [0] = 2.10100817512
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.59
    description = SLF33.59
    values =
    {
        [0] = 0.0195705140222
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.60
    description = SLF33.60
    values =
    {
        [0] = 0.960384622685
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.61
    description = SLF33.61
    values =
    {
        [0] = -0.443533072178
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.62
    description = SLF33.62
    values =
    {
        [0] = 0.834972546794
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.63
    description = SLF33.63
    values =
    {
        [0] = 0.537705526953
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.64
    description = SLF33.64
    values =
    {
        [0] = 0.638287262467
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.65
    description = SLF33.65
    values =
    {
        [0] = 0.901232752045
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.66
    description = SLF33.66
    values =
    {
        [0] = 3.23072689666
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.67
    description = SLF33.67
    values =
    {
        [0] = 0.872469069627
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.68
    description = SLF33.68
    values =
    {
        [0] = 1.61587055413
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.69
    description = SLF33.69
    values =
    {
        [0] = 13.2797911738
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.70
    description = SLF33.70
    values =
    {
        [0] = 1.86433832692
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.71
    description = SLF33.71
    values =
    {
        [0] = 2.24815587866
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.72
    description = SLF33.72
    values =
    {
        [0] = 0.0189543742635
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.73
    description = SLF33.73
    values =
    {
        [0] = 1.01628182404
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.74
    description = SLF33.74
    values =
    {
        [0] = -0.433595927104
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.75
    description = SLF33.75
    values =
    {
        [0] = 0.843024632859
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.76
    description = SLF33.76
    values =
    {
        [0] = 0.522411385665
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.77
    description = SLF33.77
    values =
    {
        [0] = 0.715398484098
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.78
    description = SLF33.78
    values =
    {
        [0] = 0.89134202357
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.79
    description = SLF33.79
    values =
    {
        [0] = 3.29115964971
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.80
    description = SLF33.80
    values =
    {
        [0] = 0.865601005379
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.81
    description = SLF33.81
    values =
    {
        [0] = 1.64277473746
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.82
    description = SLF33.82
    values =
    {
        [0] = 13.5051798148
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.83
    description = SLF33.83
    values =
    {
        [0] = 1.91540039626
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.84
    description = SLF33.84
    values =
    {
        [0] = 2.33221798017
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.85
    description = SLF33.85
    values =
    {
        [0] = 0.0185261764495
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.86
    description = SLF33.86
    values =
    {
        [0] = 1.05982958401
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.87
    description = SLF33.87
    values =
    {
        [0] = -0.414268712566
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.88
    description = SLF33.88
    values =
    {
        [0] = 0.838202205644
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.89
    description = SLF33.89
    values =
    {
        [0] = 0.506874148407
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.90
    description = SLF33.90
    values =
    {
        [0] = 0.942156602205
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.91
    description = SLF33.91
    values =
    {
        [0] = 0.879238993685
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.92
    description = SLF33.92
    values =
    {
        [0] = 3.89961105231
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.93
    description = SLF33.93
    values =
    {
        [0] = 0.85103631636
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.94
    description = SLF33.94
    values =
    {
        [0] = 1.79806734493
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.95
    description = SLF33.95
    values =
    {
        [0] = 16.0912763032
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.96
    description = SLF33.96
    values =
    {
        [0] = 1.9981938294
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.97
    description = SLF33.97
    values =
    {
        [0] = 2.47410181461
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.98
    description = SLF33.98
    values =
    {
        [0] = 0.017782065351
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.99
    description = SLF33.99
    values =
    {
        [0] = 1.15429950495
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.100
    description = SLF33.100
    values =
    {
        [0] = -0.388927381876
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.101
    description = SLF33.101
    values =
    {
        [0] = 0.8335558305
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.102
    description = SLF33.102
    values =
    {
        [0] = 0.471071246357
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.103
    description = SLF33.103
    values =
    {
        [0] = 1.95579844267
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.104
    description = SLF33.104
    values =
    {
        [0] = 0.868802152373
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.105
    description = SLF33.105
    values =
    {
        [0] = 7.45061917163
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.106
    description = SLF33.106
    values =
    {
        [0] = 0.810945862535
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.107
    description = SLF33.107
    values =
    {
        [0] = 2.54880794369
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.108
    description = SLF33.108
    values =
    {
        [0] = 31.7943208418
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.109
    description = SLF33.109
    values =
    {
        [0] = 2.25992255925
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.110
    description = SLF33.110
    values =
    {
        [0] = 2.89638314778
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.111
    description = SLF33.111
    values =
    {
        [0] = 0.0160170580921
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.112
    description = SLF33.112
    values =
    {
        [0] = 1.41380100598
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.113
    description = SLF33.113
    values =
    {
        [0] = -0.347586750638
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.114
    description = SLF33.114
    values =
    {
        [0] = 0.837556635544
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.1
    description = SLF27.1
    values =
    {
        [0] = 3908.0
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.2
    description = SLF27.2
    values =
    {
        [0] = 1001.0
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.3
    description = SLF27.3
    values =
    {
        [0] = 73.164790174
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.4
    description = SLF27.4
    values =
    {
        [0] = 3306989.4534
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.5
    description = SLF27.5
    values =
    {
        [0] = 101553.0
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.89
    description = SLF27.89
    values =
    {
        [0] = 0.960668420022
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.90
    description = SLF27.90
    values =
    {
        [0] = 0.0631872359475
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.9
    description = SLF27.9
    values =
    {
        [0] = 0.574221482331
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.10
    description = SLF27.10
    values =
    {
        [0] = 0.995068835141
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.11
    description = SLF27.11
    values =
    {
        [0] = 1.08268072289
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.12
    description = SLF27.12
    values =
    {
        [0] = 1.00205097571
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.13
    description = SLF27.13
    values =
    {
        [0] = 0.0033758315781
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.80
    description = SLF27.80
    values =
    {
        [0] = 21.3280450358
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.81
    description = SLF27.81
    values =
    {
        [0] = 0.955007280475
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.82
    description = SLF27.82
    values =
    {
        [0] = 0.889933607666
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.83
    description = SLF27.83
    values =
    {
        [0] = 0.88784590038
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.84
    description = SLF27.84
    values =
    {
        [0] = 0.0249611476499
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.79
    description = SLF27.79
    values =
    {
        [0] = 0.437271661775
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.1
    description = SLF31.1
    values =
    {
        [0] = 0.861958277198
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.2
    description = SLF31.2
    values =
    {
        [0] = 0.0408140381413
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.3
    description = SLF31.3
    values =
    {
        [0] = 0.0287557634536
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.4
    description = SLF31.4
    values =
    {
        [0] = 0.0183861493017
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.5
    description = SLF31.5
    values =
    {
        [0] = 0.0143117745998
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.6
    description = SLF31.6
    values =
    {
        [0] = 0.0128557442073
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.7
    description = SLF31.7
    values =
    {
        [0] = 0.0115662368309
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.8
    description = SLF31.8
    values =
    {
        [0] = 0.00812615582872
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.9
    description = SLF31.9
    values =
    {
        [0] = 0.00322586043865
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.10
    description = SLF31.10
    values =
    {
        [0] = 0.877381442269
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.11
    description = SLF31.11
    values =
    {
        [0] = 0.0388511913883
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.12
    description = SLF31.12
    values =
    {
        [0] = 0.0271628618114
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.13
    description = SLF31.13
    values =
    {
        [0] = 0.0164938282658
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.14
    description = SLF31.14
    values =
    {
        [0] = 0.0120645393453
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.15
    description = SLF31.15
    values =
    {
        [0] = 0.0100423042289
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.16
    description = SLF31.16
    values =
    {
        [0] = 0.0084582630989
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.17
    description = SLF31.17
    values =
    {
        [0] = 0.006187230218
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF31.18
    description = SLF31.18
    values =
    {
        [0] = 0.00335833937392
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.1
    description = SLF33.1
    values =
    {
        [0] = 0.881834148104
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.2
    description = SLF33.2
    values =
    {
        [0] = 0.0492735988288
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.3
    description = SLF33.3
    values =
    {
        [0] = 0.0274637393559
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.4
    description = SLF33.4
    values =
    {
        [0] = 0.0166804112114
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.5
    description = SLF33.5
    values =
    {
        [0] = 0.0105543844306
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.6
    description = SLF33.6
    values =
    {
        [0] = 0.00673759960834
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.7
    description = SLF33.7
    values =
    {
        [0] = 0.00405285827117
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.8
    description = SLF33.8
    values =
    {
        [0] = 0.00235756571833
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.9
    description = SLF33.9
    values =
    {
        [0] = 0.00104569447184
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.19
    description = SLF33.19
    values =
    {
        [0] = 0.0841270016444
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.20
    description = SLF33.20
    values =
    {
        [0] = 0.183097348063
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.21
    description = SLF33.21
    values =
    {
        [0] = 0.211945305861
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.22
    description = SLF33.22
    values =
    {
        [0] = 0.182573140719
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.23
    description = SLF33.23
    values =
    {
        [0] = 0.142435412137
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.24
    description = SLF33.24
    values =
    {
        [0] = 0.116351958328
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.25
    description = SLF33.25
    values =
    {
        [0] = 0.0540154282498
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.26
    description = SLF33.26
    values =
    {
        [0] = 0.0175968128194
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.27
    description = SLF33.27
    values =
    {
        [0] = 0.00785759217772
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.10
    description = SLF33.10
    values =
    {
        [0] = 0.343694973681
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.11
    description = SLF33.11
    values =
    {
        [0] = 0.164643406158
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.12
    description = SLF33.12
    values =
    {
        [0] = 0.136777379233
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.13
    description = SLF33.13
    values =
    {
        [0] = 0.115759072064
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.14
    description = SLF33.14
    values =
    {
        [0] = 0.0980761168305
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.15
    description = SLF33.15
    values =
    {
        [0] = 0.0863231937392
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.16
    description = SLF33.16
    values =
    {
        [0] = 0.0383006475055
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.17
    description = SLF33.17
    values =
    {
        [0] = 0.0115106908278
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.18
    description = SLF33.18
    values =
    {
        [0] = 0.00491451996087
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.28
    description = SLF33.28
    values =
    {
        [0] = 0.261451503901
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.29
    description = SLF33.29
    values =
    {
        [0] = 0.110008162406
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.30
    description = SLF33.30
    values =
    {
        [0] = 0.0986246785504
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.31
    description = SLF33.31
    values =
    {
        [0] = 0.0982121698834
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.32
    description = SLF33.32
    values =
    {
        [0] = 0.0974222596698
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.33
    description = SLF33.33
    values =
    {
        [0] = 0.0978259915567
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.34
    description = SLF33.34
    values =
    {
        [0] = 0.0951490736109
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.35
    description = SLF33.35
    values =
    {
        [0] = 0.0872938553762
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF33.36
    description = SLF33.36
    values =
    {
        [0] = 0.0540123050458
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.1
    description = SLF34.1
    values =
    {
        [0] = 1.04094188917
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.2
    description = SLF34.2
    values =
    {
        [0] = 0.0657742407584
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.3
    description = SLF34.3
    values =
    {
        [0] = 0.193976583257
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.4
    description = SLF34.4
    values =
    {
        [0] = 0.0740460544208
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.5
    description = SLF34.5
    values =
    {
        [0] = 0.0631872359475
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.6
    description = SLF34.6
    values =
    {
        [0] = -0.174758698191
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.7
    description = SLF34.7
    values =
    {
        [0] = -0.169898366421
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.8
    description = SLF34.8
    values =
    {
        [0] = -0.114161701139
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.9
    description = SLF34.9
    values =
    {
        [0] = 108.208132781
    }
},
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF34.10
    description = SLF34.10
    values =
    {
        [0] = 157.391425705
    }
}]


but if i look at the contents of the table object
Code: Select all
In [3]: features2 = table.read( range(len(table.getHeaders())), 0L, 0L );

In [4]: features2.columns[0]
Out[4]:
object #0 (::omero::grid::DoubleColumn)
{
    name = SLF27.66
    description =
    values =
    {
    }
}


as you can see, the table never recorded the data. i did cast the value as a float. since the column does show the data, why doesn't it get mapped by table.addData?

ivan
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA

Re: Adding Data to a Table

Postby jmoore » Tue Jan 25, 2011 9:08 am

Hi Ivan,

I think you're problem is the 3rd argument to table.read. Using:
Code: Select all
features2 = table.read( range(len(table.getHeaders())), 0L, table.getNumberOfRows() );

I get all the data back (that I put in). Can you give that a try and let me know how it works?

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Adding Data to a Table

Postby icaoberg » Wed Jan 26, 2011 4:01 pm

it works, thank you very much.
icaoberg
 
Posts: 145
Joined: Fri Sep 17, 2010 9:05 pm
Location: Pittsburgh, PA


Return to Developer Discussion

Who is online

Users browsing this forum: No registered users and 1 guest