Output image size in Mosaic
The Mosaic application computes the output image origin, size, and spacing in the GenerateOutputInformation
method of the base mosaic filter.
First, the extent of the output image is retrieved. The pixel spacing is computed from the smallest pixel spacing values of the input images. Then, the origin is computed (from this pixel spacing, and the extent). After that, the output image size is finally computed.
In the current implementation, the output image size is rounded to the upper number of pixels (the idea was to avoid losing one col/row of pixels, and it was not a big deal if we add some extra row/col to the output image).
However this is very embarrassing when you need to mosaic several images of the same extent/size, because the output image size will have +1 row/col!
Output image size must be computed better than that.