RESUMEN
Alignment of stacks of serial images generated by Focused Ion Beam Scanning Electron Microscopy (FIB-SEM) is generally performed using translations only, either through slice-by-slice alignments with SIFT or alignment by template matching. However, limitations of these methods are two-fold: the introduction of a bias along the dataset in the z-direction which seriously alters the morphology of observed organelles and a missing compensation for pixel size variations inherent to the image acquisition itself. These pixel size variations result in local misalignments and jumps of a few nanometers in the image data that can compromise downstream image analysis. We introduce a novel approach which enables affine transformations to overcome local misalignments while avoiding the danger of introducing a scaling, rotation or shearing trend along the dataset. Our method first computes a template dataset with an alignment method restricted to translations only. This pre-aligned dataset is then smoothed selectively along the z-axis with a median filter, creating a template to which the raw data is aligned using affine transformations. Our method was applied to FIB-SEM datasets and showed clear improvement of the alignment along the z-axis resulting in a significantly more accurate automatic boundary segmentation using a convolutional neural network.