Labelling stacks line-by-line

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Labelling stacks line-by-line

Sandor Lenk
Hi all!

 

Is there a plugin of ImageJ for labelling stacks from external txt file
line-by-line?

 

1st image of the stack is labelled with the 1st line of the txt file

2nd image of the stack is labelled with the 2nd line of the txt file

etc.

 

Thanks for your attention!

 

Best regards,

Sandor.

 
Reply | Threaded
Open this post in threaded view
|

Re: Labelling stacks line-by-line

Jerome Mutterer
A simple macro will do this :

macro "label stack" {
// select text file
open();
lines=split(getInfo(), "\n");
run("Close");
// open stack and label slices
open();
setColor(0,0,0);
setFont("Monospaced",12);
for (i=1;i<=nSlices; i++){
setSlice(i);
drawString (lines[i-1],10,15);
}
}


Jerome

Le 20 janv. 06 à 10:06, Sandor Lenk a écrit :

> Hi all!
> Is there a plugin of ImageJ for labelling stacks from external txt  
> file
> line-by-line?
> 1st image of the stack is labelled with the 1st line of the txt file
> 2nd image of the stack is labelled with the 2nd line of the txt file
> etc.
> Thanks for your attention!
>
>
>
> Best regards,
>
> Sandor.
>
>