When trying to import a directory with images (via File > Import > Image Sequence…, or by dragging the folder onto the ImageJ toolbar), the opened stack will have the dimensions of the first image, and for each image with differing dimensions, an error message is logged:
image2.tif: wrong size;
and the image is skipped.
In some cases, you might want to open all images even if some of them have different dimensions, by pasting the image onto the canvas defined by the first image dimensions, such that:
- the image is padded with the current background value when it is smaller, or
- the image is cropped when it is larger than the first image.
A similar functionality is available already when using Image > Stacks > Images To Stack, where you can choose between the options:
- Copy (top-left)
- Copy (center)
- Scale (smallest)
- Scale (largest)
@Wayne how about adding similar functionality to the
FolderOpener class? While we might not want to parse all image files for their dimensions, we could at least offer the options Crop/Pad (top-left-aligned or center-aligned) and Scale with respect to the dimensions of the first image. What do you think?