Commit 9c3500d8 authored by Georgi Tushev's avatar Georgi Tushev
Browse files

handle odd/even grid

parent 86dc8bc1
......@@ -38,4 +38,21 @@ issues: snake order argument has white space in it
```
Plugins > Macros > Run ... > ScanImageStitching.ijm
```
\ No newline at end of file
```
## Snake Indexing
### Grid: snake by rows
* Right & Down
* Left & Down
* Right & Up
* Left & Up
### Even Grid
* Z = odd -> {Right & Down}
* Z = even && Grid = even -> {Right & Up}
* Z = even && Grid = odd -> {Left & Up}
......@@ -151,9 +151,15 @@ macro "ScanImageStitching"
for (z = 1; z <= gridZ; z++) {
// set order (this param contains empty space, not a typo!!!)
order="Right & Down ";
if ((z % 2) == 0)
order="Right & Up";
// Z = even -> Right & Down
// Z = odd AND grid = even -> Right & Up
// Z = odd AND grid = odd -> Left & Up
order = "Right & Down ";
if ((z % 2) == 0) {
order = "Left & Up";
if ((gridX % 2) == 0)
order = "Right & Up";
}
// stitch
for (s = 1; s <= countSlices; s++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment