// Path: src/omr/gui/ImageFileFilter.java
// public class ImageFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter {
// 
//     /**
//      * Returns true if the file format is supported.
//      */
//     public boolean accept(File file) {
//         if (file.isDirectory()) {
//             return true;
//         }
// 
//         String extension = null;
//         String fileName = file.getName();
//         int index = fileName.lastIndexOf('.');
//         if (index > 0 && index < fileName.length() - 1) {
//             extension = fileName.substring(index + 1).toLowerCase();
//         }
//         
//         if (extension == null) {
//             return false;
//         }
//         
//         if (extension.equals("tiff") ||
//             extension.equals("tif") ||
//             extension.equals("gif") ||
//             extension.equals("jpeg") ||
//             extension.equals("jpg") ||
//             extension.equals("png") ||
//             extension.equals("pdf")
//             ) {
//                 return true;
//         }
// 
//         return false;
//     }
// 
//     public String getDescription() {
//         return "Images";
//     }
// 
// }


import java.io.File;
import java.io.IOException;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Observable;
import java.util.Observer;
import omr.gui.ImageFileFilter;
    		sheet.invalidateRegistration();
    	}
    }
    
    /**
     * Invalidates bubble brighnesses in all sheets so that they are recalculated next time analyze() is called.
     */
    public void invalidateBrightnesses() {
    	for (Sheet sheet : sheets) {
    		sheet.invalidateBrightnesses();
    	}
    }
    
    /**
     * Invalidates answers in all sheets so that they are recalculated next time calcualteAnswers() is called.
     */
    public void invalidateAnswers() {
    	for (Sheet sheet : sheets) {
    		sheet.invalidateAnswers();
    	}
    }
    
    /**
     * Imports multiple answer sheet files to the project. 
     * @param files
     */
    public void importSheets(File[] files) throws IOException {
    	for (File file : files) {
            if (file.isDirectory()) {
                // Add all files in the directory non-recursively
// Path: src/omr/gui/ImageFileFilter.java
// public class ImageFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FileFilter {
// 
//     /**
//      * Returns true if the file format is supported.
//      */
//     public boolean accept(File file) {
//         if (file.isDirectory()) {
//             return true;
//         }
// 
//         String extension = null;
//         String fileName = file.getName();
//         int index = fileName.lastIndexOf('.');
//         if (index > 0 && index < fileName.length() - 1) {
//             extension = fileName.substring(index + 1).toLowerCase();
//         }
//         
//         if (extension == null) {
//             return false;
//         }
//         
//         if (extension.equals("tiff") ||
//             extension.equals("tif") ||
//             extension.equals("gif") ||
//             extension.equals("jpeg") ||
//             extension.equals("jpg") ||
//             extension.equals("png") ||
//             extension.equals("pdf")
//             ) {
//                 return true;
//         }
// 
//         return false;
//     }
// 
//     public String getDescription() {
//         return "Images";
//     }
// 
// }


// Path: src/omr/SheetsContainer.java
import java.io.File;
import java.io.IOException;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Observable;
import java.util.Observer;
import omr.gui.ImageFileFilter;

    		sheet.invalidateRegistration();
    	}
    }
    
    /**
     * Invalidates bubble brighnesses in all sheets so that they are recalculated next time analyze() is called.
     */
    public void invalidateBrightnesses() {
    	for (Sheet sheet : sheets) {
    		sheet.invalidateBrightnesses();
    	}
    }
    
    /**
     * Invalidates answers in all sheets so that they are recalculated next time calcualteAnswers() is called.
     */
    public void invalidateAnswers() {
    	for (Sheet sheet : sheets) {
    		sheet.invalidateAnswers();
    	}
    }
    
    /**
     * Imports multiple answer sheet files to the project. 
     * @param files
     */
    public void importSheets(File[] files) throws IOException {
    	for (File file : files) {
            if (file.isDirectory()) {
                // Add all files in the directory non-recursively
                File[] children = file.listFiles(new ImageFileFilter());