IN-FOCUS: Making Imaris a Bit(plane) Faster

Most of the work of the Bioimaging Hub is concentrated on acquiring images – choosing the right equipment, optimising settings, advising about sample prep, etc. We do, however, have a few systems dedicated to analysing images too. We’ve got a system running Arivis Vision4D which specialises in extremely large datasets, such as Lightsheet data, as well as a system running Bitplane Imaris. We’ve had Imaris for longer and so it’s seen a lot more use. This was recently updated with a Filament Tracer module for analysing neuronal processes. Shortly after this upgrade was added we experienced a severe slowdown in the software. It would take over a minute to go from the ‘Surpass’ view, where images are analysed, to the ‘Arena’ view, where files are organised. The information for the files in Arena is stored in a database and we suspected that the database was at fault.

Imaris hanging when switching from Surpass to Arena. It would do this for about 65 seconds every time a change was made.

A call with Imaris technical support was arranged and the software examined. There were no apparent errors in any of the logs and the database was functioning as it should. The only advice available was to thin down the number of entries in the database – we were told it had nearly 240,000 entries which, even accounting for metadata, seemed vastly excessive for the number of files in Arena.

Complete database dump of nearly 240,000 entries.

I decided to try to trim the database.

My first thought was the Filament Tracer module was generating a large amount of statistics and these were being stored in the database. A couple of users had been experiencing crashes when accessing these statistics so it was possible that slow database responses were bringing the software down. I backed up all datasets which used the Filament Tracer (a process far more laborious than it should be) and deleted them all from Arena. This dropped the database access time from 65 seconds to 60. Not that much of a result.

My next thought was that the co-ordinates for the vertices of surface renders might have been clogging up the database. We’ve generated quite a lot of 3D models of pollen grains and cells so this was potentially a lot of data. I went through the same laborious process of exporting all these datasets and deleted them. Again, little improvement.

I decided I needed to look at the database directly. The underlying database runs on PostgreSQL as part of the BisQue bioimaging package. Using the pgAdmin tool I began to browse the database to see where the data was held and how it was organised.

Structure of the underlying database.

I couldn’t find any trace of it so I exported the entire thing as a text file and loaded it into NotePad++. As Imaris technical support had told us, it was enormous – 55MB of text. Scanning the file, eventually I found that practically all the data was held in a database table named ‘taggable’. I’d skipped over this at first as the name was so nondescript.

Using Notepad++ to check a database dump and find where the data is stored – the table named ‘taggable’.

Once I knew all the data I needed was in this table I began to examine it. The first thing that jumped out at me was the huge number of entries in the database relating to datasets from our Leica confocal system. This system stores its data as a series of tif images, one per channel, one per z-position for z-stacks. Every single one of these files had its own database entry as a dependency for a ‘resource_parent_id’.

Database entries for Leica datasets. One record per channel, per z-position which becomes a huge number of entries.

A lot of old Leica datasets had been loaded into Arena recently to see if any new information could be extracted from them and this had massively inflated the size of the database. I exported all these datasets as new Imaris .ims files and deleted them from Arena. This reduced the number of database entries from just under 240,000 to just over 16,000. As a result the database access time dropped to about 18 seconds. Much more manageable but still a bit slow.

Looking at the database entries again, I could see that there were still lots of entries relating to Leica datasets. I went back to look at Arena but there was no sign of them. These were orphaned entries relating to non-existent data. As it was impossible to delete them from Arena, I identified all of their resource_parent_id numbers and used pgAdmin to delete them

Manually deleting orphaned database entries.

It then occurred to me that the indexes for the database were probably totally out of date so my final task to optimise things was the rebuild all of the indexes in pgAdmin

Rebuilding the table indexes.

All of these steps got the database access time down to 3 seconds – quite a bit improvement on the original 65 seconds! Importing some of the exported datasets as Imaris .ims files slowed it back down to about 10 seconds so it’s apparent that the database scales very poorly. Still a lot better than when the Leica datasets were numerous separate files though. It looks to me that the database design favours flexibility over scaling which ends up being not very useful if you want to use it to organise a reasonable amount of imaging data.

So if you’ve got Imaris database lag there’s a few things you can try. The main improvement was to make sure your datasets are represented by single files, either by exporting them as Imaris .ims files or converting them to something like OME-TIFF first.

Marc Isaacs, Bioimaging Technician

EQUIPMENT: New X-Clarity tissue clearing system.

One of the problems associated with imaging fluorescence in large biological samples is the obscuring effects of light scatter. Traditionally this has meant physically sectioning the material into optically-thin slices in order to visualise microscopic structure.  With the advent of new volumetric imaging techniques, e.g.  lightsheet microscopy, there is increasing demand for procedures that allow deeper interrogation of biological tissues. With this in mind, an innovative clearing system has recently been purchased through generous donations to the European Cancer Stem Cell Research Institute (ECSCRI). The equipment, which will be housed in ECSCRI lab space, allows large, intact histological samples to be rendered transparent for fluorescent labelling and 3D visualisation by confocal and lightsheet microscopy.

The X-Clarity tissue clearing system is designed to simplify, standardise and accelerate tissue clearing using the CLARITY technique (an acronymn for Clear Lipid-exchanged Acrylamide-hydridized Rigid Imaging/Immunostaining/in situ-hybridization-compatible Tissue hYdrogel). In the technique,  preserved tissues are first embedded in a hydrogel support matrix. The lipids are then extracted via electrophoresis to create a stable, optically transparent tissue-hydrogel hybrid that permits immunofluorescent labelling and downstream 3D imaging.

The new equipment and associated reagents will have wide relevance to many areas of research in Cardiff,  including deep visualisation of breast cancer tumours by Professor Matt Smalley’s research group  using  the Bioimaging Hub’s new lightsheet system. You can see a video here that shows the power of the  CLARITY technique for high resolution 3D visualisation  of tissue and organ structure.

Further Reading


EQUIPMENT: Fast module upgrade for the Zeiss LSM880 Airyscan confocal.

Above: Maximum intensity projections of actin stress fibres (red) and microtubules (green) of an endothelial cell imaged on a Zeiss LSM880 Airyscan confocal microscope. Z-stacks were sampled via: A. Conventional confocal optics (5 minutes scan time) B. Airyscan Fast – 0.5x Nyquist sampling (30 seconds scan time) C. Airyscan Fast – 1.5x Nyquist sampling (1 minute scan time) D. Airyscan Fast – 2x Nyquist sampling (5 mins scan time).

Through generous support of Cardiff School of Biosciences, the Bioimaging Research Hub has recently upgraded its Zeiss LSM880 AIryscan confocal system for fast image acquisition via the Zeiss Fast module upgrade. The AIryscan system allows imaging at a resolution  1.7x that of conventional confocal optics (find out more here) and the new fast  upgrade provides a 4x speed enhancement with improved signal to noise ratio. The technique uses  beam shaping optics to elongate the excitation spot along the y axis so that it simultaneously covers four lines in a single scan. This parallelisation approach, whilst increasing acquisition speeds by a factor of four, allows high pixel dwell times to be maintained resulting in high a signal to noise ratio.  You can read more about the technique below or, if you would prefer,  kick back and watch this explanatory webinar courtesy of Zeiss.

Further reading

Huff, J. (2016) The Fast mode for Zeiss LSM880 with AIryscan: high-speed confocal imaging with super-resolution and improved signal to noise. Nature Methods 13: 10.1038/nmeth.f.398.


IN FOCUS: Making your mind up: 3D printing of brains for Cardiff Museum’s Brain Games 2018

Above: Guess which animal species. Some of the 3D printed brains for the Brain Games 2018 event.

How many of you can tell the difference between the brains of, say, a human, a black rhino and a Sloth bear? Nope, me neither, but apparently, when it comes to brains, it’s not just size that counts (see below). This conundrum is one of the many fab activities on offer this weekend at the National Museum of Wales annual Brain Games event funded by the Society for Neuroscience and highlighting the range of brain-related research undertaken at Cardiff University.

In the build up to the event, our very own Pete Watson in collaboration with Emma Lane (PHRMY) has been 3D printing brains from a wide variety of animal species, including human, on the Bioimaging Hub’s Ultimaker 3 extended dual colour 3D printer. However, just to make things a little more challenging, they’ve generated two sets of 3D prints: the first set of brains are anatomically correct scale models, the other set have all been 3D printed at an identical size – and it’s up to you, dear reader, to determine which brain belongs to what animal species.

Above are a small selection of the 3D printed brains that will be on display at the National Museum this Sunday, including a glow in the dark brain from…well, that would be telling wouldn’t it?!


Further information:


IN FOCUS: Virtual microscopy database: an update.

You may remember one of our blogs from 2015 about a virtual histology slidebox  in development by the Bioimaging hub? If not, link here.  Well, I’m very pleased to report that we’ve made considerable progress since then.

The resource has now been moved from its humble beginnings (a Rasberry Pi/raid drive set-up) to a new PC server based within the Bioimaging hub. The database has also been developed significantly through mySQL which allows efficient management of the image metadata via a web interface, allowing the images to be sorted, filtered and navigated online.  

The image collection has also been expanded significantly; thus, in addition to the original histopathology collection (which contained approximately 400 digitised sections of normal and pathological tissues), we now have two new additional sections on cell biology and parasitology.

The cell biology section contains both zoomable/navigable images and interactive 3D models of intracellular structure, including major organelles, cytoplasmic inclusions and cytoskeletal components. These were all generated from confocal fluorescence datasets imaged using our Zeiss LSM880 airyscan confocal system and rendered in 3D via Bitplane Imaris. The parasitology section, meanwhile, contains over 200 new zoomable/navigable  images of various parasitic species,  organised phylogenetically for easy reference and sorting. As before, these images were generated using our Navigator slide scanning system.

So far, the database has been trialled for small group anatomy teaching, as well as for a number of BIOSI practical classes including Research Techniques (#BIT002), Advanced Research Techniques (#BI4002) and the Identifying Organelles (#BI2231) module. It is also utilised extensively for outreach and engagement activities within the Bioimaging hub to showcase our research capabilities.

As the database is a bespoke system that has been developed in house, there are no costly subscriptions involved. We are also uniquely positioned within the Bioimaging hub to expand and develop the database according to the needs of the user.  It therefore has enormous potential as a centralised repository for microscopical image data for teaching, research and outreach/engagement purposes.

We are planning to add additional sections on plant biology and entomology  and we would welcome collaboration with any BIOSI staff who have access to the relevant slide resources and would be happy to  help in curating these collections.

Ultimately, the plan is to find a permanent home for the virtual microscopy database as part of the new e learning and assessment facility (eLEAF) within BIOSI.

Please take a look at the database here: feedback (+/-) would be welcome.

Thanks again to all involved so far.


IN FOCUS: 3D pollen prints not to be sniffed at: printing pollen for the Met office.

Above:  Not to be sneezed at: 3D pollen prints for the Met Office (grass, green; oak, yellow and birch, blue).

Disclaimer: If you suffer from hayfever then please avoid spending too long on this page – it may be detrimental to your health!

I bet you didn’t know that one in five people  suffer from hayfever and that 95% of pollen sufferers are allergic to grass pollen in the UK alone? Well neither did I until I visited the Met Office’s  really informative pollen forecast website. 

It seems that some of the worst offenders are pollen grains from grass, oak and birch which play havoc with the mucous membranes during the pollen season, causing sneezing, nasal congestion, itchy eyes and triggering asthma in susceptible individuals (and to make matters worse,  these conditions are exacerbated  by drinking alcohol – so no respite there!)

Having read some of our previous blogs (here and here), the Met Office recently asked the Bioimaging Hub if we would generate 3D printed models of some of the worse culprits  (shown above) for their outreach & engagement programme to help promote awareness of hayfever. 

The 3D prints were generated from surface-rendered confocal microscope volume datasets with help from BIOSI 3D printing. We’ve used the technique to generate physical models of a variety of microscopic samples ranging in size from subcellular organelles to whole developmental organisms. If you’re interested, then further details of the methodology are available below.


Further reading:

IN FOCUS: Getting to the root of the problem.

Above: ‘Crowning glory’: Webcam shots (1-12) showing stages in the process of 3D printing a giant human molar (left) and the resultant 3D print with support scaffold removed (central and right).

The other day we were presented with a problem: was it possible to generate a 3D model of a human tooth that could be used for dental teaching and outreach purposes? The only thing was, the individual concerned didn’t specify the desired size. With a build volume of 215 x 215 x 300mm and printing resolution of 20-200 microns, our new Ultimaker 3 Extended 3D printer can print BIG, so what better application to put the new instrument through its paces! After a quick search on, we downloaded a stereolithography (.stl) file of a human molar tooth segmented from computed tomography (thanks to fvillena). We decided to print it as big as we could, but using the lowest print resolution and lowest level of infill. The results, shown above, are quite impressive – it took approximately 24 hours to print the tooth (crown-side down, root-side up) and with the support scaffold removed resulted in a 3D model approximately 300mm in height – about the same size as tooth from an adult T-Rex!! I suppose we can now be accused of (wait for it…) getting a bit long in the tooth!


Further reading:

NEWS: Microscope maintenance course: keeping your ‘scope in tip-top condition.

Above: Some of the class microscopes in various states of dismantlement.

It goes without saying, to get the very best out of a microscope you need to know how to optimise and maintain its performance. That said,  you’d be surprised just how many microscopists don’t know how to properly set up and maintain their microscopes.

Recently, we run our first  microscope maintenance course as part of Cardiff University’s Continuous Professional Development (CPD) programme.  We can’t tell you who it was for; but suffice to say, they use microscopes a lot in their work. The two day course covered the basics of light microscopy and the procedures necessary to keep a microscope squeaky- clean and correctly aligned. The practical element of the course saw delegates clean, rebuild and align both upright widefield and stereo-zoom microscopes. 

Pleasingly, the course was well-received with very good to excellent feedback. Thanks to all who participated on the two busy but  enjoyable days. Thanks must also go to our undergrad students for soiling and mis-aligning the microscopes ahead of the course – they did a far better job than we ever could ; )

Further reading:


EQUIPMENT: New Ultimaker 3 ‘Extended’ 3D Printer.

Above: The new Ultimaker ‘Extended’ 3D printer building a stage insert for a novel microscope system.

The Bioimaging Research Hub has recently purchased an Ultimaker 3 ‘Extended’ professional 3D printer. The printer will allow users to 3D print bespoke pieces of scientific equipment or generate scale models  of microscopic samples for use in their research as well as for teaching, outreach and engagement activities (examples can be  found  here and here).

The 3D printer utilises FDM (Fused Deposition Modelling) printing technology and has a range of advanced features allowing the fabrication of professional quality, high resolution 3D prints. The printer can print in two different colours or a single colour in addition to a dissolvable PVA support scaffold, thus allowing complex overhanging structures to be printed at high fidelity whilst significantly reducing  finishing time.

The printer has a large build volume (215 x 215 x 300mm), supports a range of materials (nylon, PLA, ABS, CPE and PVA) and has a print resolution of 20-200 microns.  The printer is wi-fi enabled with an internal webcam so that users can remotely monitor the progress of their 3D prints.

Further details of the equipment are available through our equipment database.

Further reading:


EQUIPMENT: New Zeiss Lightsheet Z.1 Microscope.

Above: The new Zeiss Lightsheet Z.1 fluorescence microscope.

Above: Tripping the light fantastic: the new Zeiss Lightsheet Z.1 fluorescence microscope.

A state-of-the-art, Zeiss Lightsheet Z.1 system has recently been installed within the Bioimaging Research Hub (BIOSI 2; E/0.03). The single plane illumination microscope (SPIM) allows fast and gentle multi-channel 3D/4D fluorescence imaging at the sub-cellular level. The system offers the potential of whole organ imaging of fixed cleared samples and can provide an unprecedented insight into developmental processes occurring in live model organisms such as Arabadopsis thaliana (Thale Cress), Danio rerio (Zebrafish) and Drosophila melanogaster (Fruit fly), and in vitro organoid at a high spatio-temporal resolution. Further information about this system is available via the Bioimaging Hub equipment database.


Further reading: