The images can be read into the map as lattices using a suitable reader (for example, the ReadImg module supports a variety of formats including TIFF and GIF). What's required then is a module which takes two lattices and stacks them together to create a lattice of higher dimension. To create this, you could use the module builder, but it's often easier to use the LatFunction module, which allows the user to carry out simple creation and manipulation of lattices via a script written in the Shape language. The script is passed to the module and interpreted by it, which bypasses the traditional edit-compile-link cycle, leading to more rapid development.
Here is a script that takes two lattices and stacks them together to create a new lattice with a dimensionality which is one greater than that of either of the input lattices.
foo := scalar_lattice_in(First_In); bar := scalar_lattice_in(Second_In); baz := outside([foo, bar]); First_Out := scalar_lattice_out(baz);
The input lattices must have the same number of dimensions and dimensionality (LatFunction will complain with a - somewhat obscure - error message if they don't). The lattices are stacked in the slowest varying dimension - e.g., if both the input lattices have dimensions of 8 by 8, then the output lattice will have dimensions of 2 by 8 by 8. The stacking direction can be switched to the fastest varying dimension using the inside command - i.e., changing the third line to
baz := inside([foo, bar]);
gives an output lattice with dimensions of 8 by 8 by 2. See Chapter 10 of the IRIS Explorer Module Writer's Guide for more information on the LatFunction module and the Shape language.