Login  Register

Re: How to order images within a stack

Posted by Lachlan Whitehead on Nov 06, 2013; 10:11pm
URL: http://imagej.273.s1.nabble.com/How-to-order-images-within-a-stack-tp3692604p5005481.html

Hi Marcel,

Ahh, apparently concatenate doesn't preserve the image names in the metadata. Easiest fix is to put this after you've made the stack but before the montage:

setSlice(1);
setMetadata("Label","Image Label 1");
setSlice(2);
setMetadata("Label","Image Label 2");
setSlice(3);
setMetadata("Label","Image Label 3");
setSlice(4);
setMetadata("Label","Image Label 4");

And just change the second argument in each of the setMetadata commands. If you've gone down the route of making the image filenames into variables, you can just put the variable in there without the quotes. eg:

fname1="red.jpg";
setSlice(1);
setMetadata("Label",fname1);

There are probably more elegant solutions, but this is quick and easy to implement.

Thanks,
-Lachie



----- Original Message -----
From: "mmettlen" <[hidden email]>
To: [hidden email]
Sent: Wednesday, 6 November, 2013 10:31:08 PM
Subject: Re: How to order images within a stack

Thanks Lachie - that works. However, now I've lost the title of my slices and
the montage is now labelled  image1, etc.



--
View this message in context: http://imagej.1557.x6.nabble.com/How-to-order-images-within-a-stack-tp3692604p5005472.html
Sent from the ImageJ mailing list archive at Nabble.com.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

______________________________________________________________________
The information in this email is confidential and intended solely for the addressee.
You must not disclose, forward, print or use it without the permission of the sender.
______________________________________________________________________

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html