Pages

Free ImageJ Macro -- for citing images

(of course all IJ macros and IJ itself are free...)

So I got sick of constantly clicking away just to resize an image and add some citation text to the bottom and then name the file that exact thing; in fact, it was a deterrent to blogging -- yes, I am *that* lazy, apparently. At 4 in the morning today, my latent inner yet-unexplored codemonkey decided it needed an ImageJ macro for doing that, and it needed it then, at 4 in the morning, the day before I fly for holidays, and therefore a very busy day. After a couple hours of failed negotiation attempts between brick walls and my head (and much profanity), I finally produced a piece of code that not only does something, but does what I want it to! Being an utter failure at anything technical (engineering aptitude turns out to not be particularly heritable, as my parents' experiment demonstrates), I get soooo excited when something I slap together out of copy+paste and single-finger typing on the keyboard actually works, that I absolutely have to share it with the world. Even if it's pathetically minor and useless. Shhh.

World, behold -- an ImageJ macro for adding citations to images!
// This macro creates citation (or other input) text by adding a 20p strip to the bottom of the image, aligned right
// Image is saved in Documents as the ref input text
// WARNING: saving several images with same citation input WILL result in overwrite!

ref=getString("Reference", "ref");
var width = getWidth();
var height = getHeight();
height=height+20;
run("Canvas Size...","width=&width height=&height position=Top-Center");

var textwidth=getStringWidth(ref);
var textmargin=width-(textwidth+5);
drawString(ref,textmargin, height-5);
var path="C:\\";
var name=path+" "+ref;
saveAs("Jpeg",name);
Hopefully this means I'll get back to regular blogging soon, as one more Gate of Laziness has been removed from the path. Now if only IJ could also upload and link those images...

Update!

Neglect... so much neglect. Been swallowed up by my move to Indiana and settlement attempts. Haven't really been keeping up with my SciAm blogging either, but I do intend to return here and post the occasional snippet of something random and perhaps even technical, that I don't want to bother with in terms of translating to a human language. That was an awful sentence -- see what a lack of writing practice can do?

For the few who may care about personal life, well... being a full-time researcher takes up a lot of time, it turns out. Particularly when your experiments aren't really shining in glory or anything like that. And when your gentle introduction to a subject you despised all through undergrad happens to be a grad-level course you absolutely have to do well in. In other words, I've been thrown off into population genetics at the deep end. The course was great, actually, and think I learned *a lot*, but a little bit intensive to someone who merely a year ago defiantly ignored claims that evolution involved 'populations'.

In terms of research life, feels like I'm involved tangentially in enough projects to get away with not really doing anything in particular. In addition to maintaining some ciliate and diatom mutation accumulation lines (long, boring and painful multi-year project to ultimately measure the mutation rate and spectrum, which is actually very exciting as a final product!), I'm trying to learn the art of harnessing ciliate growth rates to be able to have them undergo autogamy (recreating their macronuclei, etc etc) at just the right times to gather RNA for sequence data (that is not my project), and figuring out imaging techniques for deciphering the identity of food vacuole bacteria that persist after longterm starvation for some inexplicable reason. In addition, also trying to start up new protist mutation accumulation lines to ultimately get a phylogenetically sounder sense of eukaryotic mutation rates.

As you can see, lots of trying and attempting and figuring stuff out, and not a whole lot of results and data, which gets frustrating after some time. But rumour has it that's not unusual when starting in a new lab.

Another shift was going from a protistology haven to being some sort of a sole regional expert on protist diversity, entirely for lack of anyone else in the field around here. It's rather alienating, and you can't argue with people about arcane topics in protist phylogeny and taxonomy as they'll just go with whatever you assert. Which renders argumentative assertion a lot less fun. On the other hand, there's an exciting challenge to convert locals to the dark side, and I'm trying to do anything I can in that department, mwahaha! After all, Indiana U used to be quite a bustling centre of protist research, back in the days of Tracy Sonneborn, his deciples and Paramecium genetics. A handful of us in this lab are all that's left of IU's proud protistology tradition...

So that's what I've been doing lately, leaving little productive time for blogging (but, of course, plenty of time for unproductive procrastination). Not easy getting started after a long break either...

Anyway, enough rambling, and onward with moar protists!