Merge image tiles into a single image

macro
#1

Hi all,
I have several high resolution images that are divided into nxm tiles.
As an example, the first image is divided into 63 (6x9) tiles, each one of them labelled:
first_image[…]_n_m.jpeg
with n raging from 0 to 6 and 9 raging from 0 to 9.

Is there a way to merge these 63 tiles to compose the original image?

thanks

#2

The Grid/collection stitching in Fiji should work for you
see: ( Plugins --> Stitching --> Grid/Collections stitching)

You can define the order, in which way your files have been saved during the imaging.

An alternative is using TrakEM2 (Fiji) and import your files via .txt file. This would be my choice if you have a lot of such files to stitch together.

see here: https://www.ini.uzh.ch/~acardona/trakem2_manual.html#importing_list

You can adjust the x & y coordinates roughly according the known pixel dimensions of your original files in the txt file and afterwards use the alignment tools in TrakEM2.

#3

Thanks.
TrakEM2 works directly if the image are listed in raws.
If I isolate the first 9 images they are stitched correctly.

Grid/collection stiching requires files to be named 01.jpg, 02.jpg… so I need to convert filenames on the last three digits and divide images in separate folders.

#4

That’s incorrect. You can use a pattern like first_image[…]_{x}_{y}.jpeg to define two independent variable in the file name.

See the documentation on the wiki:

… in particular this paragraph:

If you select Filename defined position / Defined by filename as type, the approximate coordinates in the grid should be part of the filename. Assuming your files are called:

tile_x01_y01.lsm tile_x02_y01.lsm … tile_x10_y10.lsm

it would translate to the following pattern: tile_x{xx}_y{yy}.lsm .

#5

Using “Advanced renamer” file were renamed to match the requirements for the “down-and-right”.
Since there’s no overlap (images were tiled from a big one), unflagging compute overlap and using 0% tile overlap gave a strange results (image compressed in y-dimension). Will check the guide.