freeman-lab/thunder — pull request #68 by industrial-sloth (2014-12-08 23:44:59+00:00)
Title: image blocks rewrite

This is a major overhaul of the imageblocks implementation.

The main API-level change here is to remove the Images.toSeries() method, in favor of an Images.toBlocks().toSeries() chain. (Previously the images to series pathway also worked by converting to an intermediate "blocks" stage - this change just makes that explicit, and elevates the Blocks to be a proper subclass of Data like the other RDDs.) The Thunder context-level API is unchanged.

To convert images to blocks, one needs to pass in a BlockingStrategy, which represents the particular way in which a big image is about to get carved up into little pieces. This PR has only a single Strategy, SimpleBlockingStrategy, which divides an image into nonoverlapping contiguous blocks of approximately equal size. Coming soon we expect to also add a PaddedBlocks class, which would allow some overlap between adjacent blocks, in order to help deal with edge effects in future image-block-based analyses.