Package omero :: Package gateway :: Class _ImageWrapper
[hide private]
[frames] | no frames]

Class _ImageWrapper

source code


omero_model_ImageI class wrapper extends BlitzObjectWrapper.

Instance Methods [hide private]
 
__bstrap__(self)
Initialisation method which is implemented by subclasses to set their class variables etc.
source code
 
__del__(self) source code
 
__loadedHotSwap__(self)
Loads the object that is wrapped by this class.
source code
 
getInstrument(self)
Returns the Instrument for this image (or None) making sure the instrument is loaded.
source code
 
_loadPixels(self)
Checks that pixels are loaded
source code
 
_getRDef(self)
Return a rendering def ID based on custom logic.
source code
 
_onResetDefaults(self, rdid)
Called whenever a reset defaults is called by the preparation of the rendering engine or the thumbnail bean.
source code
 
_prepareRE(self, rdid=None)
Prepare the rendering engine with pixels ID and existing or new rendering def.
source code
 
_prepareRenderingEngine(self, rdid=None)
Checks that the rendering engine is prepared, calling _prepareRE if needed.
source code
 
resetRDefs(self) source code
 
simpleMarshal(self, xtra=None, parents=False)
Creates a dict representation of the Image, including author and date info.
source code
 
getStageLabel(self)
Returns the stage label or None
source code
 
shortname(self, length=20, hist=5)
Provides a truncated name of the image.
source code
 
getAuthor(self)
Returns 'Firstname Lastname' of image owner
source code
 
getDataset(self)
XXX: Deprecated since 4.3.2, use listParents().
source code
 
getProject(self)
Gets the Project that image is in, or None.
source code
 
getPlate(self)
If the image is in a Plate/Well hierarchy, returns the parent Plate, otherwise None
source code
 
getObjectiveSettings(self)
Gets the Ojbective Settings of the Image, or None
source code
 
getImagingEnvironment(self)
Gets the Imaging Environment of the Image, or None
source code
 
getPixelsId(self)
Returns the Primary Pixels ID for the image.
source code
 
_prepareTB(self, _r=False)
Prepares Thumbnail Store for the image.
source code
 
loadOriginalMetadata(self, sort=True)
Gets original metadata from the file annotation.
source code
 
_getProjectedThumbnail(self, size, pos)
Returns a string holding a rendered JPEG of the projected image, sized to mimic a thumbnail.
source code
 
getThumbnail(self, size=(64,64), z=None, t=None, direct=True)
Returns a string holding a rendered JPEG of the thumbnail.
source code
 
getPixelRange(self)
Returns (min, max) values for the pixels type of this image.
source code
 
requiresPixelsPyramid(self) source code
 
getPrimaryPixels(self)
Loads pixels and returns object in a PixelsWrapper
source code
 
getChannels(self)
Returns a list of Channels, each initialised with rendering engine
source code
 
getZoomLevelScaling(self)
Returns a dict of zoomLevels:scale (fraction) for tiled 'Big' images.
source code
 
setActiveChannels(self, channels, windows=None, colors=None)
Sets the active channels on the rendering engine.
source code
 
getProjections(self)
Returns list of available keys for projection.
source code
 
getProjection(self)
Returns the current projection option (checking it is valid).
source code
 
setProjection(self, proj)
Sets the current projection option.
source code
 
getProjectionRange(self)
Gets the range used for Z-projection as tuple (proStart, proEnd)
source code
 
setProjectionRange(self, projStart, projEnd)
Sets the range used for Z-projection.
source code
 
isInvertedAxis(self)
Returns the inverted axis flag
source code
 
setInvertedAxis(self, inverted)
Sets the inverted axis flag
source code
 
getPixelLine(self, z, t, pos, axis, channels=None, range=None)
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).
source code
 
getRow(self, z, t, y, channels=None, range=None)
Grab a horizontal line from the image pixel data, for the specified channels (or active ones)
source code
 
getCol(self, z, t, x, channels=None, range=None)
Grab a horizontal line from the image pixel data, for the specified channels (or active ones)
source code
 
getRenderingModels(self)
Gets a list of available rendering models.
source code
 
getRenderingModel(self)
Get the current rendering model.
source code
 
setGreyscaleRenderingModel(self)
Sets the Greyscale rendering model on this image's current renderer
source code
 
setColorRenderingModel(self)
Sets the HSB rendering model on this image's current renderer
source code
 
isGreyscaleRenderingModel(self)
Returns True if the current rendering model is 'greyscale'
source code
 
renderBirdsEyeView(self, size)
Returns the data from rendering the bird's eye view of the image.
source code
 
renderJpegRegion(self, z, t, x, y, width, height, level=None, compression=0.9)
Return the data from rendering a region of an image plane.
source code
 
renderJpeg(self, z=None, t=None, compression=0.9)
Return the data from rendering image, compressed (and projected).
source code
 
exportOmeTiff(self, bufsize=0)
Exports the OME-TIFF representation of this image.
source code
 
_wordwrap(self, width, text, font)
Wraps text into lines that are less than a certain width (when rendered in specified font)
source code
 
createMovie(self, outpath, zstart, zend, tstart, tend, opts=None)
Creates a movie file from this image.
source code
 
renderImage(self, z, t, compression=0.9)
Render the Image, (projected) and compressed.
source code
 
renderSplitChannel(self, z, t, compression=0.9, border=2)
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.
source code
 
splitChannelDims(self, border=2)
Returns a dict of layout parameters for generating split channel image.
source code
 
_renderSplit_channelLabel(self, channel) source code
 
renderSplitChannelImage(self, z, t, compression=0.9, border=2)
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.
source code
 
prepareLinePlotCanvas(self)
Common part of horizontal and vertical line plot rendering.
source code
 
renderRowLinePlotGif(self, z, t, y, linewidth=1)
Draws the Row plot as a gif file.
source code
 
renderColLinePlotGif(self, z, t, x, linewidth=1)
Draws the Column plot as a gif file.
source code
 
getZ(self)
Returns the last used value of Z (E.g.
source code
 
getT(self)
Returns the last used value of T (E.g.
source code
 
getDefaultZ(self)
Gets the default Z index from the rendering engine
source code
 
getDefaultT(self)
Gets the default T index from the rendering engine
source code
 
getPixelsType(self)
Gets name of pixel data type.
source code
 
getPixelSizeX(self)
Gets the physical size X of pixels in microns
source code
 
getPixelSizeY(self)
Gets the physical size Y of pixels in microns
source code
 
getPixelSizeZ(self)
Gets the physical size Z of pixels in microns
source code
 
getSizeX(self)
Gets width (size X) of the image (in pixels)
source code
 
getSizeY(self)
Gets height (size Y) of the image (in pixels)
source code
 
getSizeZ(self)
Gets Z count of the image
source code
 
getSizeT(self)
Gets T count of the image
source code
 
getSizeC(self)
Gets C count of the image (number of channels)
source code
 
clearDefaults(self)
Removes specific color settings from channels
source code
 
_deleteSettings(self) source code
 
_collectRenderOptions(self)
Returns a map of rendering options not stored in rendering settings.
source code
 
_loadRenderOptions(self)
Loads rendering options from an Annotation on the Image.
source code
 
loadRenderOptions(self)
Loads rendering options from an Annotation on the Image and applies them to the Image.
source code
 
saveDefaults(self)
Limited support for saving the current prepared image rendering defs.
source code
 
resetDefaults(self) source code
 
countArchivedFiles(self)
Returns the number of Original 'archived' Files linked to primary pixels.
source code
 
countFilesetFiles(self)
Counts the Original Files that are part of the FS Fileset linked to this image
source code
 
getImportedFilesInfo(self)
Returns a dict of 'count' and 'size' of the Fileset files (OMERO 5) or the Original Archived files (OMERO 4)
source code
 
countImportedImageFiles(self)
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
source code
 
getArchivedFiles(self)
Returns a generator of OriginalFileWrappers corresponding to the archived files linked to primary pixels ** Deprecated ** Use getImportedImageFiles.
source code
 
getImportedImageFiles(self)
Returns a generator of OriginalFileWrappers corresponding to the Imported image files that created this image, if available.
source code
 
getFileset(self)
Returns the Fileset linked to this Image.
source code
 
getROICount(self, shapeType=None, filterByCurrentUser=False)
Count number of ROIs associated to an image
source code

Inherited from BlitzObjectWrapper: __eq__, __getattr__, __init__, __prepare__, __repr__, canAnnotate, canChgrp, canDelete, canEdit, canLink, canOwnerWrite, canWrite, countChildren, countChildren_cached, creationEventDate, findChildByName, getAncestry, getAnnotation, getChildLinks, getDate, getDescription, getDetails, getId, getName, getOwner, getOwnerFullName, getOwnerOmeName, getParent, getParentLinks, isLeaded, isOwned, isPrivate, isPublic, isShared, linkAnnotation, listAnnotations, listChildren, listOrphanedAnnotations, listParents, removeAnnotations, save, saveAs, setDescription, setName, unlinkAnnotations, updateEventDate

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
fromPixelsId(self, conn, pid)
Creates a new Image wrapper with the image specified by pixels ID
source code
Static Methods [hide private]

Inherited from BlitzObjectWrapper: LINK_PARENT

Class Variables [hide private]
  _re = None
hash(x)
  _pd = None
hash(x)
  _rm = {}
  _pixels = None
hash(x)
  _archivedFileCount = None
hash(x)
  _filesetFileCount = None
hash(x)
  _importedFilesInfo = None
hash(x)
  _pr = None
hash(x)
  _prStart = None
hash(x)
  _prEnd = None
hash(x)
  _invertedAxis = False
hash(x)
  PROJECTIONS = {'normal':-1, 'intmax': omero.constants.projecti...
  PLANEDEF = omero.romio.XY
  LINE_PLOT_DTYPES = {(4, True, True): 'f', (2, False, False): '...
  LP_PALLETE = [0, 0, 0, 0, 0, 0, 255, 255, 255]
  LP_TRANSPARENT = 0
  LP_BGCOLOR = 1
  LP_FGCOLOR = 2

Inherited from BlitzObjectWrapper: CHILD_WRAPPER_CLASS, LINK_CHILD, LINK_CLASS, OMERO_CLASS, PARENT_WRAPPER_CLASS

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

fromPixelsId(self, conn, pid)
Class Method

source code 

Creates a new Image wrapper with the image specified by pixels ID

:param conn: The connection :type conn: BlitzGateway :param pid: Pixles ID :type pid: Long :return: New Image wrapper :rtype: ImageWrapper

__bstrap__(self)

source code 

Initialisation method which is implemented by subclasses to set their class variables etc.

Overrides: BlitzObjectWrapper.__bstrap__
(inherited documentation)

__loadedHotSwap__(self)

source code 

Loads the object that is wrapped by this class. This includes linked objects. This method can be overwritten by subclasses that want to specify how/which linked objects are loaded.

Overrides: BlitzObjectWrapper.__loadedHotSwap__
(inherited documentation)

getInstrument(self)

source code 

Returns the Instrument for this image (or None) making sure the instrument is loaded.

:return: Instrument (microscope) :rtype: InstrumentWrapper

_loadPixels(self)

source code 

Checks that pixels are loaded

:return: True if loaded :rtype: Boolean

_getRDef(self)

source code 

Return a rendering def ID based on custom logic.

:return:            Rendering definition ID or None if no custom
                    logic has found a rendering definition.

_onResetDefaults(self, rdid)

source code 

Called whenever a reset defaults is called by the preparation of the rendering engine or the thumbnail bean.

:param rdid: Current Rendering Def ID :type rdid: Long

_prepareRE(self, rdid=None)

source code 

Prepare the rendering engine with pixels ID and existing or new rendering def.

:return: The Rendering Engine service :rtype: ProxyObjectWrapper

_prepareRenderingEngine(self, rdid=None)

source code 

Checks that the rendering engine is prepared, calling _prepareRE if needed. Used by the assert_re method to wrap calls requiring rendering engine

:return: True if rendering engine is created :rtype: Boolean

simpleMarshal(self, xtra=None, parents=False)

source code 

Creates a dict representation of the Image, including author and date info.

:param 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 :return: Dict :rtype: Dict

Overrides: BlitzObjectWrapper.simpleMarshal

getStageLabel(self)

source code 

Returns the stage label or None

:return: Stage label :rtype: ImageStageLabelWrapper

shortname(self, length=20, hist=5)

source code 

Provides a truncated name of the image. E.g. ...catedNameOfTheImage.tiff

:param length: The ideal length to return. If truncated, will be ...length :type length: Int :param hist: The amount of leeway allowed before trunction (avoid truncating 1 or 2 letters) :type hist: Int :return: Truncated ...name :type: String

getAuthor(self)

source code 

Returns 'Firstname Lastname' of image owner

:return: Image owner :rtype: String

getDataset(self)

source code 

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.

:return: Dataset :rtype: DatasetWrapper

getProject(self)

source code 

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.

:return: Project :rtype: ProjectWrapper

getPlate(self)

source code 

If the image is in a Plate/Well hierarchy, returns the parent Plate, otherwise None

:return: Plate :rtype: PlateWrapper

getObjectiveSettings(self)

source code 

Gets the Ojbective Settings of the Image, or None

:return: Objective Settings :rtype: ObjectiveSettingsWrapper

getImagingEnvironment(self)

source code 

Gets the Imaging Environment of the Image, or None

:return: Imaging Environment :rtype: ImagingEnvironmentWrapper

getPixelsId(self)

source code 

Returns the Primary Pixels ID for the image.

:return: Pixels ID :rtype: Long

Decorators:
  • @assert_pixels

_prepareTB(self, _r=False)

source code 

Prepares Thumbnail Store for the image.

:param _r: If True, don't reset default rendering (return None if no rDef exists) :type _r: Boolean :return: Thumbnail Store or None :rtype: ProxyObjectWrapper

loadOriginalMetadata(self, sort=True)

source code 

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.

:param sort: If True, we sort Metadata by key :return: Tuple of (file-annotation, global-metadata, series-metadata) :rtype: Tuple (FileAnnotationWrapper, [], [])

_getProjectedThumbnail(self, size, pos)

source code 

Returns a string holding a rendered JPEG of the projected image, sized to mimic a thumbnail. This is an 'internal' method of this class, used to generate a thumbnail from a full-sized projected image (since thumbnails don't support projection). SetProjection should be called before this method is called, so that this returns a projected, scaled image.

:param size: The length of the longest size, in a list or tuple. E.g. (100,) :type size: list or tuple :param pos: The (z, t) position :type pos: Tuple (z,t)

Decorators:
  • @assert_re()

getThumbnail(self, size=(64,64), z=None, t=None, direct=True)

source code 

Returns a string holding a rendered JPEG of the thumbnail.

:type size: tuple or number
:param size: A tuple with one or two ints, or an integer. If a tuple holding a single int,
             or a single int is passed as param, then that will be used as the longest size
             on the rendered thumb, and image aspect ratio is kept.
             If two ints are passed in a tuple, they set the width and height of the
             rendered thumb.
:type z: number
:param z: the Z position to use for rendering the thumbnail. If not provided default is used.
:type t: number
:param t: the T position to use for rendering the thumbnail. If not provided default is used.
:param direct:      If true, force creation of new thumbnail (don't use cached)
:rtype: string or None
:return: the rendered JPEG, or None if there was an error.

getPixelRange(self)

source code 

Returns (min, max) values for the pixels type of this image. TODO: Does not handle floats correctly, though.

:return: Tuple (min, max)

Decorators:
  • @assert_pixels

requiresPixelsPyramid(self)

source code 
Decorators:
  • @assert_pixels

getPrimaryPixels(self)

source code 

Loads pixels and returns object in a PixelsWrapper

Decorators:
  • @assert_pixels

getChannels(self)

source code 

Returns a list of Channels, each initialised with rendering engine

:return: Channels :rtype: List of ChannelWrapper

Decorators:
  • @assert_re(ignoreExceptions= (omero.ConcurrencyException))

getZoomLevelScaling(self)

source code 

Returns a dict of zoomLevels:scale (fraction) for tiled 'Big' images. E.g. {0: 1.0, 1: 0.25, 2: 0.062489446727078291, 3: 0.031237687848258006} Returns None if this image doesn't support tiles.

Decorators:
  • @assert_re()

setActiveChannels(self, channels, windows=None, colors=None)

source code 

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]])

:param channels: List of active channel indexes ** 1-based index ** :type channels: List of int :param windows: Start and stop values for active channel rendering settings :type windows: List of [start, stop]. [[20, 300], [None, None], [50, 500]]. Must be list for each channel :param colors: List of colors. ['F00', None, '00FF00']. Must be item for each channel

getProjections(self)

source code 

Returns list of available keys for projection. E.g. ['intmax', 'intmean']

:return: Projection options :rtype: List of strings

getProjection(self)

source code 

Returns the current projection option (checking it is valid).

:return: Projection key. E.g. 'intmax' :rtype: String

setProjection(self, proj)

source code 

Sets the current projection option.

:param proj: Projection Option. E.g. 'intmax' or 'normal' :type proj: String

setProjectionRange(self, projStart, projEnd)

source code 

Sets the range used for Z-projection. Will only be used if E.g. setProjection('intmax') is not 'normal'

isInvertedAxis(self)

source code 

Returns the inverted axis flag

:return: Inverted Axis :rtype: Boolean

setInvertedAxis(self, inverted)

source code 

Sets the inverted axis flag

:param inverted: Inverted Axis :type inverted: Boolean

getPixelLine(self, z, t, pos, axis, channels=None, range=None)

source code 

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.

:param z: Z index :param t: T index :param pos: X or Y position :param axis: Axis 'h' or 'v' :param channels: map of {index: ChannelWrapper } :param range: height of scale (use image height (or width) by default) :return: rv List of lists (one per channel)

getRow(self, z, t, y, channels=None, range=None)

source code 

Grab a horizontal line from the image pixel data, for the specified channels (or active ones)

:param z: Z index :param t: T index :param y: Y position of row :param channels: map of {index: ChannelWrapper } :param range: height of scale (use image height by default) :return: rv List of lists (one per channel)

getCol(self, z, t, x, channels=None, range=None)

source code 

Grab a horizontal line from the image pixel data, for the specified channels (or active ones)

:param z: Z index :param t: T index :param x: X position of column :param channels: map of {index: ChannelWrapper } :param range: height of scale (use image width by default) :return: rv List of lists (one per channel)

getRenderingModels(self)

source code 

Gets a list of available rendering models.

:return: Rendering models :rtype: List of BlitzObjectWrapper

Decorators:
  • @assert_re()

getRenderingModel(self)

source code 

Get the current rendering model.

:return: Rendering model :rtype: BlitzObjectWrapper

Decorators:
  • @assert_re()

isGreyscaleRenderingModel(self)

source code 

Returns True if the current rendering model is 'greyscale'

:return: isGreyscale :rtype: Boolean

renderBirdsEyeView(self, size)

source code 

Returns the data from rendering the bird's eye view of the image.

:param size: Maximum size of the longest side of the resulting bird's eye view. :return: Data containing a bird's eye view jpeg

Decorators:
  • @assert_re()

renderJpegRegion(self, z, t, x, y, width, height, level=None, compression=0.9)

source code 

Return the data from rendering a region of an image plane. NB. Projection not supported by the API currently.

:param z: The Z index. Ignored if projecting image. :param t: The T index. :param x: The x coordinate of region (int) :param y: The y coordinate of region (int) :param width: The width of region (int) :param height: The height of region (int) :param compression: Compression level for jpeg :type compression: Float

Decorators:
  • @assert_re()

renderJpeg(self, z=None, t=None, compression=0.9)

source code 

Return the data from rendering image, compressed (and projected). Projection (or not) is specified by calling setProjection before renderJpeg.

:param z: The Z index. Ignored if projecting image. If None, use defaultZ :param t: The T index. If None, use defaultT :param compression: Compression level for jpeg :type compression: Float

Decorators:
  • @assert_re()

exportOmeTiff(self, bufsize=0)

source code 

Exports the OME-TIFF representation of this image.

:type bufsize: int or tuple
:param bufsize: 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
:return:        OME-TIFF file data
:rtype:         String or (size, data generator)

_wordwrap(self, width, text, font)

source code 

Wraps text into lines that are less than a certain width (when rendered in specified font)

:param width: The max width to wrap text (pixels) :type width: Int :param text: The text to wrap :type text: String :param font: Font to use. :type font: E.g. PIL ImageFont :return: List of text lines :rtype: List of Strings

createMovie(self, outpath, zstart, zend, tstart, tend, opts=None)

source code 

Creates a movie file from this image. TODO: makemovie import is commented out in 4.2+

:type outpath: string :type zstart: int :type zend: int :type tstart: int :type tend: int :type opts: dict :param opts: dictionary of extra options. Currently processed options are:

  • watermark:string: path to image to use as watermark
  • slides:tuple: tuple of tuples with slides to prefix and postfix video with in format (secs:int, topline:text[, middleline:text[, bottomline:text]]) If more than 2 slides are provided they will be ignored
  • fps:int: frames per second
  • minsize: tuple of (minwidth, minheight, bgcolor)
  • format:string: one of video/mpeg or video/quicktime

:return: Tuple of (file-ext, format) :rtype: (String, String)

Decorators:
  • @assert_re()

renderImage(self, z, t, compression=0.9)

source code 

Render the Image, (projected) and compressed. For projection, call setProjection before renderImage.

:param z: Z index :param t: T index

renderSplitChannel(self, z, t, compression=0.9, border=2)

source code 

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.

:param z: Z index :param t: T index :param compression: Image compression level :param border: :return: value

splitChannelDims(self, border=2)

source code 

Returns a dict of layout parameters for generating split channel image. E.g. row count, column count etc. for greyscale and color layouts.

:param border: spacing between panels :type border: int :return: Dict of parameters :rtype: Dict

renderSplitChannelImage(self, z, t, compression=0.9, border=2)

source code 

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.

:param z: Z index :param t: T index :param compression: Compression level :param border: space around each panel (int) :return: canvas :rtype: PIL Image

prepareLinePlotCanvas(self)

source code 

Common part of horizontal and vertical line plot rendering.

:returns: (Image, width, height).

renderRowLinePlotGif(self, z, t, y, linewidth=1)

source code 

Draws the Row plot as a gif file. Returns gif data.

:param z: Z index :param t: T index :param y: Y position :param linewidth: Width of plot line :return: gif data as String :rtype: String

Decorators:
  • @assert_re()

renderColLinePlotGif(self, z, t, x, linewidth=1)

source code 

Draws the Column plot as a gif file. Returns gif data.

:param z: Z index :param t: T index :param x: X position :param linewidth: Width of plot line :return: gif data as String :rtype: String

Decorators:
  • @assert_re()

getZ(self)

source code 

Returns the last used value of Z (E.g. for renderingJpeg or line plot) Returns 0 if these methods not been used yet. TODO: How to get default-Z?

:return: current Z index :rtype: int

Decorators:
  • @assert_re()

getT(self)

source code 

Returns the last used value of T (E.g. for renderingJpeg or line plot) Returns 0 if these methods not been used yet. TODO: How to get default-T?

:return: current T index :rtype: int

Decorators:
  • @assert_re()

getDefaultZ(self)

source code 

Gets the default Z index from the rendering engine

Decorators:
  • @assert_re()

getDefaultT(self)

source code 

Gets the default T index from the rendering engine

Decorators:
  • @assert_re()

getPixelsType(self)

source code 

Gets name of pixel data type.

:return: name of the image precision, e.g., float, uint8, etc. :rtype: String

Decorators:
  • @assert_pixels

getPixelSizeX(self)

source code 

Gets the physical size X of pixels in microns

:return: Size of pixel in x or O :rtype: float

Decorators:
  • @assert_pixels

getPixelSizeY(self)

source code 

Gets the physical size Y of pixels in microns

:return: Size of pixel in y or O :rtype: float

Decorators:
  • @assert_pixels

getPixelSizeZ(self)

source code 

Gets the physical size Z of pixels in microns

:return: Size of pixel in z or O :rtype: float

Decorators:
  • @assert_pixels

getSizeX(self)

source code 

Gets width (size X) of the image (in pixels)

:return: width :rtype: int

Decorators:
  • @assert_pixels

getSizeY(self)

source code 

Gets height (size Y) of the image (in pixels)

:return: height :rtype: int

Decorators:
  • @assert_pixels

getSizeZ(self)

source code 

Gets Z count of the image

:return: size Z :rtype: int

Decorators:
  • @assert_pixels

getSizeT(self)

source code 

Gets T count of the image

:return: size T :rtype: int

Decorators:
  • @assert_pixels

getSizeC(self)

source code 

Gets C count of the image (number of channels)

:return: size C :rtype: int

Decorators:
  • @assert_pixels

clearDefaults(self)

source code 

Removes specific color settings from channels

:return: True if allowed to do this :rtype: Boolean

_collectRenderOptions(self)

source code 

Returns a map of rendering options not stored in rendering settings.

  • 'p' : projection
  • 'ia' : inverted axis (swap Z and T)

:return: Dict of render options :rtype: Dict

_loadRenderOptions(self)

source code 

Loads rendering options from an Annotation on the Image.

:return: Dict of rendering options :rtype: Dict

loadRenderOptions(self)

source code 

Loads rendering options from an Annotation on the Image and applies them to the Image.

:return: True! TODO: Always True??

saveDefaults(self)

source code 

Limited support for saving the current prepared image rendering defs. Right now only channel colors are saved back.

:return: Boolean

Decorators:
  • @assert_re()

resetDefaults(self)

source code 
Decorators:
  • @assert_re()

countArchivedFiles(self)

source code 

Returns the number of Original 'archived' Files linked to primary pixels. Used by self.countImportedImageFiles which also handles FS files.

getImportedFilesInfo(self)

source code 

Returns a dict of 'count' and 'size' of the Fileset files (OMERO 5) or the Original Archived files (OMERO 4)

:return: A dict of 'count' and sum 'size' of the files.

getFileset(self)

source code 

Returns the Fileset linked to this Image. Fileset images, usedFiles and originalFiles are loaded.

getROICount(self, shapeType=None, filterByCurrentUser=False)

source code 

Count number of ROIs associated to an image

:param shapeType: Filter by shape type ("Rect",...). :param filterByCurrentUser: Whether or not to filter the count by the currently logged in user. :return: Number of ROIs found for the currently logged in user if filterByCurrentUser is True, otherwise the total number found.


Class Variable Details [hide private]

PROJECTIONS

Value:
{'normal':-1, 'intmax': omero.constants.projection.ProjectionType.MAXI\
MUMINTENSITY, 'intmean': omero.constants.projection.ProjectionType.MEA\
NINTENSITY, 'intsum': omero.constants.projection.ProjectionType.SUMINT\
ENSITY,}

LINE_PLOT_DTYPES

Value:
{(4, True, True): 'f', (2, False, False): 'H', (2, False, True): 'h', \
(1, False, False): 'B', (1, False, True): 'b',}