Class JDialogProstateImageCategorize

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
gov.nih.mipav.view.dialogs.JDialogBase
gov.nih.mipav.view.renderer.WildMagic.ProstateFramework.JDialogProstateImageCategorize
All Implemented Interfaces:
AlgorithmInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogProstateImageCategorize extends JDialogBase implements AlgorithmInterface
This class exhaustively trains the 2D slices based Active Appearance Model (AAM). For example, 100 3D prostate MRI images are converted to 2D slices atlas, each slice saved directory contains 100 2D slice images and corresponding VOIs. Based on the 2D slices and VOIs, this class performs shape based similarity measure between closed shape VOIs, sub-groups the image and VOIs, then apply the AAM training to each sub-group to generate the AAM model. The exhaustive search algorithm subdivides the atlas into smaller groups with a similar shape measure. After forming the smaller group, the search algorithm marks the relevant images and VOIs as visited, and iteratively searches the data in the atlas, terminating when no more similarity shapes can be found. AAM training follow the work of Stegmann et al. Cootes. et al. to create AAM model. M. B. Stegmann, B. K. Ersboll, and R. Larsen, "FAME-A Flexible Appearance Modeling Environment", IEEE Trans. Med. Imag., 22(10):1319-1331, October, 2003. T. F. Cootes, G. J. Edwards, and C. J. Taylor, "Active appearance models", Proc. Eur. Conf. Comput. Vis. 2:484-498, 1998.
Author:
Ruida Cheng
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • UI

      private ViewUserInterface UI
      The main user interface.
    • imageSelectionPanel

      private JPanel imageSelectionPanel
    • buttonPanel

      private JPanel buttonPanel
    • axisList

      private JComboBox axisList
      axis region
    • labelAxis

      private JLabel labelAxis
    • Axial

      private static int Axial
      axis orietation.
    • Saggital

      private static int Saggital
    • Coronal

      private static int Coronal
    • axis

      private int axis
    • labelKeyImage

      private JLabel labelKeyImage
      Key image related variables.
    • textFieldKeyImage

      private JTextField textFieldKeyImage
    • buttonKeyImage

      private JButton buttonKeyImage
    • labelGroup

      private JLabel labelGroup
      Save group directory.
    • textFieldGroup

      private JTextField textFieldGroup
    • buttonGroup

      private JButton buttonGroup
    • keyImageChooser

      private JFileChooser keyImageChooser
      key images variables.
    • keyImageName

      private String keyImageName
    • keyImageDirectory

      private String keyImageDirectory
    • imageVector

      private Vector<String> imageVector
      image and voi string vector.
    • voiVector

      private Vector<String> voiVector
    • groupChooser

      private JFileChooser groupChooser
      group variables.
    • groupName

      private String groupName
    • groupDirectory

      private String groupDirectory
    • sliceImages

      private Vector<ModelImage> sliceImages
      image vector.
    • imageVOIs

      private Vector<VOI[]> imageVOIs
      VOI vector.
    • groupIndex

      private int groupIndex
      group index.
  • Constructor Details

    • JDialogProstateImageCategorize

      public JDialogProstateImageCategorize(Frame theParentFrame)
      Constructor
      Parameters:
      theParentFrame - parent frame reference.
  • Method Details

    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      empty function to implement the algorithm interface.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - the algorithm which has just completed
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      ActionPerformed handler.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
    • init

      public void init()
      Dialog GUI interface initialization.
    • readKeyImageDir

      private void readKeyImageDir()
      Read the key image director and generate image name and voi name vectors.
    • processDir

      private void processDir(File dir)
      Process the directory.
      Parameters:
      dir -
    • sortImageVectorString

      private void sortImageVectorString(Vector<String> imageVector)
      Sort image vector in ascending order.
      Parameters:
      imageVector - image name vector.
    • sortVOIVectorString

      private void sortVOIVectorString(Vector<String> voiVector)
      Sort VOI name vector in ascending order.
      Parameters:
      voiVector -
    • selectGroupDir

      private void selectGroupDir()
      Let user choose the Group trained model directory to save.
    • groupImages

      private void groupImages()
      Group images and exhaustively train the AAM model.
    • area

      private float area(float[] xPts, float[] yPts, int nPts)
      Shape area computation
      Parameters:
      xPts - VOI points x coordinate
      yPts - VOI points y coordinate
      nPts - number of VOI points.
      Returns:
    • categorizeByShape

      private void categorizeByShape()
      Shape based similarity measure. Exhaustive training.
    • pause

      public static void pause()
      Pauses the display until the user hits enter.
    • counterClockwise

      private void counterClockwise(float[] x, float[] y, float[] z, int nPts)
    • categorizeByTexture

      private void categorizeByTexture()
      Texture bases similarity measure. Currently disabled.
    • readImagesAndVOIs

      private void readImagesAndVOIs()
      Read image and corresponding VOI.
    • readImagesAndVOIsInReverse

      private void readImagesAndVOIsInReverse()
      Read image and VOI in reverse order.
    • readImagesAndVOIsFromMid

      private void readImagesAndVOIsFromMid()
      Read image and VOIs start from the mid slice.