|
Hello all,
the following macro works fine until the "clear outside" step - obviously because it doesn't take the selection from the 3D Roi manager to the current image. Is there any way to solve this problem? What I want to do is to count cells in one channel (C4) and then use the count mask to see if there are any cells in the other channels (C2, C3)...if I manually select the "Live Roi" Option in the 3D ROI Manager for each new window it works (the ROIs are selected), however I couldn't find a macro code for that...
Any help/suggestions are greatly appreciated!
title = getTitle();
run("3D Manager");
run("Subtract Background...", "rolling=10 stack");
run("Split Channels");
run("3D Objects Counter", "threshold=400 slice=7 min.=100 max.=95728640000 objects statistics summary");
selectWindow("Objects map of C4-"+title);
Ext.Manager3D_AddImage();
Ext.Manager3D_SelectAll();
selectWindow("C2-"+title);
Ext.Manager3D_SelectAll();
setBackgroundColor(0, 0, 0);
run("Clear Outside", "stack"); run("3D Objects Counter", "threshold=700 slice=6 min.=80 max.=11534336 objects statistics summary");
selectWindow("C3-"+title);
Ext.Manager3D_SelectAll();
run("Clear Outside", "stack");
run("3D Objects Counter", "threshold=250 slice=8 min.=80 max.=11534336 objects statistics summary");
|