Class ROIFileFilter

java.lang.Object
javax.swing.filechooser.FileFilter
com.xinapse.multisliceimage.roi.ROIFileFilter

public class ROIFileFilter extends FileFilter
A FileFilter for region of interest files. The accept() method returns true for files ending in ".roi" and for directories.
  • Field Details

  • Constructor Details

    • ROIFileFilter

      public ROIFileFilter()
      Constructor for ROIFileFilter.
  • Method Details

    • getDescription

      public String getDescription()
      Returns "Region of Interest Files".
      Specified by:
      getDescription in class FileFilter
      Returns:
      the description String "Region of Interest Files".
    • accept

      public boolean accept(File f)
      Tests whether the given file is a region of interest file. Also passes directories to allow navigation while looking for ROI files.
      Specified by:
      accept in class FileFilter
      Parameters:
      f - the file to test.
      Returns:
      true if the supplied file is an roi file (ends with ".roi"), or a directory; returns false otherwise. The test is case-insensitive.