That's it: those are the core commands in StitchIt. So what was going on there? generateTileIndex indexes the tiles to map their names on to their position in the final volume. Then the preProcessTiles command calculates coefficients for the comb correction and average tiles for illumination correction. The first input argument tells it to only work on directories that already haven’t been processed, the second and third arguments tell it to calculate bidirectional scanning coefficients and illumination correction on channels 1 and 2. Average image data for illumination correction are stored for each physical section within that section’s raw data directory. If interupted, preProcessTiles can resume where it left off. collateAverageImages produces the grand average images used for illumination correction (data from the whole specimen contribute to the illumination correction). The above steps is most of what syncAndCrunch does too.