ImageJ Selections to Georeferenced Spatial Objects


As a result of the last UseR conference and some great spatial workshops and talks where I participated I decided to rework the selection dialog for the upcoming Bio7 2.3 to transfer ImageJ selection data as ‘Spatial Objects’ with the help of the package ‘sp‘ and the Java GDAL binding (version 1.7.1).


One reason to add this functionality is the great improvement for the use of the ‘spatstat’ package which I will present as part of a workshop at the next Imagej conference 2015 (I already gave a short overview of R and spatial packages in the 2012 conference).

In additon the supplied actions can help scientists which work with georeferenced data to profit from the wealth of ImageJ analyze methods and vice versa brings new maybe unknown GIS methods in the focus of microscopists.

The transferred objects can be converted easily to spatstat objects (ppp, psp, owin, etc.) and if equipped with a data frame converted to a marked point pattern.

Though it is already easy to convert ImageJ selections and image pixel data to spatstat objects in 2d and in 3d from ImageJ measurements with Bio7 the new actions make it easy to georeference the data (probably with some data dependent unknown limitations of projections of course – the Java API of GDAL emphasizes that for the used transform method) and add data frames to the spatial shapes (transferred ImageJ measurements data, created spreadsheet data, etc., available in the R workspace).

Below you can see a result of a dummy transfer of point data from a 7000*7000 georeferenced geotiff image where I selected and transferred points from a highly zoomed tiny region.

The right site of the image shows the selected (x,y) ImageJ selection. The left site shows the final converted (Lat, Lon) data loaded in the GIS software QGIS to control the pixel precision.


At all the georeferenced results seems to be exact in all test so far.

I think the new methods are a great help to transfer image measurements and selections to R ready for postprocessing with powerful spatial packages like, e.g., ‘spatstat’.

Leave a Comment