Trees | Indices | Help |
|
---|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
hash_sha1 = sha.new
|
|||
COLOURS = {'Red':(255, 0, 0, 255), 'Green':(0, 255, 0, 255), '
|
|||
EXTRA_COLOURS = {'Violet':(238, 133, 238, 255), 'Indigo':(79,
|
|||
CSV_NS = 'text/csv'
|
|||
CSV_FORMAT = 'text/csv'
|
|||
SU_LOG = logging.getLogger("omero.util.script_utils")
|
Imports: logging, getopt, sys, os, subprocess, omero, omero_Constants_ice, pixelstypetopython, EllipseData, RectData, MaskData, WorkflowData, ROIData, hashlib, sha
|
Draw test on image. @param draw The PIL Draw class. @param x The x-coord to draw. @param y The y-coord to draw. @param text The text to render. @param colour The colour as a PIL colour string to draw the text in. |
Draw line on image. @param draw The PIL Draw class. @param x0 The x0-coord of line. @param y0 The y0-coord of line. @param x1 The x1-coord of line. @param y1 The y1-coord of line. @param colour The colour as a PIL colour string to draw the text in. |
Convert an R,G,B value to an int. @param R the Red value. @param G the Green value. @param B the Blue value. @return See above. |
Convert an RGB value to a PIL colour value. @param RGB the RGB value. @return See above. |
Map a range to a string of numbers @param range See above. @return See above. |
Returns a hash of the file identified by filename
|
Calculate the Sha1 Hash from a data array @param data The data array. @return The Hash |
Creates an original file, saves it to the server and returns the result
|
Uploads an OriginalFile to the server
|
Downloads an OriginalFile from the server.
|
Attaches the original file (file) to a Project, Dataset or Image (parent)
|
Uploads a local file to the server, as an Original File and attaches it to the parent (Project, Dataset or Image)
|
Add the annotation to an image. @param updateService The update service to create the annotation link. @param image The ImageI object that should be annotated. @param annotation The annotation object @return The new annotationlink object |
Read the OriginalFile with fileId and return it as a string. @param rawFileService The RawFileService service to read the originalfile. @param iQuery The Query Service. @param fileId The id of the originalFile object. @param maxBlockSize The block size of each read. @return The OriginalFile object contents as a string |
Read an OriginalFile with id and column separator and return it as an array. @param rawFileService The RawFileService service to read the originalfile. @param iQuery The Query Service. @param fileId The id of the originalFile object. @param row The number of rows in the file. @param col The number of columns in the file. @param sep the column separator. @return The file as an NumPy array. |
Read the RawImageFlimFile with fileId and return it as an array [c, x, y] @param rawPixelsStore The rawPixelStore service to get the image. @param pixels The pixels of the image. @return The Contents of the image for z = 0, t = 0, all channels; |
Download the plane [z,c,t] for image pixels. Pixels must have pixelsType loaded. N.B. The rawPixelsStore must have already been initialised by setPixelsId() @param rawPixelsStore The rawPixelStore service to get the image. @param pixels The pixels of the image. @param z The Z-Section to retrieve. @param c The C-Section to retrieve. @param t The T-Section to retrieve. @return The Plane of the image for z, c, t |
Reads a local image (E.g. single plane tiff) and returns it as a numpy 2D array. @param imagePath Path to image. |
Reads all the images in the directory specified by 'path' and uploads them to OMERO as a single multi-dimensional image, placed in the specified 'dataset' Uses regex to determine the Z, C, T position of each image by name, and therefore determines sizeZ, sizeC, sizeT of the new Image. @param path the path to the directory containing images. @param dataset the OMERO dataset, if we want to put images somewhere. omero.model.DatasetI |
Parses a single line of cecog output and saves as a roi. Adds a Rectangle (particle) to the current OMERO image, at point x, y. Uses the self.image (OMERO image) and self.updateService |
Splits the image into component planes, which are saved as local tiffs according to unformattedImageName. E.g. myLocalDir/tubulin_P037_T%05d_C%s_Z%d_S1.tif which will be formatted according to dims, E.g. ('T', 'C', 'Z') Channel will be formatted according to channel name, not index. @param rawPixelsStore The rawPixelStore @param queryService @param c The C-Section to retrieve. @param t The T-Section to retrieve. @param imageName the local location to save the image. |
Create a file from the data of type format, setting sha1, .. @param updateService The updateService to create the annotation link. @param filename The name of the file. @param data The data to save. @param format The Format of the file. @return The newly created OriginalFile. |
Attach an array, stored as a csv file to an image. Returns the annotation. @param updateService The updateService to create the annotation link. @param image The image to attach the data to. @param filename The name of the file. @param namespace The namespace of the file. @return |
Upload the data to the server, creating the OriginalFile Object and attaching it to the image. @param rawFileStore The rawFileStore used to create the file. @param updateService The updateService to create the annotation link. @param image The image to attach the data to. @param filename The name of the file. @param namespace The name space associated to the annotation. @param data The data to save. @return The newly created file. |
Convert the numpy array data to a csv file. @param data the Numpy Array @return The CSV string. |
Upload the plane to the server attching it to the current z,c,t of the already instantiated rawPixelStore. @param rawPixelsStore The rawPixelStore which is already pointing to the data. @param plane The data to upload @param z The Z-Section of the plane. @param c The C-Section of the plane. @param t The T-Section of the plane. |
Upload the plane to the server one row at a time, attching it to the current z,c,t of the already instantiated rawPixelStore. @param rawPixelsStore The rawPixelStore which is already pointing to the data. @param plane The data to upload @param z The Z-Section of the plane. @param c The C-Section of the plane. @param t The T-Section of the plane. |
Create the renderingEngine for the pixelsId. @param session The current session to create the renderingEngine from. @return The renderingEngine Service for the pixels. |
Create the plane rendering def, for z,t @param Z the Z-Section @param T The T-Point. @return The RenderingDef Object. |
Get the rendered Image of the plane for the z, t with the default channels. @param renderingEngine The already instantiated renderEngine. @param z The Z-section. @param t The Timepoint. |
Get the rawPixelsStore for the Image with pixelsId @param pixelsId The pixelsId of the object to retrieve. @return The rawPixelsStore service. |
Get the rawFileStore for the file with fileId @param fileId The fileId of the object to retrieve. @return The rawFileStore service. |
Get the plane info for the pixels object returning it in order of z,t,c @param iQuery The query service. @param pixelsId The pixels for Id. @param asOrderedList |
Simply resests the rendering settings for a pixel set, according to the min and max values The rendering engine does NOT have to be primed with pixelsId, as that is handled by this method. @param renderingEngine The OMERO rendering engine @param pixelsId The Pixels ID @param minValue Minimum value of rendering window @param maxValue Maximum value of rendering window @param rgba Option to set the colour of the channel. (r,g,b,a) tuple. |
Creates a new single-channel, single-timepoint image from the list of 2D numpy arrays in plane2Dlist with each numpy 2D plane becoming a Z-section. @param session An OMERO service factory or equivalent with getQueryService() etc. @param plane2Dlist A list of numpy 2D arrays, corresponding to Z-planes of new image. @param imageName Name of new image @param description Description for the new image @param dataset If specified, put the image in this dataset. omero.model.Dataset object |
parse the inputs from the client object and map it to some other form, values may be transformed by function. @param client The client object @param session The current session. @param processFn A function to transform data to some other form. @return Parsed inputs as defined by ProcessFn. |
Get the ROI from the server for the image with the namespace @param iROIService The iROIService object @param imageId The imageId to retreive ROI from. @param namespace The namespace of the ROI. @return See above. |
Convert a list to a Comma Separated Value string. @param list The list to convert. @return See above. |
Convert a csv string to a list of strings @param csvString The CSV string to convert. @return See above. |
Register a workflow with the server, if the workflow does not exist create it and returns it, otherwise it returns the already created workflow. @param iQuery The query service. @param iUpdate The update service. @param namespace The namespace of the workflow. @param keywords The keywords associated with the workflow. @return see above. |
Finds the ROI with the given namespace linked to the image. Returns a collection of ROIs. @param roiService The ROI service. @param image The image the ROIs are linked to . @param namespace The namespace of the ROI. @return see above. |
|
COLOURS
|
EXTRA_COLOURS
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Jan 24 19:48:45 2012 | http://epydoc.sourceforge.net |