measurements-text-overlay.ijm 546 Bytes
Newer Older
Christian Tischer's avatar
Christian Tischer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#@File labelImage

// open image
run("Close All");
open(labelImage);

// perform measurements
run("Particle Analysis 3D", "volume inertia surface_0=[Crofton (13 dirs.)] euler_0=C26");

// TODO: change font size: setFont
setFont("SansSerif", 4);

for ( i = 0; i < Table.size; ++i )
{
	volume = Table.get( "Volume", i );
	x = Table.get( "Elli.Center.X", i );
	y = Table.get( "Elli.Center.Y", i );
	z = Table.get( "Elli.Center.Z", i );
	
	toUnscaled(x, y, z);

	Overlay.drawString( volume, x, y );
	Overlay.setPosition( z );	
}

Overlay.show();