Greetings! Did you know? With Aperio's software you can easily combine multiple images together into one big one.
This capability makes use of a file format supported by all Aperio software called an Aperio Compound Image, or ACI. An ACI is simply a little text file which contains instructions for combining other images together. ACI files are sometimes made programmatically, but they can also be made "by hand".
Each line in an ACI file specifies the name of an image file, and gives the X and Y coordinates where the image is to be located in a new "compound image". (By convention, X and Y are measured from the upper left corner, with X going across the image to the right, and Y going down the image to the bottom.) Each line of an ACI file looks like this:
<image_filename> <Y-offset> <X-offset>
Let's take a simple example. Suppose we have two images which we want to combine side-by side; here they are shown in the Aperio ImageScope viewer:
madison.svs 58,984 x 35,659 |
katherine.svs 69,608 x 37,675 |
(The numbers below each image give their dimensions in pixels.)
To combine these images, let's create a file called paul.aci, which has the following contents:
madison.svs 0 0
katherine.svs 0 58984
Notice that madison.svs is positioned at (0,0), the upper left corner, and katherine.svs is positioned at (58984,0), so that the images will be side-by-side in the compound image.
Now we can open the file paul.aci in the ImageScope viewer, and it looks like this:
Pretty cool! We can pan and zoom and otherwise view the compound image just as if it was a single file.
You might notice that katherine.svs is actually a little taller than madison.svs; the default logic is to "trim" the edges. However this might not be what we want. Let's change paul.aci just a little, adding a line which says "edgetrim=no", like this:
madison.svs 0 0
katherine.svs 0 58984
edgetrim=no
Now when we open paul.aci in ImageScope, it looks like this:
No edges were trimmed, and there is now a "gap" at the lower left which is filled with gray.
Let's try a more complicated example, suppose we have two more images (again shown in ImageScope):
hannah.svs 72,503 x 43,361 |
samantha.svs 55,848 x 35,307 |
Let's combine all four of the images above. We create a new text file named daniel.aci, with the following contents:
madison.svs 0 0
katherine.svs 0 58984
hannah.svs 37675 0
samantha.svs 37675 72503
edgetrim=no
Now if we open the file daniel.aci in the ImageScope viewer, it looks like this:
Magic, huh? We can pan and zoom through all four images as if they were a single image. There is no limit to the number of images you can combine in this fashion. In fact, we used this capability a little while ago to combine 225 digital slides together into an image which was more than one terapixel in size!
There is one more thing I want to mention: you might want to turn a compound image into a single image file. You can do this with ImageScope! Just use the Image Extract tool select the entire image, then extract it into a new SVS file. That might be a good subject for another tip in the future :)
Aperio Compound Images are a powerful capability - please try it!

Comments