Class JDialogProstate2DSlicesAtlasPngConverterMICCAI_ced_scale_test

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.JDialogProstate2DSlicesAtlasPngConverterMICCAI_ced_scale_test
All Implemented Interfaces:
AlgorithmInterface, DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogProstate2DSlicesAtlasPngConverterMICCAI_ced_scale_test extends JDialogBase implements AlgorithmInterface
This is the third attempt to apply prostate segmentation on Promise 12 data. steps: 1. read the promise 12 data (image and masks) directly. ( without N4 correction ). 2. run CED to MRI image. 3. Transform both CED and MRI images to isotropic resolution(x, y resolution) images 3. converts the MRI and CED slices into png file format. For testing image only.
Author:
Ruida Cheng
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • UI

      private ViewUserInterface UI
      The main user interface.
    • boxYmin

      private int boxYmin
      bounding box for crop the image. Currently set from 0 to 512, the orginal image slice size.
    • boxYmax

      private int boxYmax
      bounding box for crop the image. Currently set from 0 to 512, the orginal image slice size.
    • boxXmin

      private int boxXmin
    • boxXmax

      private int boxXmax
    • xBounds

      private int[] xBounds
      X cropped region bounds.
    • yBounds

      private int[] yBounds
      Y cropped region bounds.
    • zBounds

      private int[] zBounds
      Z cropped region bound.
    • cropAlgo

      private AlgorithmAddMargins cropAlgo
      crop margin algorithm.
    • labelKeyImage

      private JLabel labelKeyImage
      key image directory.
    • textFieldKeyImage

      private JTextField textFieldKeyImage
    • buttonKeyImage

      private JButton buttonKeyImage
    • imageSelectionPanel

      private JPanel imageSelectionPanel
    • keyImages

      private Vector<ModelImage> keyImages
      image vector to hold the actual images.
    • cedImages

      private Vector<ModelImage> cedImages
    • transKeyImages

      private Vector<ModelImage> transKeyImages
    • transCEDImages

      private Vector<ModelImage> transCEDImages
    • transVOIImages

      private Vector<ModelImage> transVOIImages
    • keyImageVector1

      private Vector<String> keyImageVector1
    • cropKeyImages

      private Vector<ModelImage> cropKeyImages
      cropped key image vector.
    • labelSaveImage

      private JLabel labelSaveImage
      saved 2D slices atlas dir.
    • textFieldSaveImage

      private JTextField textFieldSaveImage
    • buttonSaveImage

      private JButton buttonSaveImage
    • saveImageChooser

      private JFileChooser saveImageChooser
    • saveImageDirectory

      private String saveImageDirectory
    • algoTrans

      private AlgorithmTransform algoTrans
  • Constructor Details

    • JDialogProstate2DSlicesAtlasPngConverterMICCAI_ced_scale_test

      public JDialogProstate2DSlicesAtlasPngConverterMICCAI_ced_scale_test(Frame theParentFrame)
      Constructor.
      Parameters:
      theParentFrame -
  • Method Details

    • disposeLocal

      public void disposeLocal()
      dispose memory
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Dialog local actionPerformed handler.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
    • recordSaveImageDir

      private void recordSaveImageDir()
      Let user specify the saved 2D slices atlas, record the save directory.
    • readKeyImageDir

      private void readKeyImageDir()
      Read 3D images atlas directory.
    • traverse_folder_1

      private void traverse_folder_1(File dir)
    • processDir_folder_1

      private void processDir_folder_1(File dir)
    • sortKeyImage_1

      public void sortKeyImage_1()
    • algorithmPerformed

      public void algorithmPerformed(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented. It is called by the algorithms when it has completed or failed to to complete, so that the dialog can be display the result image and/or clean up.
      Specified by:
      algorithmPerformed in interface AlgorithmInterface
      Parameters:
      algorithm - Algorithm that caused the event.
    • callAlgorithm

      public void callAlgorithm()
      Driver function to read image and VOIs, and convert each 3D image to 2D slices.
    • runCED

      public void runCED()
    • runTransform

      public void runTransform()
    • calculateTransform

      public ModelImage calculateTransform(ModelImage image)
    • calculateCoherenceEnhancingDiffusion

      private ModelImage calculateCoherenceEnhancingDiffusion(ModelImage inImage)
    • saveImagesTrain

      public void saveImagesTrain()
      Save the 2D slices and VOIs to user specified dir.
    • saveImagesTest

      public void saveImagesTest()
    • savePNGfile

      private void savePNGfile(String dirName, String fileName, ModelImage srcImage, float minIntensity, float maxIntensity, int xDim, int yDim, boolean isMask)
    • cropKeyImages

      public void cropKeyImages()
      Crop key images.
    • loadFiles

      public void loadFiles()
      load image files and voi files
    • readFile

      public void readFile()
    • init

      public void init()
      Initial panel
    • buildKeyImagePanel

      public void buildKeyImagePanel()
      Panel contains both the 3D image dir and saved 2D slices atlas dir.