create a dataset for 4.3.x
Posted: Wed Feb 22, 2012 3:47 am
- Code: Select all
dataset = conn.getUpdateService().saveAndReturnObject(dataset)
dataset_id = dataset.id.val
should do it.
Cheers,
~Josh
The OME community
https://www.openmicroscopy.org/community/
https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=1061
dataset = conn.getUpdateService().saveAndReturnObject(dataset)
dataset_id = dataset.id.val
session = conn.c.sf
gateway = session.createGateway()
dataset = omero.model.DatasetI()
dataset.name = omero.rtypes.rstring( name )
try:
dataset2 = gateway.saveAndReturnObject( dataset )
gateway.close()
except:
gateway.close()
ID=dataset2.getId().getValue()
session.createGateway()
dataset = omero.model.DatasetI()
dataset.name = omero.rtypes.rstring( name )
dataset = conn.getUpdateService().saveAndReturnObject( dataset )
ID=dataset.getId().getValue()