Changeset 7490


Ignore:
Timestamp:
01/07/11 17:22:11 (9 years ago)
Author:
aivar
Message:

Added method call for Rick's project.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/maven/projects/deep-zoom-plugin/src/main/java/loci/deepzoomplugin/DeepZoom.java

    r7416 r7490  
    161161        file = dialog.getNextString(); 
    162162        prefs.put(FILE, file); 
     163 
     164        generateDeepZoom(file, "folder", "name", 640, 480); 
     165        System.exit(0); 
    163166         
    164167        IJ.open(file); 
     
    209212        } 
    210213 
     214        /** 
     215         * Warning: this method is a hack upon a hack (upon a hack). 
     216         * Generate a DeepZoom HTML, XML, folder, and file structure. 
     217         * 
     218         * @param source file name of source 
     219         * @param folder folder name on local file system 
     220         * @param name HTML name 
     221         * @param width starting width 
     222         * @param height starting height 
     223         */ 
     224    public static void generateDeepZoom(String source, String folder, String name, int width, int height) { 
     225        IJ.open(source); 
     226        ImagePlus imp = WindowManager.getCurrentImage(); 
     227        imp.hide(); 
     228        convertRGBStackToRGB(imp); 
     229        ImageProcessor ip = imp.getChannelProcessor().convertToRGB(); 
     230        loci.chainableplugin.deepzoom.DeepZoomExporter deepZoomExporter1 
     231                = new loci.chainableplugin.deepzoom.DeepZoomExporter 
     232                        (false, false, folder, null, name, name, width, height); 
     233        loci.plugin.ImageWrapper imageWrapper1 = new loci.plugin.ImageWrapper(ip); 
     234        deepZoomExporter1.process(imageWrapper1); 
     235    } 
    211236} 
Note: See TracChangeset for help on using the changeset viewer.