Source:
public static void main(String[] args) throws Exception { URL resource = ExampleSuite.class.getResource("test.fake"); URL overlappedResource = ExampleSuite.class.getResource("test&sizeX=1024&sizeY=1024.fake"); File inputFile = new File(resource.toURI()); File overlappedInputFile = new File(overlappedResource.toURI()); File parentDir = inputFile.getParentFile(); File convertedFile = new File(parentDir, "converted.ome.tiff"); File exportFile = new File(parentDir, "export.ome.tiff"); File exportSPWFile = new File(parentDir, "exportSPW.ome.tiff"); File simpleTiledFile = new File(parentDir, "simpleTiledFile.ome.tiff"); File tiledFile = new File(parentDir, "tiledFile.ome.tiff"); File overlappedTiledFile = new File(parentDir, "overlappedTiledFile.ome.tiff"); execute("ReadPhysicalSize", new String[] {inputFile.getAbsolutePath()}); execute("FileConvert", new String[] { inputFile.getAbsolutePath(), convertedFile.getAbsolutePath()}); execute("FileExport", new String[] {exportFile.getAbsolutePath()}); execute("FileExportSPW", new String[] {exportSPWFile.getAbsolutePath()}); execute("SimpleTiledWriter", new String[] { inputFile.getAbsolutePath(), simpleTiledFile.getAbsolutePath(), "256", "256"}); execute("TiledReaderWriter", new String[] { inputFile.getAbsolutePath(), tiledFile.getAbsolutePath(), "256", "256"}); execute("OverlappedTiledWriter", new String[] { overlappedInputFile.getAbsolutePath(), overlappedTiledFile.getAbsolutePath(), "96", "96"}); }

Target:
public static void main(String[] args) throws Exception { URL resource = ExampleSuite.class.getResource("test.fake"); URL overlappedResource = ExampleSuite.class.getResource("test&sizeX=1024&sizeY=1024.fake"); File inputFile = new File(resource.toURI()); File overlappedInputFile = new File(overlappedResource.toURI()); File parentDir = inputFile.getParentFile(); File convertedFile = new File(parentDir, "converted.ome.tiff"); File exportFile = new File(parentDir, "export.ome.tiff"); File exportSPWFile = new File(parentDir, "exportSPW.ome.tiff"); File simpleTiledFile = new File(parentDir, "simpleTiledFile.ome.tiff"); File tiledFile = new File(parentDir, "tiledFile.ome.tiff"); File tiledFile2 = new File(parentDir, "tiledFile2.ome.tiff"); File overlappedTiledFile = new File(parentDir, "overlappedTiledFile.ome.tiff"); File overlappedTiledFile2 = new File(parentDir, "overlappedTiledFile2.ome.tiff"); execute("ReadPhysicalSize", new String[] {inputFile.getAbsolutePath()}); execute("FileConvert", new String[] { inputFile.getAbsolutePath(), convertedFile.getAbsolutePath()}); execute("FileExport", new String[] {exportFile.getAbsolutePath()}); execute("FileExportSPW", new String[] {exportSPWFile.getAbsolutePath()}); execute("SimpleTiledWriter", new String[] { inputFile.getAbsolutePath(), simpleTiledFile.getAbsolutePath(), "256", "256"}); execute("TiledReaderWriter", new String[] { inputFile.getAbsolutePath(), tiledFile.getAbsolutePath(), "256", "256"}); execute("TiledReaderWriter", new String[] { inputFile.getAbsolutePath(), tiledFile2.getAbsolutePath(), "256", "128"}); execute("OverlappedTiledWriter", new String[] { overlappedInputFile.getAbsolutePath(), overlappedTiledFile.getAbsolutePath(), "96", "96"}); execute("OverlappedTiledWriter", new String[] { overlappedInputFile.getAbsolutePath(), overlappedTiledFile2.getAbsolutePath(), "192", "96"}); }