public static void main(String[] args) {
        // TODO code application logic here
        final JFrame frame = new JFrame("ImgPanel Test Frame");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        SetupDialog setupDialog = new SetupDialog(frame);
        System.out.println("setupDialog filename " + setupDialog.getFileName());

        // this is just a nominal pixel size for fake images
        int dim[] = { 1024, 768 };

        switch (setupDialog.getPixels()) {
            case ACTUAL:
                break;
            case X4:
                dim[0] *= 4;
                dim[1] *= 4;
                break;
            case X16:
                dim[0] *= 16;
                dim[1] *= 16;
                break;
            case MP50:
                dim = new int[] { 7 * 1024, 7 * 1024 };
                break;
            case MP100:
                dim = new int[] { 10 * 1024 , 10 * 1024 };
                break;
            case MP500:
                dim = new int[] { 23 * 1024, 23 * 1024 };
                break;
            case GP1:
                dim = new int[] { 32 * 1024, 32 * 1024 };
                break;
            case GP4:
                dim = new int[] { 64 * 1024, 64 * 1024 };
                break;
        }

        //TODO setting up the zoom viewer, could happen elsewhere

        //TODO the cache should be shared
        TileCache tileCache = new TileCache(setupDialog.getCacheSize());

        //TODO need factory that projects ImgLib images
        ITileFactory factory = new MyTileFactory(new File(setupDialog.getFileName()));

        ZoomTileServer zoomTileServer = new ZoomTileServer();
        zoomTileServer.init(tileCache, factory, dim);

        final ImgZoomPanel imgZoomPanel = new ImgZoomPanel(zoomTileServer);
        frame.setContentPane(imgZoomPanel);
        frame.pack();
        center(frame);
        frame.setVisible(true);
    }