Skip to content

Filter for generating image thumbnails and storing metadata for MyTardis using LOCI Bioformats

Notifications You must be signed in to change notification settings

steveandroulakis/bioformatsimage-mytardis-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bioformats Image MyTardis Filter

dm3 files only supported for now. However, Bioformats supports many formats so potentially so will this filter without much effort.

Filter for generating image thumbnails and storing metadata for MyTardis using LOCI Bioformats' command line binaries that interact with their jar file.

Screenshot

Todo

  • Support more files than just dm3
  • Error handling if the dm3 file fails for whatever reason
  • More detailed metadata parameters than simple text output

Requirements

Installation

  • Unzip bftools.zip into a directory on the MyTardis server
  • Place loci_tools in the same directory as the unzipped bftools
  • Make sure the MyTardis web server user can read the bftools' directory contents

Git clone this repository into /path/to/mytardis/tardis/tardis_portal/filters:

git clone git@github.com:steveandroulakis/bioformatsimage-mytardis-filter.git bioformatsimage

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

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

FILTER_MIDDLEWARE = (("tardis.tardis_portal.filters", "FilterInitMiddleware"),)

The above enables the filter middleware for all actions.

Then add the definition for this filter.

POST_SAVE_FILTERS = [
   ("tardis.tardis_portal.filters.bioformatsimage.bioformatsimage.make_filter",
   ["BIOFORMATS", "http://tardis.edu.au/schemas/bioformats/1",
    "/path/to/bftools/bfconvert",
     "/path/to/bftools/showinf"]),
   ]

Where the bftools directory is correct for your installation.

cd /path/to/mytardis and load the parameter schema into the MyTardis database:

bin/django loaddata tardis/tardis_portal/filters/bioformatsimage/bioformats.json

Restart MyTardis. From now on, all dm3 files loaded will have preview images and metadata extracted and stored alongside the file itself.

About

Filter for generating image thumbnails and storing metadata for MyTardis using LOCI Bioformats

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages