Class JDialogPromise12_2DVolumetrieHED

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

public class JDialogPromise12_2DVolumetrieHED extends JDialogBase implements AlgorithmInterface
For Miccai promise 12 prostate data, we apply wp segmentation using HED deep learning model. Data: given promise 12 data, we apply N4 correction, cropping, and isotropic upsampling. Steps: 1. read promise 12 image data with corresponding masks after pre-processing. 2. From VOIs, generate the binary mask images. 3. Transform into isotropic image (upsampling) with resolution: 0.35m x 0.35m x 0.35m. 4. Conversion: converts axial image to axial an coronal using JDialogReoriented. 5. Generate the CED images from MR images in three orientation: axial, sagittal, coronal. 6. Each orientation, save 3D MR images, CED images with corresponding binary mask images. This is the 2D-volumetric segmentation approach.
Author:
Ruida Cheng
See Also:
  • Field Details

  • Constructor Details

    • JDialogPromise12_2DVolumetrieHED

      public JDialogPromise12_2DVolumetrieHED(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()
    • traverse_folder_2

      private void traverse_folder_2(File dir)
    • processDir_folder_2

      private void processDir_folder_2(File dir)
    • sortKeyImage_2

      public void sortKeyImage_2()
    • 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.
    • saveHED2DsliceMRI

      public void saveHED2DsliceMRI()
    • runCED

      public void runCED()
    • saveHED2DsliceCED

      public void saveHED2DsliceCED()
    • saveImage

      public void saveImage(ModelImage image, ModelImage imageMask, String orientation)
    • calculateCoherenceEnhancingDiffusion

      private ModelImage calculateCoherenceEnhancingDiffusion(ModelImage inImage)
    • conversion

      public void conversion()
    • scaleIntensity

      public ModelImage scaleIntensity(ModelImage image)
    • saveTestedImages

      public void saveTestedImages()
    • savePNGfile

      private void savePNGfile(String dirName, String fileName, ModelImage srcImage, float minIntensity, float maxIntensity, int xDim, int yDim, boolean isMask)
    • 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.