Skip to content

Instantly share code, notes, and snippets.

View sbesson's full-sized avatar

Sébastien Besson sbesson

View GitHub Profile
[defaults]
# Using Galaxy roles only
roles_path = ./vendor
#@UIService uiService
#@LogService log
# read in and display ImagePlus object(s)
from loci.plugins import BF
from loci.common import Region
from loci.plugins.in import ImporterOptions
from loci.plugins.util import LociPrefs
from ij import Prefs
from loci.formats import ImageReader
west:
team:
- jburel
- will-moore
- dgault
- manics
- hflynn
- pwalczysko
releases:
- name: OMERO 5.4.5
bfCheckJavaPath;
r=bfGetReader(cellh5Path);
% Load full image
I0 = bfGetPlane(r,1);
sizeX = r.getSizeX();
sizeY = r.getSizeY();
% Load image in tiles
for n = [2 4 8 16]
import java.io.IOException;
import loci.formats.FormatException;
import loci.formats.in.CellH5Reader;
public class CellH5Test {
public static CellH5Reader reader;
@sbesson
sbesson / TileWriter.java
Created May 3, 2017 16:46
Proposals to fix the behavior of the 5.3.0 tiling API for full image tiles
// Legacy mode (default - 5.3.0 behavior)
writer = new OMETiffWriter();
writer.setMetadataRetrieve(omexml);
// Write TIFFs in strips (no tiling)
// Initial tile sizes
iniTileSizeX = writer.getTileSizeX(); // returns sizeX
iniTileSizeY = writer.getTileSizeY(); // returns sizeY
// Set full image tiles
@sbesson
sbesson / multi-channel-4D-series.companion.ome
Last active January 24, 2017 13:04
5D companion example
<?xml version="1.0" encoding="UTF-8"?>
<OME UUID="urn:uuid:07504f88-7bc3-11e0-b937-2faf67bc00b3"
xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2016-06
http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd">
<Image ID="Image:0" Name="5D image">
<Pixels DimensionOrder="XYZCT" ID="Pixels:0:0" Type="int8" SizeC="3" SizeT="4" SizeX="128" SizeY="128" SizeZ="5">
<TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1">
<UUID FileName="plane.ome.tiff">urn:uuid:4978087c-a670-4b12-af53-256c62d8d101</UUID>
@sbesson
sbesson / TiledWriter.java
Last active January 23, 2017 13:51 — forked from emilroz/TiledWriter.java
Basic ome.tif tile writer
import java.io.IOException;
import loci.common.services.DependencyException;
import loci.common.services.ServiceException;
import loci.common.services.ServiceFactory;
import loci.formats.services.OMEXMLService;
import loci.formats.FormatException;
<?xml version="1.0" encoding="UTF-8"?>
<OME UUID="urn:uuid:07504f88-7bc3-11e0-b937-2faf67bc00b3"
xmlns="http://www.openmicroscopy.org/Schemas/OME/2016-06"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2016-06
http://www.openmicroscopy.org/Schemas/OME/2016-06/ome.xsd">
<Image ID="Image:0" Name="ROI with transforms">
<Pixels DimensionOrder="XYZCT" ID="Pixels:0:0" Type="uint8" SizeC="1" SizeT="2" SizeX="512" SizeY="512" SizeZ="8">
<Channel ID="Channel:0" SamplesPerPixel="1"/>
<TiffData FirstC="0" FirstT="0" FirstZ="0" IFD="0" PlaneCount="1">
@sbesson
sbesson / open_czi.m
Last active December 16, 2016 09:16
A set of scripts to manipulate Zeiss CZI options in Bio-Formats
% Check Bio-Formats and initialize logging
bfCheckJavaPath();
bfInitLogging();
% Create a reader
r = bfGetReader();
values = [true false];
for autostich = values
for attachments = values