Skip to content
Preview image and Bioformats metadata extraction for MyTardis
Branch: master
Clone or download
Pull request Compare This branch is 5 commits behind mytardis:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Documentation Status

MyTardis Bioformats Preview Image and Metadata Extraction

MyTardisBF is an App for the [MyTardis]( data management platform that provides tools for extracting preview images and metadata from common microscopy formats. The App uses the [Bioformats]( library via [python-bioformats]( and supports the extraction of preview images and limited metadata information for all images [supported by Bioformats]( Additionally, the filter supports extraction of metadata and preview images for each series in multi-series image formats like Leica LIF files.



These instructions assume that you have installed and configured MyTardis. If you haven't please follow the instructions in the latest [MyTardis documentation]( First install numpy into your MyTardis python environment:

pip install -U numpy

Then install the latest relesase of the mytardisbf app:

pip install -e git+

or for the latest development version:

pip install -e git+

If you using a virtualenv, remember to activate it first.

Add the following to your MyTardis settings file eg. /path/to/mytardis/tardis/

Add mytardisbf to your INSTALLED_APPS:


Enable the filter middleware for all actions:

MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ('tardis.tardis_portal.filters.FilterInitMiddleware',)
FILTER_MIDDLEWARE = (("tardis.tardis_portal.filters", "FilterInitMiddleware"),)

Then add the definition for the MyTardisBF filter:

   ["BioformatsMetadata", ""]),

The Bioformats filter can be run outside of the default celery queue. To specify a different celery queue, add the following to MyTardis's

BIOFORMATS_QUEUE = "nameofqueue"

where nameofqueue is the name of the celery queue in which you want to run the filter.

The maximum heap space use by the JVM in each celery worker can also be configured:



Get the source:

git clone
cd mytardisbf

To test in with MyTardis:

# Activate your MyTardis virtualenv
pip install -e .

Configuration of the App and Filters in MyTardis is the same as decribed above for normal Installation.


Note that many of the original unittests are skipped because the test image files were large and therefore not included in this repository. Nosetests is required: pip install nose

In order to run unittests, you will need to enable the javabridge nosetest plugin.

Add the following to setup.cfg:

with-javabridge = True
classpath = /path/to/loci_tools.jar

Note: loci_tools.jar can be downloade from the [python-bioformats]( github page or in the python-bioformats package inside with virtualenv where you installed it (this can be tricky to locate).

You can’t perform that action at this time.