Gradient Domain Fusion for Large EM Image Stacks (Version 1.0)

links description data layout volume processing usage

LINKS
Paper: ArXiv 2015
Scripts: Scripts (Perl)
Source: Distributed Gradient Domain (C++), Cross-Slice Smoothing (C++)
Executables: Distributed Multi-Grid (Win64), Cross-Slice Smoothing (Win64)

CODE DESCRIPTION
This distribution provides an implementation of our gradient domain fusion for color correction in large EM image stacks. The implementation proceeds in two phases. These executables are tied together using a Perl script which is invoked from the command line.

DATA LAYOUT
The input/output data is a 3D image of size W×H×D.
Each image is represented by as a set of D slices -- each of which is a 2D image of size W×H.
Each slice is futher partitioned into a grid of C×R tiles -- sub-images all of the same resolution (except for the tiles in the last column/row of a slice, which may be smaller).
There are two ways in which the data can be layed out on disk:
VOLUME PROCESSING

USAGE
As a simple example, consider the case when the volume is comprised of 100 slices, each reprsented by a grid of 32×16 image tiles.
Furthermore, assume that the input tiles are named {in.x1.y1.z1.jpg, ..., in.x32.y1.z1.jpg, ..., in.x32.y16.z1.jpg, ..., in.x32.y16.z100.jpg} and are each of size 1024×1024 (except, perhaps, for the tiles in the last column/row).
To run the processing we first modify the parameters.pl file to specify the locations of the executables and define the functions returning the input/output file-names:
	$X_SLICE_SMOOTH = ...;
	$GRADIENT_DOMAIN_SERVER = ...;
	$GRADIENT_DOMAIN_CLIENT = ...;
	sub input_name
	{
		my( $i , $j , $k ) = @_;
		return "in" . ".x" . ($i+1) . ".y" . ($j+1) . ".z" . ($k+1);
	}
	sub output_name
	{
		my( $i , $j , $k ) = @_;
		return "out" . ".x" . ($i+1) . ".y" . ($j+1) . ".z" . ($k+1);
	}	
(By default, indexing starts at 0, not 1.)
Then we invoke the gdf.pl script to perform the smoothing and fusion (using the --blockSize parameter to obtain output tiles which partition the slices in the same way as the input):
	% perl gdf.pl --params parameters.pl --columns 32 --rows 16 --slices 100 --ext jpg --blockSize 1024

HOME