@@ -0,0 +1,1132 @@
+package edu.emory.cellbio.ijbat.dm.read;%0A%0Aimport edu.emory.cellbio.ijbat.dm.FileLinkElement;%0Aimport edu.emory.cellbio.ijbat.ex.ImgLinkException;%0Aimport edu.emory.cellbio.ijbat.ex.LinkNotFoundException;%0Aimport edu.emory.cellbio.ijbat.ex.SlideSetException;%0Aimport ij.IJ;%0Aimport ij.ImagePlus;%0Aimport ij.gui.ImageWindow;%0Aimport java.io.File;%0A%0A/**%0A *%0A * @author Benjamin Nanes%0A */%0Apublic class ImageFileToImageWindowReader implements%0A        ElementReader%3CFileLinkElement, ImageWindow%3E %7B%0A%0A    public ImageWindow read(%0A            FileLinkElement elementToRead) %0A            throws SlideSetException %7B%0A        String path = elementToRead.getUnderlying();%0A        String wd = elementToRead.getOwner().getWorkingDirectory();%0A        wd = wd == null ? %22%22 : wd;%0A        if(!(new File(path)).isAbsolute())%0A            path = wd + File.separator + path;%0A        if(!(new File(path).exists()))%0A           throw new LinkNotFoundException(path + %22 does not exist!%22);%0A        ImagePlus img = IJ.openImage(path);%0A        if(img == null)%0A            throw new ImgLinkException(%22Unable to read %22 + path);%0A        return new ImageWindow(img);%0A    %7D%0A%0A%7D%0A

Implement image file to IJ1 ImageWindow reader