/*- * #%L * Fiji distribution of ImageJ for the life sciences. * %% * Copyright (C) 2007 - 2017 Fiji developers. * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as * published by the Free Software Foundation, either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program. If not, see * <http://www.gnu.org/licenses/gpl-2.0.html>. * #L% */ package mpicbg.spim.io; public class ParsePattern { public static void main(String[] args) { /* String path = args[0]; System.out.println(); System.out.println("=== Finding pattern ==="); System.out.println("Path = " + path); String pattern = FilePattern.findPattern(path); System.out.println("Pattern = " + pattern); // parse out the pattern information FilePattern fp = new FilePattern(pattern); String[] prefixes = fp.getPrefixes(); BigInteger[] first = fp.getFirst(); BigInteger[] last = fp.getLast(); BigInteger[] step = fp.getStep(); String suffix = fp.getSuffix(); System.out.print("Prefixes: "); for (int i = 0; i < prefixes.length; i++) { System.out.print(" "); System.out.print(prefixes[i]); } System.out.println(); System.out.print("First: "); for (int i = 0; i < first.length; i++) { System.out.print(first[i]); System.out.print("\t"); } System.out.println(); System.out.print("Last: "); for (int i = 0; i < last.length; i++) { System.out.print(last[i]); System.out.print("\t"); } System.out.println(); System.out.print("Step: "); for (int i = 0; i < step.length; i++) { System.out.print(step[i]); System.out.print("\t"); } System.out.println(); System.out.println("Suffix: " + suffix); */ } }