// RGB2montage.txt macro for ImageJ // // This macro batch processes a folder of images including the sub-directory. // All the images must be in RGB TIFF format. // This macro will generate individual channel-view of the RGB file, // and make montage of both the original and the channel-view of the image. // The outputs start with M#-, which will be treated differently with original files, // and will be over-written when you re-run the macro. // // Author: cail @ cail.cn Jun 3 2005 requires("1.34m"); var channelnumber = 2; Dialog.create("Use RGB2montage macro"); Dialog.addMessage("The selected directory should contain only RGB files."); Dialog.addMessage("The montage will align RGB red green blue channels in turn."); Dialog.addMessage(""); Dialog.addChoice(" Channel Number:", newArray("2", "3")); Dialog.show(); channelnumber = Dialog.getChoice(); dir = getDirectory("Choose the directory containing images"); listFiles(dir); function listFiles(dir) { list = getFileList(dir); for (i=0; i