-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
calculate the distances instead of starting from a table
- Loading branch information
1 parent
a470baa
commit ac3b9bf
Showing
4 changed files
with
66 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
var IS_SCALED = true; | ||
var X_COLUMN = "Centroid.X"; | ||
var Y_COLUMN = "Centroid.Y"; | ||
var Z_COLUMN = "Centroid.Z"; | ||
var CLUSTER_COLUMN = "C"; | ||
var TABLE = "clusters" | ||
|
||
run("Duplicate...", "duplicate"); | ||
run("Select All"); | ||
setBackgroundColor(0, 0, 0); | ||
run("Clear", "stack"); | ||
run("Select None"); | ||
|
||
X = Table.getColumn(X_COLUMN, TABLE); | ||
Y = Table.getColumn(Y_COLUMN, TABLE); | ||
Z = Table.getColumn(Z_COLUMN, TABLE); | ||
C = Table.getColumn(CLUSTER_COLUMN, TABLE); | ||
for (i = 0; i < Table.size(TABLE); i++) { | ||
x = X[i]; | ||
y = Y[i]; | ||
z = Z[i]; | ||
if (IS_SCALED) { | ||
toUnscaled(x, y, z); | ||
} | ||
setSlice(z+1); | ||
setPixel(x, y, C[i]); | ||
} | ||
setOption("ScaleConversions", false); | ||
run("16-bit"); | ||
run("glasbey on dark"); | ||
run("Morphological Filters (3D)", "operation=Dilation element=Cube x-radius=2 y-radius=2 z-radius=2"); | ||
setSlice(1); | ||
resetMinAndMax(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters