ThermImageJ – ImageJ Functions and Macros for Thermal Imaging

After a long delay, I’ve released a series of functions and macros for working with thermal images in ImageJ/FIIJ. This is a sequel to the Thermimage Package for R.

The source files, instructions for installation, and basic function explanations can be found on github here:

The more difficult parts are getting the command line tools installed on your system. Installing the toolset will give easy access to the main macros from the toolbar or from the Plugins-Macros menu:

Additional look up tables are included as well, along with all the built in LUTs from ImageJ, allowing for easy access to palettes:

I’ve also added some short-cut ROI tools to help with the tedious task of extracting temperature information from moving targets in videos or image stacks:

This work is the result of ~3 years of self-directed inquiry. If you find this useful, please drop me a line to let me know, and kindly consider citing the software (or a future publication) when you use it.

Glenn J. Tattersall. (2019). ThermImageJ: Thermal Image Functions and Macros for ImageJ. doi:10.5281/zenodo.2652896.

Bugs or issues can be filed here.

Hot-headed squirrels use eye fat!

Our paper has just been published, this one a collaboration led by Amanda MacCannell from Dr. James Staples lab at Western University.

Here’s a summary (cribbed from the abstract):

We discovered an orbital lipid depot in the 13-lined ground squirrel during the first ever magnetic resonance image (MRI) of this common experimental model of mammalian hibernation. The volume of this depot increased in the autumn and decreased in the spring, suggesting an endogenous circannual pattern. Water-fat MRI revealed that throughout the year this depot is composed of ∼40% lipid, similar to brown adipose tissue (BAT). During arousal from torpor, thermal images showed higher surface temperatures near this depot before the rest of the head warmed, suggesting a thermoregulatory function. This depot, however, does not contain uncoupling protein 1, a BAT biomarker, or uncoupling protein 3. Histology shows blood vessels in close proximity to each other, suggesting it may serve as a vascular rete, perhaps to preferentially warm the eye and brain during arousals.

And a link to the paper:

Thermal video time lapse of a 13-Lined ground squirrel arousing from hibernation. Note the warm region behind the eye (1990 s) corresponding to the orbital lipid depot. Warm surface temperatures provide hints toward changes in relative blood flow and metabolism in the underlying tissue during the rapid rise in body temperature from 5 to 37C.

Reprint requests can be sent to


MacCannell, ADV,  Sinclair, KJ, Tattersall, GJ, McKenzie, CA, and Staples, JF. 2019. Identification of a lipid-rich depot in the orbital cavity of the thirteen-lined ground squirrel. Journal of Experimental Biology, 222: jeb195750 doi: 10.1242/jeb.195750

One thing I found really interesting about this was the fact that brain temperatures are kept warmer than body temperature, something I noticed back in 2009 studying Columbian ground squirrels (something also noted by Heller in his seminal work in the 1970s). At the time, I assumed this was related to higher metabolic heat production of the brain, and yet we observed rapid transient changes in hypothalamic temperature during hypoxic transitions that might readily have been explained by changes in blood flow. Further study in other hibernators seems to be required to corroborate Amanda’s neat findings!

From Tattersall and Milsom, 2009 J Physiol 587: 5259–5274

For a nice JEB write-up that succinctly summarises the study better than I can, please see Kathryn Knight’s article here:


Lizard Chapter Published

A book on the “Behavior of Lizards: Evolutionary and Mechanistic Perspectives” (Eds. Vincent Bels and Anthony Russell) has just been published with a chapter from my lab!

Chapter 1: Behavioral thermoregulation in lizards: Strategies for achieving preferred temperature – Ian R.G. Black, Jacob M. Berman, Viviana Cadena, and Glenn J. Tattersall

This work was primarily the result of collaborative work of my former graduate students, Ian Black, Jacob Berman and Viviana Cadena. I am very grateful to have great graduate students willing to work on these projects.

If you are interested in accessing this chapter, contact me by email or on researchgate.

Poetry of Cassowary Casques

So, we published a paper on Cassowary Casques the other day, and then we heard from a Science Communications person that he had written a poem inspired by our research!

How cool is that!?

The study itself was conducted by Danielle Eastick of La Trobe University (Dr. Kylie Robert and Dr. John Lesku), and published in Scientific Reports recently. Here is a link to the paper.

I won’t link to all the overhyped media reports since they tend to misinterpret (e.g., no, we have not discovered the secret to the casque) the science just like they misinterpreted our toucan bill study.

But here are the main results:

One of the most beautiful and dangerous animals around!

Abney Defends MSc

Congratulations to Curtis Abney, MSc for his successful defence today! His thesis on “Thermal ecology of eastern garter snakes in a southern Ontario peatland” was a joy to supervise, namely because Curtis did all the hard work. Always enthusiastic and willing to wade through tick-infested field sites, Curtis studied whether garter snakes make use of thermal cues to inform site selection in the field.

Thanks of course to Curtis’ committee members: Dr. Cheryl McCormick, Dr. Miriam Richards, Dr. Liette Vasseur and Dr. Njall Rollinson (External examiner from U of Toronto).

Curtis will be missed by all members of the lab as he moves back to BC aand takes the next big step in his scientific life.

Learning from Tortoises

Our paper on red-footed tortoise reversal learning is now in press! This study represents the efforts of Justin Bridgeman during his honours thesis examining behaviour flexibility and cognition in tortoises. Here is a link to the paper:

Bridgeman, JM and Tattersall, GJ. 2019. Tortoises develop and overcome position biases in a reversal learning task. Animal Cognition. (): 1-11. 10.1007/s10071-019-01243-8

Many thanks to Dr. Miriam Richards, TAs, Tom Eles, and all the students from our animal behaviour course (2013 – 2015) who helped with all the pre-training and Y-maze familiarisation trials that pre-dated Justin’s honours research. And many thanks to all the tortoises who participated.

Tortoise approaching the stimulus (mock experiment with cell phone video)

Tortoise receiving a reward for approaching the correct stimulus.

Here are some sample videos from the supplementary material:

Tortoise in the Y-maze examines both stimuli and slowly approaches the rewarded stimulus on the left.

Tortoise late in the training approaches the rewarded stimulus without pause.

Tortoise moves according to its developed position bias, almost makes an error but corrects itself, and approaches the positive stimulus receiving the reward.

Parasites Change Snail Thermal Preference

My recent MSc student’s first paper is in press and published! 

Wang, SYS, Tattersall, GJ, and Koprivnikar, J. 2019. Trematode parasite infection affects temperature selection in aquatic host snails. Physiological and Biochemical Zoology, 92(1):71–79.

Susan examined whether naturally occurring trematode parasite loads influenced snail (host) thermal preference and found that there was an approximately 2°C higher preferred temperature in parasitised snails compared to non-parasitised individuals. 

But, one of the challenges with laboratory thermal preference experiments is that slow moving ectotherms can become “thermally trapped” in colder temperatures, and thus their null (in the absence of a preference) distribution needs to be assessed to compared to the observed distributions.  So we employed some mathematical modelling to assist in determining the null distributions.

The code and explanation for the code can be found here on github:

The link to the paper can be found here:

Great job, Susan!  And thanks to Dr. Janet Koprivnikar (Ryerson Univ) – Susan’s co-supervisor.

Thermal Image Talks

Just returned from an interesting day of thermal imaging on topics ranging from birds to asphalt and with no particular connection other than the technological one.  It was quite an interesting contrast, but the engineers, technicians, electricians, and thermographers seemed reasonably interested in our work.  I am very grateful to the FLIR folk (Paul Frisk and Rob Milner) for inviting us to speak and especially grateful to Joshua Robertson and Erich Eberts, my “extended” family of research student collaborators for talking about our work.

Joshua spoke about his new results on stress physiology and the use of infrared thermal imaging and Erich spoke about his crowd-funded hummingbird research.  They did an excellent job!   Certainly well prepared for any upcoming conferences!

InfraCanada Agenda - Niagara Falls.png

Self-reflection puts fish in hot water

In a narcissistic age, it is not uncommon to think of situations in which spending too long focussed on ourselves can lead to harm.  But what about fish, you might ask?

Today our paper entitled “Social cues can push amphibious fish to their thermal limits” was published in Biology Letters.

This manuscript represents an experimental field study performed in Belize this past spring examining how social information can delay the behavioural thresholds that an amphibious fish exhibits to escape from a thermally stressful environment.  As natural environments are complex systems including abiotic and biotic stressors that may act synergistically, it is important to understand how these interactions operate and impact an animal’s thermal limits.

The mangrove rivulus (Kryptolebias marmoratus), in particular, is an intriguing fish since it routinely leaves the water (emerge) to avoid stressful conditions and in some instances can survive for weeks out of water.  If the water gets too hot or too hypoxic, rivulus will simply jump out and chill out on land.


K. marmoratus contemplating life on land.  Not quite sure yet.  Photo courtesy Keri Martin, Mount Allison University.


K. marmoratus out of water – Image courtesy of Keri Martin, Mount Allison University.

In the present study, we demonstrate that the decision to emerge from water onto land is also socially sensitive.

So, what does this have to do with self-image?  Studying social cues from conspecifics can be a challenge if the conspecifics jump out of water first, so we designed an experiment to provide continuous social cues, using a simple mirror placed underwater.

Tank Schematic.jpg

Supplementary Figure from manuscript

Key Finding: The presence of cues from a conspecific (produced from a mirror) caused the rivulus to delay leaving water until they reach a higher temperature.  This delay is clearly a behavioural decision and not due to enhanced tolerance of warmer temperatures, since their CTmax was not sensitive to the presence of social cuing from the mirror.

This discovery is important since it demonstrates that critical behavioural decisions may affect survival in an animal living in a thermally stressful environment.  Much research into thermal stress to date has focussed on individual responses but social cues are likely just as important to animals in the wild.  We have only addressed what simple visual cues produced by a mirror do to their emersion behaviour.  Extrapolating to how multiple cues will work is, of course, open for future investigation.


Full Citation:

Currie, S and Tattersall, GJ. 2018. Social cues can push amphibious fish to their thermal limits.  Biology LettersLink here



Further Information

K. marmoratus inhabit stress aquatic habitats and can be found often inside crab burrows.

See Dr. Andy Turko’s video from 2012.  It is fascinating to watch:


On this year’s trip we took more images attempting to visualise the thermal environments inhabited by the various fish living in the Long Caye.  Here is a thermal image of a crab burrow:


Thermal image of a crab burrow (central triangular region) capturing a crab leaving the burrow (bottom centre of image).  Rivulus can be found cohabiting with crabs or each other.  Image taken in April 2018 with a FLIR T1030K thermal imaging camera.

Ever hopeful to observe rivulus emerging spontaneously in the field we set up various camera traps and go pros and time lapse images.

The following video depicts a time lapse video (each frame 10 apart) captured with a simple IR webcam of a outdoor, artificial burrow with water, following 3 rivulus over time.  You can see one emerging in the bottom part of the screen and staying out of water.


We want to acknowledge Team Rivulus and Fellow Scientists:

Dr. Patricia Wright, University of Guelph

Dr. Suzie Currie, Acadia University

Dr. Andy Turko, University of Guelph

Dr. Tamzin Blewett, University of Alberta

Dr. Emily Standen

Giulia Rossi, University of Guelph

Louise Tunnah, University of Guelph

Keri Martin, Mount Allison University

Dr. D. Scott Taylor (

Itza Lodge, Long Caye, Belize