conftest.py - py.test fixtures for gatewaytest
Copyright 2013 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt
Bases: omero.gateway.scripts.testdb_create.TestDBHelper
logs in as Author and returns the test image, creating it first if needed.
logs in as Author and returns the test image, creating it first if needed.
logs in as Author and returns the test image, creating it first if needed.
logs in as Author and returns the test image, creating it first if needed.
logs in as Author and returns the test image, creating it first if needed.
logs in as Author and returns the test image, creating it first if needed.
Returns a test helper gateway object.
Bases: object
Global Gateway configuration:
the default rendering settings object id.
default rendering options that don’t get saved in the rendering settings.
Bases: dict
Remove all items from the dictionary.
Returns a copy of this object.
Return the value for key if key is in the dictionary, else default. If default is not given, it defaults to None, so that this method never raises a KeyError.
Set key to value as string.
Get the boolean value of the provided input.
If the value is a boolean return the value. Otherwise check to see if the value is in [“true”, “yes”, “y”, “t”, “1”] and returns True if value is in the list
alias of _AnnotationLinkWrapper
Bases: omero.gateway.BlitzObjectWrapper
omero_model_AnnotationI class wrapper extends BlitzObjectWrapper.
Used for building queries in generic methods such as getObjects(“Annotation”)
Adds the AnnotationWrapper regklass to class registry
Parameters: | regklass (AnnotationWrapper subclass) – The wrapper class, E.g. DoubleAnnotationWrapper |
---|
Class method for creating AnnotationWrapper subclasses based on the type of annotation object, using previously registered mapping between OMERO types and wrapper classes
Parameters: |
|
---|---|
Returns: | Wrapped AnnotationWrapper object or None if obj.__class__ not registered |
Return type: | AnnotationWrapper subclass |
Class method for creating an instance of this AnnotationWrapper, setting ns and value and linking to the target.
Parameters: |
|
---|
Gets annotation namespace
Returns: | Namespace or None |
---|---|
Return type: | String |
Needs to be implemented by subclasses
Sets annotation namespace
Parameters: | val (String) – Namespace value |
---|
Needs to be implemented by subclasses
alias of _ArcWrapper
alias of _BinningWrapper
alias of _BlitzGateway
Bases: object
Object wrapper class which provides various methods for hierarchy traversing, saving, handling permissions etc. This is the ‘abstract’ super class which is subclassed by E.g. _ProjectWrapper, _DatasetWrapper etc. All objects have a reference to the BlitzGateway connection, and therefore all services are available for handling calls on the object wrapper. E.g listChildren() uses queryservice etc.
Checks links are loaded and returns a list of Annotation Links filtered by namespace if specified
Parameters: | ns (String) – Namespace |
---|---|
Returns: | List of Annotation Links on this object |
Return type: | List of Annotation Links |
Returns the wrapper class of children of this object. Checks that this is one of the Wrapper objects in the omero.gateway module Raises NotImplementedError if this is not true or class is not defined (None) This is used internally by the listChildren() and countChildren() methods.
Returns: | The child wrapper class. E.g. omero.gateway.DatasetWrapper.__class__ |
---|---|
Return type: | class |
Returns the wrapper classes of the parent of this object. This is used internally by the listParents() method.
Returns: | List of parent wrapper classes. E.g. omero.gateway.DatasetWrapper.__class__ |
---|---|
Return type: | class |
Used for building queries in generic methods such as getObjects(“Project”)
Saves the annotation to DB if needed, setting the permissions manually. Creates the annotation link and saves it, setting permissions manually. TODO: Can’t set permissions manually in 4.2
- Assumes world & group writable
Parameters: | ann (AnnotationWrapper) – The annotation object |
---|
Saves the object to DB if needed - setting the permissions manually. Creates the object link and saves it, setting permissions manually. TODO: Can’t set permissions manually in 4.2
- Assumes world & group writable
Parameters: | obj (BlitzObjectWrapper) – The object to link |
---|
Lists available child objects.
Return type: | generator of Ice client proxy objects for the child nodes |
---|---|
Returns: | child objects. |
Loads the annotation links and annotations for the object (if not already loaded) and saves them to the object. Also loads file for file annotations.
Moves this object from a parent container (first one if there are more than one) to a new parent. TODO: might be more useful if it didn’t assume only 1 parent - option allowed you to specify the oldParent.
Parameters: | newParent – The new parent Object Wrapper. |
---|---|
Returns: | True if moved from parent to parent. False if no parent exists or newParent has mismatching type |
Return type: | Boolean |
Returns the value of the Value + Unit object. If units is true, return the omero model unit object, e.g. omero.model.LengthI e.g. _unwrapunits(obj).getValue() == 10 e.g. _unwrapunits(obj).getUnit() == NANOMETER # unit enum e.g. _unwrapunits(obj).getSymbol() == “nm” If units specifies a valid unit for the type of value, then we convert E.g. _unwrapunits(obj, units=”MICROMETER”).getValue() == 10000
Parameters: |
|
---|---|
Returns: | Value or omero.model units |
Determines if the current user can annotate this object: ie create annotation links. The canAnnotate() property is set on the permissions of every object as it is read from the server, based on the current user, event context and group permissions.
Return type: | Boolean |
---|---|
Returns: | True if user can Annotate this object |
Specifies whether the current user can move this object to another group. Web client will only allow this for the data Owner. Admin CAN move other user’s data, but we don’t support this in Web yet.
Determines if the current user can Delete the object
Determines if the current user can Edit (E.g. name, description) link (E.g. Project, Dataset, Image etc) or Delete this object. The canEdit() property is set on the permissions of every object as it is read from the server, based on the current user, event context and group permissions.
Return type: | Boolean |
---|---|
Returns: | True if user can Edit this object Delete, link etc. |
Determines whether user can create ‘hard’ links (Not annotation links). E.g. Between Project/Dataset/Image etc. Previously (4.4.6 and earlier) we only allowed this for object owners, but now we delegate to what the server will allow.
Delegates to the connection BlitzGateway.canWrite() method
Return type: | Boolean |
---|---|
Returns: | True if the objects’s permissions allow owner to write |
Delegates to the connection BlitzGateway.canWrite() method
Return type: | Boolean |
---|
Counts available number of child objects.
Returns: | The number of child objects available |
---|---|
Return type: | Long |
countChildren, but caching the first result, useful if you need to call this multiple times in a single sequence, but have no way of storing the value between them. It is actually a hack to support django template’s lack of break in for loops
Returns: | The number of child objects available |
---|---|
Return type: | Long |
Gets event time in timestamp format (yyyy-mm-dd hh:mm:ss.fffffff) when object was created.
Returns: | The datetime for object creation |
---|---|
Return type: | datetime.datetime |
Find the first child object with a matching name, and description if specified.
Parameters: |
|
---|---|
Returns: | The wrapped child object |
Return type: |
Get a list of Ancestors. First in list is parent of this object. TODO: Assumes getParent() returns a single parent.
Return type: | List of BlitzObjectWrapper |
---|---|
Returns: | List of Ancestor objects |
Gets the first annotation on the object, filtered by ns if specified
Parameters: | ns (String) – Namespace |
---|---|
Returns: | AnnotationWrapper or None |
Get a list of child objects links.
Parameters: | chids (Long) – List of children IDs |
---|---|
Return type: | List of BlitzObjectWrapper |
Returns: | List of child object links |
Returns the object’s acquisitionDate, or creation date (details.creationEvent.time)
Returns: | A datetime.datetime() object |
---|---|
Return type: | datetime |
Gets this object description
Returns: | String |
---|
Gets the details of the wrapped object
Returns: | DetailsWrapper or None if object not loaded |
---|---|
Return type: | DetailsWrapper |
Gets this object ID
Returns: | Long or None |
---|
Gets this object name
Returns: | String or None |
---|
Gets user who is the owner of this object.
Returns: | _ExperimenterWrapper |
---|
Gets full name of the owner of this object.
Returns: | String or None |
---|
Gets omeName of the owner of this object.
Returns: | String |
---|
List a single parent, if available.
While the model supports many to many relationships between most objects, there are implementations that assume a single project per dataset, a single dataset per image, etc. This is just a shortcut method to return a single parent object.
Parameters: | withlinks (Boolean) – if true result will be a tuple of (linkobj, obj) |
---|---|
Return type: | BlitzObjectWrapper or tuple(BlitzObjectWrapper, BlitzObjectWrapper) |
Returns: | the parent object with or without the link depending on args |
Get a list of parent objects links.
Parameters: | pids (Long) – List of parent IDs |
---|---|
Return type: | List of BlitzObjectWrapper |
Returns: | List of parent object links |
Returns True if the group that this object belongs to is lead by the currently logged-in user
Return type: | Boolean |
---|---|
Returns: | see above |
Returns True if the object owner is the same user specified in the connection’s Event Context
Return type: | Boolean |
---|---|
Returns: | True if current user owns this object |
Determines if the object is private
Return type: | Boolean |
---|---|
Returns: | True if the object is not public and not shared and permissions allow user to read. |
Determines if the object permissions are world readable, ie permissions.isWorldRead()
Return type: | Boolean |
---|---|
Returns: | see above |
Determines if the object is sharable between groups (but not public)
Return type: | Boolean |
---|---|
Returns: | True if the object is not public AND the object permissions allow group read. |
Link the annotation to this object.
Parameters: |
|
---|---|
Returns: | The annotation |
Return type: |
List annotations in the ns namespace, linked to this object
Returns: | Generator yielding AnnotationWrapper |
---|---|
Return type: | AnnotationWrapper generator |
Lists available child objects.
Return type: | generator of BlitzObjectWrapper objs |
---|---|
Returns: | child objects. |
Retrieve all Annotations not linked to the given Project, Dataset, Image, Screen, Plate, Well ID controlled by the security system.
Parameters: |
|
---|---|
Returns: | Generator yielding Tags |
Return type: | AnnotationWrapper generator |
Lists available parent objects.
Parameters: | withlinks (Boolean) – if true each yielded result will be a tuple of (linkobj, obj) |
---|---|
Return type: | list of BlitzObjectWrapper or tuple(BlitzObjectWrapper, BlitzObjectWrapper) |
Returns: | the parent objects, with or without the links depending on args |
Uses the delete service to delete annotations, with a specified ns, and their links on the object and any other objects. Will raise a omero.LockTimeout if the annotation removal has not finished in 5 seconds.
Parameters: | ns (String) – Namespace |
---|
Uses the updateService to save the wrapped object.
Return type: | None |
---|
Save this object, keeping the object owner the same as the one on provided details If the current user is an admin but is NOT the owner specified in ‘details’, then create a new connection for that owner, clone the current object under that connection and save. Otherwise, simply save.
Parameters: | details (DetailsWrapper) – The Details specifying owner to save to |
---|---|
Returns: | None |
Sets the description of the object
Parameters: | value (String) – New description |
---|
Sets the name of the object
Parameters: | value (String) – New name |
---|
Creates a dict representation of this object. E.g. for Image:
{'description': '', 'author': 'Will Moore', 'date': 1286332557.0,
'type': 'Image', 'id': 3841L, 'name': 'cb_4_w500_t03_z01.tif'}
Parameters: |
|
---|---|
Returns: | A dict representation of this object |
Return type: | Dict |
Submits request to unlink annotations, with specified ns
Parameters: | ns (String) – Namespace |
---|
Gets event time in timestamp format (yyyy-mm-dd hh:mm:ss.fffffff) when object was updated.
Returns: | The datetime for object update |
---|---|
Return type: | datetime.datetime |
Bases: omero.gateway.AnnotationWrapper
omero_model_BooleanAnnotationI class wrapper extends AnnotationWrapper.
alias of BooleanAnnotationI
Used for building queries in generic methods such as getObjects(“BooleanAnnotation”)
Gets boolean value
Returns: | Value |
---|---|
Return type: | Boolean |
Sets boolean value
Parameters: | val (Boolean) – Value |
---|
alias of _ChannelWrapper
Bases: object
Stores color internally as (R,G,B,A) and allows setting and getting in multiple formats
Class method for creating a ColorHolder from r,g,b,a values
Parameters: |
|
---|---|
Returns: | new Color object |
Return type: |
Gets the Alpha component
Returns: | alpha |
---|---|
Return type: | int |
Gets the Blue component
Returns: | blue |
---|---|
Return type: | int |
Gets the css string: rgba(r,g,b,a)
Returns: | css color |
---|---|
Return type: | String |
Gets the Green component
Returns: | green |
---|---|
Return type: | int |
Gets the html usable color. Dumps the alpha information. E.g. ‘FF0000’
Returns: | html color |
---|---|
Return type: | String |
Returns the color as an Integer
Returns: | Integer |
---|---|
Return type: | int |
Gets the (r,g,b) as a tuple.
Returns: | Tuple of (r,g,b) values |
---|---|
Return type: | tuple of ints |
Gets the Red component
Returns: | red |
---|---|
Return type: | int |
Set alpha, as int 0..255.
Parameters: | val – value of alpha. |
---|
Set Blue, as int 0..255
Parameters: | val (Int) – value of Blue. |
---|
Set green, as int 0..255
Parameters: | val (Int) – value of Green. |
---|
Set red, as int 0..255
Parameters: | val (Int) – value of Red. |
---|
Bases: omero.gateway.AnnotationWrapper
omero_model_CommentAnnotationI class wrapper extends AnnotationWrapper.
alias of CommentAnnotationI
Used for building queries in generic methods such as getObjects(“CommentAnnotation”)
Gets the value of the Comment
Returns: | Value |
---|---|
Type: | String |
Sets comment text value
Parameters: | val (String) – Value |
---|
alias of _DatasetWrapper
Bases: omero.gateway.BlitzObjectWrapper
omero_model_DetailsI class wrapper extends BlitzObjectWrapper.
Returns the Group that these details refer to
Returns: | Group |
---|---|
Return type: | ExperimenterGroupWrapper |
Returns the Owner of the object that these details apply to
Returns: | Owner |
---|---|
Return type: | ExperimenterWrapper |
alias of _DetectorSettingsWrapper
alias of _DetectorWrapper
alias of _DichroicWrapper
Bases: omero.gateway.AnnotationWrapper
omero_model_DoubleAnnotationI class wrapper extends AnnotationWrapper.
alias of DoubleAnnotationI
Used for building queries in generic methods such as getObjects(“DoubleAnnotation”)
Gets the value of the Double Annotation
Returns: | Value |
---|---|
Type: | Double |
Sets Double annotation value
Parameters: | val (Double) – Value |
---|
alias of _EnumerationWrapper
alias of _ExperimenterGroupWrapper
alias of _ExperimenterWrapper
alias of _FilamentWrapper
Bases: omero.gateway.AnnotationWrapper, omero.gateway.OmeroRestrictionWrapper
omero_model_FileAnnotationI class wrapper extends AnnotationWrapper.
alias of FileAnnotationI
Used for building queries in generic methods such as getObjects(“FileAnnotation”)
Returns an OriginalFileWrapper for the file. Wrapper object will load the file if it isn’t already loaded. File is cached to prevent repeated loading of the file.
Returns a generator yielding chunks of the file data.
Returns: | Data from file in chunks |
---|---|
Return type: | Generator |
Gets the file name
Returns: | File name |
---|---|
Return type: | String |
Looks up the size of the file in bytes
Returns: | File size (bytes) |
---|---|
Return type: | Long |
Not implemented
Checks if this file annotation is an ‘original_metadata’ file
Returns: | True if namespace and file name follow metadata convention |
---|---|
Return type: | Boolean |
Not implemented
alias of _FilesetWrapper
alias of _FilterSetWrapper
alias of _FilterWrapper
alias of _ImageStageLabelWrapper
alias of _ImageWrapper
alias of _ImagingEnviromentWrapper
alias of _ImagingEnvironmentWrapper
alias of _InstrumentWrapper
alias of _LaserWrapper
alias of _LightEmittingDiodeWrapper
alias of _LightPathWrapper
alias of _LightSettingsWrapper
Creates wrapper instances for omero.model light source objects
Parameters: |
|
---|---|
Returns: | _LightSourceWrapper subclass |
alias of _LogicalChannelWrapper
Bases: omero.gateway.AnnotationWrapper
omero_model_LongAnnotationI class wrapper extends AnnotationWrapper.
alias of LongAnnotationI
Used for building queries in generic methods such as getObjects(“LongAnnotation”)
Gets the value of the Long annotation
Returns: | Value |
---|---|
Type: | Long |
Sets long annotation value
Parameters: | val (Long) – Value |
---|
Bases: omero.gateway.AnnotationWrapper
omero_model_MapAnnotationI class wrapper.
alias of MapAnnotationI
Gets the value of the Map Annotation as a list of (key, value) tuples.
Returns: | List of tuples |
---|---|
Type: | String |
Sets value of the Map Annotation where val is a list of (key, value) tuples or [key, value] lists.
Parameters: | val (String) – List of tuples |
---|
alias of _MicroscopeWrapper
Bases: object
A dummy placeholder to indicate that proxies haven’t been created
alias of _OTFWrapper
alias of _ObjectiveSettingsWrapper
alias of _ObjectiveWrapper
Bases: object
Function or method wrapper that handles certain types of server side exceptions and debugging of errors.
Exception handler that is expected to be overridden by sub-classes. The expected behaviour is either to handle a type of exception and return the server side result or to raise the already thrown exception. The calling context is an except block and the original *args and **kwargs from the wrapped function or method are provided to allow re-execution of the original.
Parameters: | e (Exception) – The exception that has already been raised. |
---|
Bases: object
Determines if the current user can Download raw data linked to this object. The canDownload() property is set on objects: Image, Plate and FileAnnotation as it is read from the server, based on the current user, event context and group permissions.
Return type: | Boolean |
---|---|
Returns: | True if user can download. |
alias of _OriginalFileWrapper
alias of _PixelsWrapper
alias of _PlaneInfoWrapper
alias of _PlateAcquisitionWrapper
alias of _PlateWrapper
alias of _ProjectWrapper
Bases: object
Wrapper for services. E.g. Admin Service, Delete Service etc. Maintains reference to connection. Handles creation of service when requested.
Returns True if connected. If connection OK, wrapped service is also created.
Parameters: | forcejoin (Boolean) – if True forces the connection to only succeed if we can rejoin the current sessionid |
---|---|
Returns: | True if connection OK |
Return type: | Boolean |
Returns the wrapped service. If it is None, service is created.
Returns: | The wrapped service |
---|---|
Return type: | omero.api.ServiceInterface subclass |
For some reason, it seems that keepAlive doesn’t, so every so often I need to recreate the objects. Calls serviceFactory.keepAlive(service). If this returns false, attempt to create service.
Returns: | True if no exception thrown |
---|---|
Return type: | Boolean |
Reset refs to connection and session factory. Resets session creation function. Attempts to reload the wrapped service - if already created (doesn’t create service)
Parameters: | conn (BlitzGateway) – Connection |
---|
Creates and returns a new ProxyObjectWrapper with the same connection and service creation method name as this one.
Returns: | Cloned service wrapper |
---|---|
Return type: | ProxyObjectWrapper |
Closes the underlying service, so next call to the proxy will create a new instance of it.
Sets the tainted flag to True
Sets the tainted flag to False
alias of OmeroGatewaySafeCallWrapper
alias of _ScreenWrapper
Bases: omero.gateway.AnnotationWrapper
omero_model_BooleanAnnotationI class wrapper extends AnnotationWrapper.
alias of TagAnnotationI
Used for building queries in generic methods such as getObjects(“TagAnnotation”)
Gets the value of the Tag
Returns: | Value |
---|---|
Type: | String |
We override the listParents() to look for ‘Tag-Group’ Tags on this Tag
Sets Tag value
Parameters: | val (String) – Tag text value |
---|
Bases: omero.gateway.AnnotationWrapper
omero_model_TermAnnotationI class wrapper extends AnnotationWrapper.
only in 4.2+
alias of TermAnnotationI
Used for building queries in generic methods such as getObjects(“TermAnnotation”)
Gets the value of the Term
Returns: | Value |
---|---|
Type: | String |
Sets term value
Parameters: | val (String) – Value |
---|
Bases: omero.gateway.AnnotationWrapper
omero_model_TimestampAnnotationI class wrapper extends AnnotationWrapper.
alias of TimestampAnnotationI
Used for building queries in generic methods such as getObjects(“TimestampAnnotation”)
Returns a datetime object of the timestamp in seconds
Returns: | Timestamp value |
---|---|
Return type: | datetime.datetime |
Sets the timestamp value
Parameters: | val (datetime.datetime OR omero.RTime OR Long) – Timestamp value |
---|
alias of _TransmittanceRangeWrapper
alias of _WellSampleWrapper
alias of _WellWrapper
Bases: omero.gateway.CommentAnnotationWrapper
omero_model_XmlAnnotationI class wrapper extends CommentAnnotationWrapper.
alias of XmlAnnotationI
Bases: omero.gateway.BlitzObjectWrapper
omero_model_AnnotationLinkI class wrapper extends omero.gateway.BlitzObjectWrapper.
Gets the parent (Annotated Object) as a BlitzObjectWrapper, but attempts to wrap it in the correct subclass using L{KNOWN_WRAPPERS}, E.g. ImageWrapper
Bases: omero.gateway._FilamentWrapper
omero_model_ArcI class wrapper extends FilamentWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_BinningI class wrapper extends BlitzObjectWrapper.
Bases: object
Connection wrapper. Handles connecting and keeping the session alive, creation of various services, context switching, security privileges etc.
ICE_CONFIG - Defines the path to the Ice configuration
Close session.
Creates proxies to the server services. Called on connection or security switch. Doesn’t actually create any services themselves. Created if/when needed. If proxies have been created already, they are resynced and reused.
Creates a new session for the principal given in the constructor. Used during :meth`connect` method
Creates new omero.client object using self.host or self.ice_config (if host is None) Also tries to setAgent for the client
Applies the rendering settings from one image to others. Returns a dict of success { True:[ids], False:[ids] }
Parameters: |
|
---|
Prepares a query for iQuery. Also prepares params and determines appropriate wrapper for result Returns (query, params, wrapper) which can be used with the appropriate query method. Used by getObjects() and getObject() above.
Parameters: |
|
---|---|
Returns: | (query, params, wrapper) |
Checks if a user is in system group, i.e. can have administration privileges.
Returns: | Boolean |
---|
Returns isUserWrite() from the object’s permissions
Parameters: | obj – Given object |
---|---|
Returns: | True if the objects’s permissions allow owner to write |
Checks if a user has write privileges to the given object.
Parameters: | obj – Given object |
---|---|
Returns: | Boolean |
Change the Group for a specified objects using queue.
Parameters: |
|
---|
Change the permissions of a particular Group. Returns the proxy ‘prx’ handle that can be processed like this: callback = CmdCallbackI(self.gateway.c, prx) callback.loop(20, 500) rsp = prx.getResponse()
Returns a new instance of this class, with all matching properties. TODO: Add anonymous and userAgent parameters?
Returns: | Clone of this connection wrapper |
---|---|
Return type: | _BlitzGateway |
Creates or retrieves connection for the given sessionUuid. Returns True if connected.
Parameters: | sUuid – omero_model_SessionI |
---|---|
Returns: | Boolean |
Fetch all users contained in this group. The returned users will have all fields filled in and all collections unloaded.
Parameters: | gid (Long) – Group ID |
---|---|
Returns: | Generator of experimenters |
Return type: | ExperimenterWrapper generator |
Create an enumeration with given object
Parameters: | obj (omero.model.IObject) – Object |
---|
New instance of non cached Exporter, wrapped in ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Class method to create a FileAnnotationWrapper from a local file. File is uploaded to create an omero.model.OriginalFileI referenced from this File Annotation. Returns a new FileAnnotationWrapper
Parameters: |
|
---|---|
Returns: |
Creates a new ExperimenterGroup. Must have Admin permissions to call this.
Parameters: |
|
---|
Creates a new multi-dimensional image from the sequence of 2D numpy arrays in zctPlanes. zctPlanes should be a generator of numpy 2D arrays of shape (sizeY, sizeX) ordered to iterate through T first, then C then Z. Example usage:
original = conn.getObject("Image", 1)
sizeZ = original.getSizeZ()
sizeC = original.getSizeC()
sizeT = original.getSizeT()
clist = range(sizeC)
zctList = []
for z in range(sizeZ):
for c in clist:
for t in range(sizeT):
zctList.append( (z,c,t) )
def planeGen():
planes = original.getPrimaryPixels().getPlanes(zctList)
for p in planes:
# perform some manipulation on each plane
yield p
createImageFromNumpySeq(
planeGen(), imageName, sizeZ=sizeZ, sizeC=sizeC, sizeT=sizeT,
sourceImageId=1, channelList=clist)
Parameters: |
|
---|---|
Returns: | The new OMERO image: omero.model.ImageI |
Creates a OriginalFileWrapper from a local file. File is uploaded to create an omero.model.OriginalFileI. Returns a new OriginalFileWrapper
Parameters: |
|
---|---|
Returns: |
Creates a OriginalFileWrapper from a local file. File is uploaded to create an omero.model.OriginalFileI. Returns a new OriginalFileWrapper
Parameters: |
|
---|---|
Returns: |
Creates a new raw file store. This service is special in that it does not get cached inside BlitzGateway so every call to this function returns a new object, avoiding unexpected inherited states.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Creates a new raw pixels store. This service is special in that it does not get cached inside BlitzGateway so every call to this function returns a new object, avoiding unexpected inherited states.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Creates a new rendering engine. This service is special in that it does not get cached inside BlitzGateway so every call to this function returns a new object, avoiding unexpected inherited states.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets a reference to the searching service on this connection object or creates a new one if none exists.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets a reference to the thumbnail store on this connection object or creates a new one if none exists.
Return type: | omero.gateway.ProxyObjectWrapper |
---|---|
Returns: | The proxy wrapper of the thumbnail store |
Deletes an enumeration object
Parameters: | obj (omero.model.IObject) – Enumeration object |
---|
Directly Delete object (removes row from database). This may fail with various constraint violations if the object is linked to others in the database
Parameters: | obj (IObject) – Object to delete |
---|
Generic method for deleting using the delete queue. Options allow to delete ‘independent’ Annotations (Tag, Term, File) and to delete child objects.
Parameters: |
|
---|---|
Returns: | Delete handle |
Return type: | omero.api.delete.DeleteHandle |
Return a generator for all Experimenters whose omeName starts with ‘start’. Experimenters ordered by omeName.
Parameters: | start (String) – omeName must start with these letters |
---|---|
Returns: | Generator of experimenters |
Return type: | ExperimenterWrapper generator |
Gets reference to the admin service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Returns Experimenters with administration privileges.
Returns: | Current Experimenter |
---|---|
Returns: | Generator of BlitzObjectWrapper subclasses |
Retrieve Annotation Links by parent_type E.g. “Image”. Not Ordered. Returns generator of AnnotationLinkWrapper If parent_ids is None, all available objects will be returned. i.e. listObjects()
Parameters: |
|
---|---|
Returns: | Generator yielding wrapped objects. |
Gets summary of Original Files that are archived from OMERO 4 imports Returns a dict of files ‘count’ and sum of ‘size’
Parameters: | imageIds – Image IDs list |
---|---|
Returns: | Dict of files ‘count’ and ‘size’ |
Gets reference to the config service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the container service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Retrieve the default group for the given user id.
Parameters: | eid (Long) – Experimenter ID |
---|---|
Returns: | The default group for user |
Return type: | ExperimenterGroupWrapper |
Returns default max size of images that can be downloaded as jpg, png or tiff, expressed as number of pixels.
Returns: | Integer |
---|
Get enumeration by class and value
Parameters: |
|
---|---|
Returns: | Enumeration or None |
Return type: |
Get enumeration by class and ID
Parameters: |
|
---|---|
Returns: | Enumeration or None |
Return type: |
Get all enumerations by class
Parameters: | klass (Class or string) – Class |
---|---|
Returns: | Generator of Enumerations |
Return type: | EnumerationWrapper generator |
Gets list of enumeration types
Returns: | List of enum types |
---|---|
Return type: | List of Strings |
Get enumeration types, with lists of Enum entries
Returns: | Dictionary of type: entries |
---|---|
Return type: | Dict of <string: EnumerationWrapper list > |
Returns omero_System_ice.EventContext. It contains: shareId, sessionId, sessionUuid, userId, userName, groupId, groupName, isAdmin, isReadOnly, eventId, eventType, eventType, memberOfGroups, leaderOfGroups Also saves context to self._ctx
Returns: | Event Context from admin service. |
---|---|
Return type: | omero.sys.EventContext |
Gets summary of Original Files that are part of the FS Fileset linked to images Returns a dict of files ‘count’ and sum of ‘size’
Parameters: | imageIds – Image IDs list |
---|---|
Returns: | Dict of files ‘count’ and ‘size’ |
Returns the free or available space on this file system including nested subdirectories.
Returns: | Free space in bytes |
---|---|
Return type: | Int |
Returns current omero_model_ExperimenterGroupI.
Returns: | omero.model.ExperimenterGroupI |
---|
Look up Groups where current user is a leader of.
Returns: | Groups that current user leads |
---|---|
Return type: | ExperimenterGroupWrapper generator |
Look up Groups where current user is a member of (except “user” group).
Returns: | Current users groups |
---|---|
Return type: | ExperimenterGroupWrapper generator |
Returns default initial zoom level set on the server.
Returns default interpolation setting on the server. This is a string but represents a boolean, E.g. ‘true’
Returns: | String |
---|
Returns error if thrown by _BlitzGateway.connect connect.
Returns: | String |
---|
Returns the maximum plane size the server will allow for an image to not be considered big i.e. width or height larger than this will trigger image pyramids to be calculated.
This is useful for the client to filter images based on them needing pyramids or not, without the full rendering engine overhead.
Returns: | tuple holding (max_plane_width, max_plane_height) as set on the server |
---|---|
Return type: | Tuple |
Gets reference to the metadata service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Retrieve single Object by type E.g. “Image” or None if not found. If more than one object found, raises ome.conditions.ApiUsageException See getObjects() for more info.
Parameters: |
|
---|---|
Returns: |
Retrieve Objects by type E.g. “Image” Returns generator of appropriate BlitzObjectWrapper type. E.g. ImageWrapper. If ids is None, all available objects will be returned. i.e. listObjects() Filter objects by attributes. E.g. attributes={‘name’:name}
Parameters: |
|
---|---|
Returns: | Generator of BlitzObjectWrapper subclasses |
Retrieve objects linked to the given annotation IDs controlled by the security system.
Parameters: | annids (Long) – Annotation IDs |
---|---|
Returns: | Generator yielding Objects |
Return type: | BlitzObjectWrapper generator |
Gets original enumerations. Returns a dictionary of enumeration class: list of Enumerations
Returns: | Original enums |
---|---|
Return type: | Dict of <string: EnumerationWrapper list > |
Fetch all groups of which the given user is a member. The returned groups will have all fields filled in and all collections unloaded.
Parameters: | eid (Long) – Experimenter ID |
---|---|
Returns: | Generator of groups for user |
Return type: | ExperimenterGroupWrapper generator |
Gets reference to the pixels service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Returns named property of the wrapped omero.client
Returns: | named client property |
---|
Gets reference to the query service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the rendering settings service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the repository info service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets ROI service.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets script service.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Returns the existing session, or creates a new one if needed
Returns: | The session from session service |
---|---|
Return type: | omero.model.session |
Gets reference to the session service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the share service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the sharedresources from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the timeline service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the types service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Gets reference to the update service from ProxyObjectWrapper.
Returns: | omero.gateway.ProxyObjectWrapper |
---|
Returns current Experimenter.
Returns: | Current Experimenter |
---|---|
Return type: | ExperimenterWrapper |
Returns current experimenter id
Returns: | Current Experimenter id |
---|---|
Return type: | long |
Returns default initial zoom level set on the server.
Returns unsorted lists of ‘leaders’ and ‘members’ of the specified group (default is current group) as a dict with those keys.
Returns: | {‘leaders’: list ExperimenterWrapper, ‘colleagues’: list ExperimenterWrapper} |
---|---|
Return type: | dict |
** Deprecated ** Use ExperimenterGroupWrapper.groupSummary().
Checks if a user has administration privileges.
Returns: | Boolean |
---|
Returns the anonymous flag
Returns: | Anonymous |
---|---|
Return type: | Boolean |
Returns last status of connection.
Returns: | Boolean |
---|
Is the current group (or a specified group) led by the current user?
Returns: | True if user leads the current group |
---|---|
Return type: | Boolean |
Returns ‘True’ if the underlying omero.clients.BaseClient is connected using SSL
Keeps service alive. Returns True if connected. If connection was lost, reconnecting. If connection failed, returns False and error is logged.
Returns: | True if connection alive. |
---|---|
Return type: | Boolean |
Look up users who are a member of the current user active group. Returns None if the group is private and isn’t lead by the current user
Returns: | Generator of Experimenters or None |
---|---|
Return type: | ExperimenterWrapper generator |
Lists FileAnnotations created by users, filtering by namespaces if specified. If NO namespaces are specified, then ‘known’ namespaces are excluded by default, such as original files and companion files etc. File objects are loaded so E.g. file name is available without lazy loading.
Parameters: |
|
---|---|
Returns: | Generator of FileAnnotationWrapper - with files loaded. |
Look up all experimenters and related groups. Groups are also loaded
Returns: | All experimenters |
---|---|
Return type: | ExperimenterWrapper generator |
Retrieve all Annotations not linked to the given parents: Projects, Datasets, Images, Screens, Plates OR Wells etc.
Parameters: |
|
---|---|
Returns: | Generator yielding AnnotationWrappers |
Return type: | AnnotationWrapper generator |
List orphaned Datasets, Images, Plates controlled by the security system, Optionally filter by experimenter ‘eid’
Parameters: |
|
---|---|
Returns: | Generator yielding Datasets |
Return type: | DatasetWrapper generator |
Looks up owned groups for the logged user.
Returns: | Groups owned by current user |
---|---|
Return type: | ExperimenterGroupWrapper generator |
List every Project controlled by the security system.
Parameters: | eid – Filters Projects by owner ID |
---|---|
Return type: | ProjectWrapper list |
List every Screens controlled by the security system.
Parameters: | eid – Filters Screens by owner ID |
---|---|
Return type: | ProjectWrapper list |
Look up users who are members of groups lead by the current user.
Returns: | Members of groups lead by current user |
---|---|
Return type: | ExperimenterWrapper generator |
Resets the enumerations by type
Parameters: | klass (String) – Type of enum to reset |
---|
Switches the group to the previous group
Search objects of type “Project”, “Dataset”, “Image”, “Screen”, “Plate” Returns a list of results
Parameters: |
|
---|---|
Returns: | List of Object wrappers. E.g. ImageWrapper |
Terminates connection with killSession(). If softclose is False, the session is really terminate disregarding its connection refcount.
Parameters: | softclose – Boolean |
---|
Sets and saves new names for channels of specified Images. If an image has fewer channels than the max channel index in nameDict, then the channel names will not be set for that image.
Parameters: |
|
---|---|
Returns: | {‘imageCount’:totalImages, ‘updateCount’:updateCount} |
Sets the security context of this connection to the specified group
Parameters: | groupid (Long) – The ID of the group to switch to |
---|---|
Return type: | Boolean |
Returns: | True if the group was switched successfully |
Looks up the group by name, then delegates to setGroupForSession(), returning the result
Parameters: | group (String) – Group name |
---|---|
Returns: | True if group set successfully |
Return type: | Boolean |
Saves the username and password for later use, creating session etc
Parameters: |
|
---|
Switches between SSL and insecure (faster) connections to Blitz. The gateway must already be connected.
Parameters: | secure (Boolean) – If False, use an insecure connection |
---|
Sets current experimenter id
If current user isAdmin, return new connection owned by ‘username’
Parameters: |
|
---|---|
Returns: | Clone of this connection, with username’s new Session |
Return type: | _BlitzGateway or None if not admin or username unknown |
List images based on their creation times. If both tfrom and tto are None, grab the most recent batch.
Parameters: |
|
---|---|
Returns: | Generator yielding _ImageWrapper |
Return type: | ImageWrapper generator |
Updates enumerations with new entries
Parameters: | new_entries (List of omero.model.IObject) – List of objects |
---|
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ChannelI class wrapper extends BlitzObjectWrapper.
Returns the rendering settings color of this channel
Returns: | Channel color |
---|---|
Return type: | ColorHolder |
Returns the emission wave or None. If units is true, returns omero.model.LengthI If units specifies a unit e,g, “METER”, we convert.
Returns: | Emission wavelength or None |
---|---|
Return type: | float or omero.model.LengthI |
Returns the excitation wave or None. If units is true, returns omero.model.LengthI If units specifies a unit e,g, “METER”, we convert.
Returns: | Excitation wavelength or None |
---|---|
Return type: | float or omero.model.LengthI |
Returns the logical channel name, emission wave or index. The first that is not null in the described order.
Returns: | The logical channel string representation |
---|---|
Return type: | String |
Returns the logical channel
Returns: | Logical Channel |
---|---|
Return type: | LogicalChannelWrapper |
Returns the logical channel name or None
Returns: | The logical channel string representation |
---|---|
Return type: | String |
Returns the rendering settings window-end of this channel
Returns: | Window end |
---|---|
Return type: | double |
Returns the maximum pixel value of the channel
Returns: | Min pixel value |
---|---|
Return type: | double |
Returns the minimum pixel value of the channel
Returns: | Min pixel value |
---|---|
Return type: | double |
Returns the rendering settings window-start of this channel
Returns: | Window start |
---|---|
Return type: | double |
Returns True if the channel is active (turned on in rendering settings)
Returns: | True if Channel is Active |
---|---|
Return type: | Boolean |
Extends the superclass save method to save Pixels. Returns result of saving superclass (TODO: currently this is None)
Bases: omero.gateway.BlitzObjectWrapper
omero_model_DatasetI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_DetectorSettingsI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_DetectorI class wrapper extends BlitzObjectWrapper.
The type of detector (enum value)
Returns: | Detector type |
---|---|
Return type: | EnumerationWrapper |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_DichroicI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
Gets the type (class) of the Enumeration
Returns: | The omero class |
---|---|
Type: | Class |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ExperimenterGroupI class wrapper extends BlitzObjectWrapper.
Returns string for building queries, loading Experimenters for each group.
Returns tuple of unsorted lists of ‘leaders’ and ‘members’ of the group.
Returns: | (list ExperimenterWrapper, list ExperimenterWrapper) |
---|---|
Return type: | tuple |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ExperimenterI class wrapper extends BlitzObjectWrapper.
Returns string for building queries, loading Experimenters only.
Returns Experimenter’s Full Name
Returns: | Full Name or None |
---|---|
Return type: | String |
Gets full name of this experimenter. E.g. ‘William James. Moore’ or ‘William Moore’ if no middle name
Returns: | Full Name or None |
---|---|
Return type: | String |
Returns Experimenter’s omeName
Returns: | Name |
---|---|
Return type: | String |
Returns first initial and Last name. E.g. ‘W. Moore’
Returns: | Initial and last name |
---|---|
Return type: | String |
Gets a preference for the experimenter
Parameters: |
|
---|---|
Returns: | Preference value |
Gets all preferences for section
Parameters: | section – Preferences section |
---|---|
Returns: | Dict of preferences |
Returns the experimenter’s preferences annotation contents, as a ConfigParser instance
Returns: | See above |
---|---|
Return type: | ConfigParser |
Returns true if Experimenter is Active (if they are in any group named ‘user’)
Returns: | True if experimenter is Active |
---|---|
Return type: | Boolean |
Returns true if Experimenter is Admin (if they are in any group named ‘system’)
Returns: | True if experimenter is Admin |
---|---|
Return type: | Boolean |
Returns true if Experimenter is Guest (if they are in any group named ‘guest’)
Returns: | True if experimenter is Admin |
---|---|
Return type: | Boolean |
Returns True if this Experimenter is the current user
Sets a preference for the experimenter
Parameters: |
|
---|
Sets the experimenter’s preferences annotation contents, passed in as a ConfigParser instance
Parameters: | prefs (ConfigParser) – ConfigParser of preferences |
---|
Bases: omero.gateway._LightSourceWrapper
omero_model_FilamentI class wrapper extends LightSourceWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_FilesetI class wrapper extends BlitzObjectWrapper
Used for building queries in generic methods such as getObjects(“Fileset”)
Returns a list of ImageWrapper linked to this Fileset
Returns a list of OriginalFileWrapper linked to this Fileset via Fileset Entries
Bases: omero.gateway.BlitzObjectWrapper
omero_model_FilterSetI class wrapper extends BlitzObjectWrapper.
TODO: not implemented
TODO: not implemented
Bases: omero.gateway.BlitzObjectWrapper
omero_model_FilterI class wrapper extends BlitzObjectWrapper.
Gets the Filter type for this filter (enum value)
Returns: | Filter type |
---|---|
Return type: | EnumerationWrapper |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_StageLabelI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper, omero.gateway.OmeroRestrictionWrapper
omero_model_ImageI class wrapper extends BlitzObjectWrapper.
Returns: | Dict of render options |
---|---|
Return type: | Dict |
Return a rendering def ID based on custom logic.
Returns: | Rendering definition ID or None if no custom logic has found a rendering definition. |
---|
Checks that pixels are loaded
Returns: | True if loaded |
---|---|
Return type: | Boolean |
Loads rendering options from an Annotation on the Image.
Returns: | Dict of rendering options |
---|---|
Return type: | Dict |
Called whenever a reset defaults is called by the preparation of the rendering engine or the thumbnail bean.
Parameters: | rdid (Long) – Current Rendering Def ID |
---|
Prepare the rendering engine with pixels ID and existing or new rendering def.
Returns: | The Rendering Engine service |
---|---|
Return type: | ProxyObjectWrapper |
Checks that the rendering engine is prepared, calling _prepareRE() if needed. Used by the assert_re() method to wrap calls requiring rendering engine
Returns: | True if rendering engine is created |
---|---|
Return type: | Boolean |
Prepares Thumbnail Store for the image.
Parameters: |
|
---|---|
Returns: | Thumbnail Store or None |
Return type: |
Wraps text into lines that are less than a certain width (when rendered in specified font)
Parameters: |
|
---|---|
Returns: | List of text lines |
Return type: | List of Strings |
Removes specific color settings from channels
Returns: | True if allowed to do this |
---|---|
Return type: | Boolean |
Returns the number of Original ‘archived’ Files linked to primary pixels.
Counts the Original Files that are part of the FS Fileset linked to this image
Returns a count of the number of Imported Image files (Archived files for pre-FS images) This will only be 0 if the image was imported pre-FS and original files NOT archived
Exports the OME-TIFF representation of this image.
Parameters: | bufsize (int or tuple) – if 0 return a single string buffer with the whole OME-TIFF if >0 return a tuple holding total size and generator of chunks (string buffers) of bufsize bytes each |
---|---|
Returns: | OME-TIFF file data |
Return type: | String or (size, data generator) |
Creates a new Image wrapper with the image specified by pixels ID
Parameters: |
|
---|---|
Returns: | New Image wrapper |
Return type: |
Returns the acquisition date for the image or None if not set.
Returns: | A datetime.datetime() object |
---|---|
Return type: | datetime |
Returns a dict of the rendering settings that exist for this Image Can be filtered by owner using the eid parameter.
Returns: | Rdef dict |
---|---|
Return type: | Dict |
Returns a generator of OriginalFileWrapper corresponding to the archived files linked to primary pixels ** Deprecated ** Use getImportedImageFiles().
Returns ‘Firstname Lastname’ of image owner
Returns: | Image owner |
---|---|
Return type: | String |
Returns a list of the labels for the Channels for this image
Returns a list of Channels, each initialised with rendering engine. If noRE is True, Channels will not have rendering engine enabled. In this case, calling channel.getColor() or getWindowStart() etc will return None.
Returns: | Channels |
---|---|
Return type: | List of ChannelWrapper |
Grab a horizontal line from the image pixel data, for the specified channels (or active ones)
Parameters: |
|
---|---|
Returns: | rv List of lists (one per channel) |
XXX: Deprecated since 4.3.2, use listParents(). (See #6660) Gets the Dataset that image is in, or None. Returns None if Image is in more than one Dataset.
Returns: | Dataset |
---|---|
Return type: | DatasetWrapper |
Returns the Fileset linked to this Image. Fileset images, usedFiles and originalFiles are loaded.
Gets the Imaging Environment of the Image, or None
Returns: | Imaging Environment |
---|---|
Return type: | ImagingEnvironmentWrapper |
Returns a dict of ‘count’ and ‘size’ of the Fileset files (OMERO 5) or the Original Archived files (OMERO 4)
Returns: | A dict of ‘count’ and sum ‘size’ of the files. |
---|
Returns a generator of path strings corresponding to the Imported image files that created this image, if available.
Returns a generator of OriginalFileWrapper corresponding to the Imported image files that created this image, if available.
If the image was imported using file transfer, return the type of file transfer. One of: ‘ome.formats.importer.transfers.MoveFileTransfer’, ‘ome.formats.importer.transfers.CopyFileTransfer’, ‘ome.formats.importer.transfers.CopyMoveFileTransfer’, ‘ome.formats.importer.transfers.HardlinkFileTransfer’, ‘ome.formats.importer.transfers.SymlinkFileTransfer’
Return type: | String or None |
---|---|
Returns: | Transfer type or None |
Returns the Instrument for this image (or None) making sure the instrument is loaded.
Returns: | Instrument (microscope) |
---|---|
Return type: | InstrumentWrapper |
Gets the Objective Settings of the Image, or None
Returns: | Objective Settings |
---|---|
Return type: | ObjectiveSettingsWrapper |
Grab a horizontal or vertical line from the image pixel data, for the specified channels (or ‘active’ if not specified) and using the specified range (or 1:1 relative to the image size). Axis may be ‘h’ or ‘v’, for horizontal or vertical respectively.
Parameters: |
|
---|---|
Returns: | rv List of lists (one per channel) |
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
If the image is in a Plate/Well hierarchy, returns the parent Plate, otherwise None
Returns: | Plate |
---|---|
Return type: | PlateWrapper |
Tries to load pixels, then call function and return the result
Gets the Project that image is in, or None. TODO: Assumes image is in only 1 Project. Why not use getAncestory()[-1] Returns None if Image is in more than one Dataset & Project.
Returns: | Project |
---|---|
Return type: | ProjectWrapper |
Returns the current projection option (checking it is valid).
Returns: | Projection key. E.g. ‘intmax’ |
---|---|
Return type: | String |
Gets the range used for Z-projection as tuple (proStart, proEnd)
Returns list of available keys for projection. E.g. [‘intmax’, ‘intmean’]
Returns: | Projection options |
---|---|
Return type: | List of strings |
Count number of ROIs associated to an image
Parameters: |
|
---|---|
Returns: | Number of ROIs found for the currently logged in user if filterByCurrentUser is True, otherwise the total number found. |
Grab a horizontal line from the image pixel data, for the specified channels (or active ones)
Parameters: |
|
---|---|
Returns: | rv List of lists (one per channel) |
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Tries to load pixels, then call function and return the result
Returns the stage label or None
Returns: | Stage label |
---|---|
Return type: | ImageStageLabelWrapper |
Tries to load pixels, then call function and return the result
Returns a string holding a rendered JPEG of the thumbnail.
Parameters: |
|
---|---|
Return type: | string or None |
Returns: | the rendered JPEG, or None if there was an error. |
Returns True if the current rendering model is ‘greyscale’
Returns: | isGreyscale |
---|---|
Return type: | Boolean |
Returns the inverted axis flag
Returns: | Inverted Axis |
---|---|
Return type: | Boolean |
Gets original metadata from the file annotation. Returns the File Annotation, list of Global Metadata, list of Series Metadata in a tuple. Metadata lists are lists of (key, value) tuples.
Parameters: | sort – If True, we sort Metadata by key |
---|---|
Returns: | Tuple (file-annotation, global-metadata, series-metadata) |
Return type: | Tuple (FileAnnotationWrapper, [], []) |
Loads rendering options from an Annotation on the Image and applies them to the Image.
Returns: | True! TODO: Always True?? |
---|
Common part of horizontal and vertical line plot rendering.
Returns: | (Image, width, height). |
---|
Render the Image, (projected) and compressed. For projection, call setProjection() before renderImage.
Parameters: |
|
---|---|
Returns: | A PIL Image or None |
Return type: | PIL Image. |
Prepares a jpeg representation of a 2d grid holding a render of each channel, along with one for all channels at the set Z and T points.
Parameters: |
|
---|---|
Returns: | value |
Prepares a PIL Image with a 2d grid holding a render of each channel, along with one for all channels at the set Z and T points.
Parameters: |
|
---|---|
Returns: | canvas |
Return type: | PIL Image |
Tries to load pixels, then call function and return the result
Sets the active channels on the rendering engine. Also sets rendering windows and channel colors (for channels that are active)
Examples: # Turn first channel ON, others OFF image.setActiveChannels([1]) # First OFF, second ON, windows and colors for both image.setActiveChannels(
[-1, 2], [[20, 300], [50, 500]], [‘00FF00’, ‘FF0000’])
# Second Channel ON with windows. All others OFF image.setActiveChannels([2], [[20, 300]])
Parameters: |
|
---|
Sets the HSB rendering model on this image’s current renderer
Sets the Greyscale rendering model on this image’s current renderer
Sets the inverted axis flag
Parameters: | inverted (Boolean) – Inverted Axis |
---|
Sets the current projection option.
Parameters: | proj (String) – Projection Option. E.g. ‘intmax’ or ‘normal’ |
---|
Sets the range used for Z-projection. Will only be used if E.g. setProjection(‘intmax’) is not ‘normal’
Provides a truncated name of the image. E.g. ...catedNameOfTheImage.tiff
Parameters: |
|
---|---|
Returns: | Truncated ...name |
Type: | String |
Creates a dict representation of the Image, including author and date info.
Parameters: | xtra – controls the optional parts of simpleMarshal; - thumbUrlPrefix - allows customizing the thumb URL by either a static string prefix or a callable function that will take a single ImgId int argument and return the customized URL string - tiled - if passed and value evaluates to true, add information on whether this image is tiled on this server. |
---|---|
Type: | Dict |
Returns: | Dict |
Return type: | Dict |
Returns a dict of layout parameters for generating split channel image. E.g. row count, column count etc. for greyscale and color layouts.
Parameters: | border (int) – spacing between panels |
---|---|
Returns: | Dict of parameters |
Return type: | Dict |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ImagingEnvironmentI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ImagingEnvironment class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_InstrumentI class wrapper extends BlitzObjectWrapper.
Gets the Instrument detectors.
Returns: | List of Detectors |
---|---|
Return type: | DetectorWrapper list |
Gets the Instrument Dichroics.
Returns: | List of Dichroics |
---|---|
Return type: | DichroicWrapper list |
Gets the Instrument FilterSets.
Returns: | List of FilterSets |
---|---|
Return type: | FilterSetWrapper list |
Gets the Instrument Filters.
Returns: | List of Filters |
---|---|
Return type: | FilterWrapper list |
Gets the Instrument LightSources.
Returns: | List of LightSources |
---|---|
Return type: | LightSourceWrapper list |
Returns the microscope component of the Instrument.
Returns: | Microscope |
---|---|
Return type: | omero.model.Microscope |
Gets the Instrument OTFs.
Returns: | List of OTFs |
---|---|
Return type: | OTFWrapper list |
Gets the Instrument Objectives.
Returns: | List of Objectives |
---|---|
Return type: | ObjectiveWrapper list |
Bases: omero.gateway._LightSourceWrapper
omero_model_LaserI class wrapper extends LightSourceWrapper.
Gets the laser medium type for this Laser (enum value)
Returns: | Laser medium type |
---|---|
Return type: | EnumerationWrapper |
Gets the pump (Light Source) for this Laser
Returns: | Pump (Light Source) |
---|---|
Return type: | LightSourceWrapper |
Bases: omero.gateway._LightSourceWrapper
omero_model_LightEmittingDiodeI class wrapper extends LightSourceWrapper.
Bases: omero.gateway.BlitzObjectWrapper
base Light Source class wrapper, extends BlitzObjectWrapper.
Returns list of emission FilterWrapper
Returns list of excitation FilterWrapper. Ordered collections can contain nulls
Bases: omero.gateway.BlitzObjectWrapper
base Light Source class wrapper, extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
base Light Source class wrapper, extends BlitzObjectWrapper.
Gets the Light Source type for this light source (enum value)
Returns: | Light Source type |
---|---|
Return type: | EnumerationWrapper |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_LogicalChannelI class wrapper extends BlitzObjectWrapper. Specifies a number of _attrs for the channel metadata.
Make sure we have the channel fully loaded, then return LightPathWrapper
Bases: omero.gateway.BlitzObjectWrapper
omero_model_MicroscopeI class wrapper extends BlitzObjectWrapper.
Returns the ‘type’ of microscope this is.
Returns: | Microscope type. |
---|---|
Return type: | EnumerationWrapper |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_OTFI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ObjectiveSettingsI class wrapper extends BlitzObjectWrapper.
Gets the Medium type that these settings refer to (enum value)
Returns: | Medium |
---|---|
Return type: | EnumerationWrapper |
Gets the Objective that these settings refer to
Returns: | Objective |
---|---|
Return type: | ObjectiveWrapper |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ObjectiveI class wrapper extends BlitzObjectWrapper.
The type of Correction for this objective (enum value)
Returns: | Correction type, or None |
---|---|
Return type: | EnumerationWrapper |
The type of immersion for this objective (enum value)
Returns: | Immersion type, or None |
---|---|
Return type: | EnumerationWrapper |
The type of Iris for this objective (enum value)
Returns: | Iris type |
---|---|
Return type: | EnumerationWrapper |
Bases: omero.gateway.BlitzObjectWrapper, omero.gateway.OmeroRestrictionWrapper
omero_model_OriginalFileI class wrapper extends BlitzObjectWrapper.
Returns a generator yielding chunks of the file data.
Returns: | Data from file in chunks |
---|---|
Return type: | Generator |
Bases: omero.gateway.BlitzObjectWrapper
omero_model_PixelsI class wrapper extends BlitzObjectWrapper.
Creates RawPixelsStore and sets the id etc
Loads plane infos and returns sequence of omero.model.PlaneInfo objects wrapped in BlitzObjectWrappers ordered by planeInfo.deltaT. Set of plane infos can be filtered by C, T or Z
Parameters: |
|
---|---|
Returns: | Generator of PlaneInfo wrapped in BlitzObjectWrappers |
This simply wraps the omero.model.PixelsType object in a BlitzObjectWrapper. Shouldn’t be needed when this is done automatically.
It has the methods getValue() and getBitSize().
Gets the specified plane as a 2D numpy array by calling getPlanes() If a range of planes are required, getPlanes() is approximately 30% faster.
Returns generator of numpy 2D planes from this set of pixels for a list of Z, C, T indexes.
Parameters: | zctList – A list of indexes: [(z,c,t), ] |
---|
Gets the specified plane as a 2D numpy array by calling getTiles() If a range of tile are required, getTiles() is approximately 30% faster.
Returns generator of numpy 2D planes from this set of pixels for a list of (Z, C, T, tile) where tile is (x, y, width, height) or None if you want the whole plane.
Parameters: | zctrList – A list of indexes: [(z,c,t, region), ] |
---|
Bases: omero.gateway.BlitzObjectWrapper
omero_model_PlaneInfo class wrapper extends BlitzObjectWrapper.
Gets the PlaneInfo deltaT with units support If units is True, return omero.model.TimeI If units specifies a different unit E.g. “MILLISECOND”, we convert
Parameters: | units (True or unit string, e.g. “S”) – Option to include units in tuple |
---|---|
Returns: | DeltaT value or omero.model.TimeI |
Gets the PlaneInfo ExposureTime with units support If units is True, return omero.model.TimeI If units specifies a different unit E.g. “MILLISECOND”, we convert
Parameters: | units (True or unit string) – Option to include units in tuple |
---|---|
Returns: | ExposureTime value or omero.model.TimeI |
Bases: omero.gateway.BlitzObjectWrapper
Because PlateAcquisitions are direct children of plates, with no links in between, a special listParents is needed
Bases: omero.gateway.BlitzObjectWrapper, omero.gateway.OmeroRestrictionWrapper
omero_model_PlateI class wrapper extends BlitzObjectWrapper.
Returns a query string for constructing custom queries, loading the screen for each plate.
Lists Wells in this plate, not sorted. Saves wells to _childcache map, where key is (row, column).
Return type: | list of omero.model.WellI objects |
---|---|
Returns: | child objects. |
Make sure full project export doesn’t pick up wellsample images TODO: do we want to support this at all?
Returns a list of labels for the columns on this plate. E.g. [1, 2, 3...] or [‘A’, ‘B’, ‘C’...] etc
Iterates all wells on plate to retrieve grid size as {‘rows’: rSize, ‘columns’:cSize} dict.
Return type: | dict of {‘rows’: rSize, ‘columns’:cSize} |
---|
Returns a list of labels for the rows on this plate. E.g. [1, 2, 3...] or [‘A’, ‘B’, ‘C’...] etc
Returns a grid of WellWrapper objects, indexed by [row][col].
Return type: | 2D array of WellWrapper. Empty well positions are None |
---|
Makes sure the grid side count is the exact power of two of row and col arguments, keeping their ratio, that fits the existing well count.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ProjectI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_ScreenI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_TransmittanceRangeI class wrapper extends BlitzObjectWrapper.
Bases: omero.gateway.BlitzObjectWrapper
omero_model_WellSampleI class wrapper extends BlitzObjectWrapper.
Gets the Image for this well sample.
Returns: | The Image |
---|---|
Return type: | ImageWrapper |
Gets the PlateAcquisition for this well sample, or None
Returns: | The PlateAcquisition |
---|---|
Return type: | PlateAcquisitionWrapper or None |
Gets the Image for this well sample.
Returns: | The Image |
---|---|
Return type: | ImageWrapper |
Because wellsamples are direct children of wells, with no links in between, a special listParents is needed
Bases: omero.gateway.BlitzObjectWrapper, omero.gateway.OmeroRestrictionWrapper
omero_model_WellI class wrapper extends BlitzObjectWrapper.
Return the number of well samples loaded
Returns: | well sample count |
---|---|
Return type: | Int |
Return the image at the specified well sample index. If index is omitted, the currently selected index is used instead (self.index) and if that is not defined, the first one (index 0) is returned.
Parameters: | index (integer) – the well sample index |
---|---|
Returns: | The Image |
Return type: | ImageWrapper |
returns the screens that link to plates that link to this well
Return the well sample at the specified index. If index is omitted, the currently selected index is used instead (self.index) and if that is not defined, the first one (index 0) is returned.
Parameters: | index (integer) – the well sample index |
---|---|
Returns: | The Well Sample |
Return type: | WellSampleWrapper |
Return True if well samples exist (loaded)
Returns: | True if well samples loaded |
---|---|
Return type: | Boolean |
Because wells are direct children of plates, with no links in between, a special listParents is needed
Return the well sample at the current index (0 if not set)
Returns: | The Well Sample wrapper |
---|---|
Return type: | WellSampleWrapper |
Convert number to letter label. E.g. 0 -> ‘A’ and 100 -> ‘CW’
Function decorator to make sure that pixels are loaded before call
Parameters: | func (Function) – Function |
---|---|
Returns: | Decorated function |
Return type: | Function |
Bases: object
Function decorator to make sure that rendering engine is prepared before call. Is configurable by various options.
Reads everything from fin, in chunks of bufsize.
Parameters: |
|
---|---|
Return type: | string |
Returns: | string buffer holding the contents read from the file |
Generator helper function that yields chunks of the file of size fsize.
Parameters: |
|
---|---|
Return type: | generator |
Returns: | generator of string buffers of size up to bufsize read from fin |
else return the argument itself
Parameters: | val – value |
---|---|
Return type: | omero.rtype |
Returns: | matched RType or value |
this needs to be called by modules that extend the base wrappers
splits an hex stream of characters into an array of bytes in format (R,G,B,A). - abc -> (0xAA, 0xBB, 0xCC, 0xFF) - abcd -> (0xAA, 0xBB, 0xCC, 0xDD) - abbccd -> (0xAB, 0xBC, 0xCD, 0xFF) - abbccdde -> (0xAB, 0xBC, 0xCD, 0xDE)
Parameters: | color – Characters to split. |
---|---|
Returns: | rgba |
Return type: | list of Ints |