Class IconListBrowser

java.lang.Object
com.pixelmed.display.IconListBrowser

public class IconListBrowser extends Object

This class implements a panel of icons of DICOM images inside a parent JScrollPane.

Maintains icons in a pre-defined sorted order based on DICOM attributes as they are added and removed.

  • Field Details

  • Constructor Details

    • IconListBrowser

      public IconListBrowser(int iconSize) throws DicomException

      Build and display an (initally empty) graphical user interface view of a set of DICOM images.

      Parameters:
      iconSize - the width and height in pixels of the icons to be created
      Throws:
      DicomException - thrown if the icons cannot be extracted
    • IconListBrowser

      public IconListBrowser(JScrollPane parentScrollPane, int iconSize) throws DicomException

      Build and display an (initally empty) graphical user interface view of a set of DICOM images.

      Parameters:
      parentScrollPane - the scrolling pane in which the icons will be rendered
      iconSize - the width and height in pixels of the icons to be created
      Throws:
      DicomException - thrown if the icons cannot be extracted
    • IconListBrowser

      public IconListBrowser(JScrollPane parentScrollPane) throws DicomException

      Build and display an (initally empty) graphical user interface view of a set of DICOM images.

      Uses default icon size.

      Parameters:
      parentScrollPane - the scrolling pane in which the icons will be rendered
      Throws:
      DicomException - thrown if the icons cannot be extracted
    • IconListBrowser

      public IconListBrowser(JScrollPane parentScrollPane, String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

      Build and display a graphical user interface view of a set of DICOM image files.

      Uses default icon size.

      Parameters:
      parentScrollPane - the scrolling pane in which the icons will be rendered
      dicomFileNames - a list of DICOM files
      Throws:
      DicomException - thrown if the icons cannot be extracted
      FileNotFoundException - thrown if a file cannot be found
      IOException - thrown if a file cannot be read
    • IconListBrowser

      public IconListBrowser(Container content, String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

      Build and display a graphical user interface view of a set of DICOM image files.

      Parameters:
      content - a container to which will be added will be added a scrolling pane containing the icon browser
      dicomFileNames - a list of DICOM files
      Throws:
      DicomException - thrown if the icons cannot be extracted
      FileNotFoundException - thrown if a file cannot be found
      IOException - thrown if a file cannot be read
    • IconListBrowser

      public IconListBrowser(JFrame frame, String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

      Build and display a graphical user interface view of a set of DICOM image files.

      Parameters:
      frame - a frame to whose content pane will be added a scrolling pane containing the icon browser
      dicomFileNames - a list of DICOM files
      Throws:
      DicomException - thrown if the icons cannot be extracted
      FileNotFoundException - thrown if a file cannot be found
      IOException - thrown if a file cannot be read
  • Method Details

    • setParentScrollPane

      protected void setParentScrollPane(JScrollPane parentScrollPane)

      Set the parent scoll pane.

      Used from within constructors.

      Parameters:
      parentScrollPane -
    • addDicomFiles

      public void addDicomFiles(String[] dicomFileNames) throws DicomException, FileNotFoundException, IOException

      Add a set of DICOM image files.

      Parameters:
      dicomFileNames - a list of DICOM files
      Throws:
      DicomException - thrown if the icons cannot be extracted
      FileNotFoundException - thrown if a file cannot be found
      IOException - thrown if a file cannot be read
    • add

      public void add(String dicomFileName) throws DicomException, FileNotFoundException, IOException

      Add an annotated icon of a DICOM image.

      Parameters:
      dicomFileName - the name of the file containing the DICOM image
      Throws:
      DicomException - thrown if the icons cannot be extracted
      FileNotFoundException - thrown if a file cannot be found
      IOException - thrown if a file cannot be read
    • main

      public static void main(String[] arg)

      Method for testing.

      Parameters:
      arg - a list of DICOM image files from which to extract one icon each and display