Skip to content

Instantly share code, notes, and snippets.

<docs>
# NGFF image file Loader for ImageJ.JS
[Next-generation file formats](https://ngff.openmicroscopy.org/latest/) is a specification for storing bioimaging
data in the cloud.
This plugin enalbes loading NGFF image into ImageJ.JS.
The implementation is adapted from the [OMERO ImJoy](https://github.com/will-moore/omero-imjoy) made by @will-moore
#!/usr/bin/env python
import pandas
import omero.clients
import omero.cli
import omero
import os
import argparse
import json
import sys
from omero.gateway import BlitzGateway
from omero.cli import cli_login
from omero.model import StatsInfoI
from omero.rtypes import rdouble
@will-moore
will-moore / download_pdi.py
Created October 8, 2021 11:03
Python script to download original files from Project/Dataset/Image in OMERO using cli download command
import argparse
import sys
import os
from omero.cli import cli_login, CLI
from omero.gateway import BlitzGateway
from omero.plugins.download import DownloadControl
@will-moore
will-moore / omero_rois.csv
Created October 30, 2021 22:07
Batch_ROI_Export from OMERO
We can't make this file beautiful and searchable because it's too large.
image_id,image_name,roi_id,shape_id,type,text,z,t,channel,area (µm),length (µm),points,min,max,sum,mean,std_dev,X,Y,Width,Height,RadiusX,RadiusY,X1,Y1,X2,Y2,Points
806,"Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ.dv",179764,179764,polygon,"0001-0001-0125",1,1,CENT2,0.15367967833454133,,98,631.5927124023438,2212.172119140625,103127.09680175781,1052.317314303651,409.68381187031326,,,,,,,,,,,"130,117 131,117 131,126 130,126 130,134 128,134 128,133 127,133 127,132 124,132 124,133 123,133 123,132 122,132 122,130 123,130 123,128 122,128 122,127 121,127 121,126 123,126 123,125 124,125 124,124 125,124 125,123 127,123 127,124 128,124 128,122 127,122 127,117 128,117 128,116 130,116"
806,"Centrin_PCNT_Cep215_20110506_Fri-1545_0_SIR_PRJ.dv",179765,179765,polygon,"0001-0002-0127",1,1,CENT2,0.015681599830055237,,10,656.56787109375,877.3853759765625,7558.601013183594,755.8601013183594,74.44378384463185,,,,,,,,,,,"134,126 135,126 135,129 133,129 133,128 132,128 132,125 134,125"
806,"Centrin_PCNT_Cep215_20110506_Fri-1545_
@will-moore
will-moore / max_intensity_projection.py
Created March 21, 2022 15:50
Python script to create a Max Intensity Projection for an OMERO Image
# see https://forum.image.sc/t/maximum-intensity-projection-feature-in-omero-web/54392/5
import argparse
import sys
import omero.clients
from omero.cli import cli_login
from omero.rtypes import wrap
from omero.gateway import BlitzGateway
import numpy as np
@will-moore
will-moore / copy_annotations.py
Created March 28, 2022 11:31
OMERO cli script to copy annotations from an Image to another
# https://forum.image.sc/t/how-to-copy-the-metadata-set-of-an-image-and-paste-it-to-a-new-one/60357
import argparse
import sys
import omero
import omero.clients
from omero.cli import cli_login
from omero.gateway import BlitzGateway
@will-moore
will-moore / ngff_plate_segment_add_labels.py
Created April 27, 2022 15:00
process all the images in an OME-NGFF plate, segmenting them and adding OME-NGFF labels to each image
import os
import zarr
from skimage.filters import threshold_otsu
from skimage.segmentation import clear_border
from skimage.measure import label
from skimage.morphology import closing, square
from ome_zarr.io import parse_url
@will-moore
will-moore / plate_rename_images.py
Created September 16, 2022 09:12
rename images in a Plate in OMERO
# https://forum.image.sc/t/imports-of-tiff-to-omero/71648/9
# usage: with plate ID - You will be asked for login...
# $ python plate_rename_images.py 1234
import argparse
import sys
from omero.cli import cli_login
from omero.gateway import BlitzGateway