Class JDialogProstateSegmentationRegBSpline3DFast

  • All Implemented Interfaces:
    AlgorithmInterface, DialogDefaultsInterface, java.awt.event.ActionListener, java.awt.event.FocusListener, java.awt.event.ItemListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class JDialogProstateSegmentationRegBSpline3DFast
    extends JDialogBase
    implements AlgorithmInterface
    Semi-automatic MR Prostate segmentation - Registration guided segmentation model. The algorithm uses B-Spline registration to guide the MR prostate segmentation. Basic steps: 1) User open the axial, sagittal, coronal images in the MIPAV frame. 2) User manually outline the three contours on separate slices for each axial, sagittal, and coronal images to define the middle, the apex and the base of the prostate. 3) User click the OK button to let a fully automatic registration guided algorithm to segment the prostate of all the three images.
    Author:
    Ruida Cheng
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  JDialogProstateSegmentationRegBSpline3DFast.Edge  
      (package private) class  JDialogProstateSegmentationRegBSpline3DFast.PolarPoint  
      • Nested classes/interfaces inherited from class javax.swing.JDialog

        javax.swing.JDialog.AccessibleJDialog
      • Nested classes/interfaces inherited from class java.awt.Dialog

        java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
      • Nested classes/interfaces inherited from class java.awt.Window

        java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)
      Just handle GUI button clicks event.
      void adjustVOIs​(ModelImage image)
      When user draws the 3 VOIs out of order, adjust the VOIs in ascending order
      void algorithmPerformed​(AlgorithmBase algorithm)
      This method is required if the AlgorithmPerformed interface is implemented.
      void autoConfigVOIsNumbers()
      After user manually draw the three VOIs on each axial, sagittal, coronal image, the drawn VOIs slices number is auto configured to appear in the dialog GUI interface.
      private ModelImage calculateCoherenceEnhancingDiffusion​(ModelImage cropImage)
      Apply the coherence enhancing diffusion filter to the croppred MR image.
      void calculateVOIsVolume()
      Compute the VOIs binary mask based volumes.
      void configVOIsNumbers​(ModelImage image, int[] slices)
      Configure the mid, apex and base VOIs, sort them in order.
      void convertVOIToDicomSpace​(VOIVector src, java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> target, ModelImage image, int startSlice, int endSlice)
      Conver the VOIs from image space to Dicom space
      private java.lang.Runnable createTask​(ModelImage image, int midVOI, int startVOI, int endVOI)
      Parallel processing the automatic segmentation algorithm to all the three images concurrently.
      ModelImage cropROI​(ModelImage image, int[] xBounds, int[] yBounds, int[] zBounds, int[] boundingBox, int midVOI)
      Crop MR image with specified X, Y, Z bounds Use the mid slice as the initial guidance to find the bounds.
      void doFuzzyCmean​(ModelImage coherenceEnhancingDiffusionImage, java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC)
      Generate the Fuzzy-C means classes from the CED image
      void doRegistrationEnd​(ModelImage image, ModelImage coherenceEnhancingDiffusionImage, java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC, int endVOI, int[] boundingBox)
      Near the base, base contour starts as the initial estimate, and repeat the same process toward the end slices.
      void doRegistrationMid​(ModelImage image, ModelImage coherenceEnhancingDiffusionImage, java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC, int midVOI, int startVOI, int endVOI, int[] boundingBox)
      The proposed model uses 2D registration to register 2D slices from the middle slice to the adjacent slice.
      void doRegistrationStart​(ModelImage image, ModelImage coherenceEnhancingDiffusionImage, java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC, int startVOI, int[] boundingBox)
      Near the apex, apex contour starts as the initial estimate, and repeat the same process toward the end slices.
      private float[] getCentroids​(ModelImage srcImage, AlgorithmFuzzyCMeans fcmAlgo, float[] centroids)
      Gets the minimum and maximum of each image and initializes the centroids dialog appropriately.
      void init()
      Create the dialog interface.
      private boolean isVOIsCloseEnough​(int currentSlice, ModelImage resultImage, ModelImage refImage)
      Check the registration accuracy.
      static void pause()
      Pauses the display until the user hits enter.
      void printVolume​(ModelImage srcImage, VOIVector voiVector, int viewOrientation)
      Print out the three VOIs volume in system console out.
      void removeContourFromOtherOrientation()
      User central gland contours projection to remove the extra interpolated VOIs contours at the apex and base.
      void removeVOIsInDicomSpace​(int zSlice, float zDicom, ModelImage image, java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> firstVOI, java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> secondVOI, int viewOrientation)
      Remove the extra VOIs contours in Dicom space.
      void smoothVOI120​(ModelImage resultImage)
      Convert the mask image to VOI with 120 points.
      void smoothVOI50​(ModelImage resultImage)
      Convert the mask image to VOI with 50 points
      void sortCEDImageVOIs​(ModelImage coherenceEnhancingDiffusionImage, int midVOI, int startVOI, int endVOI)
      Sort the CED image VOIs
      void sortImageVOIs​(ModelImage image)
      Sorting image VOI
      void sortImageVOIsInit​(ModelImage image, int midVOI, int startVOI, int endVOI)
      Sort the original MR image's specified VOIs
      void transformVOI​(ModelImage image, ModelImage resultImage, ModelImage refImage, ModelImage testImage, int[] boundingBox, int currentSlice)
      Transform the the resulting VOI from cropped image to oringal MR image.
      java.lang.Runnable trimVOIsInSingleImage​(ModelImage image, int startVOI, int endVOI, java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> firstVOI, java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> secondVOI, int viewOrientation)
      In Dicom space, central contours projections to eliminate the extra contours at the apex and base.
      • Methods inherited from class javax.swing.JDialog

        addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
      • Methods inherited from class java.awt.Dialog

        addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
      • Methods inherited from class java.awt.Window

        addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • UI

        private ViewUserInterface UI
        global user interface to get the three active images.
      • tracingSliceNumber

        private int tracingSliceNumber
        number of slices to trace, start from the apex and base VOIs
      • Axial

        private static int Axial
        Axial image type
      • Sagittal

        private static int Sagittal
        Sagittal image type
      • Coronal

        private static int Coronal
        Coronal image type
      • labelAxis

        private javax.swing.JLabel labelAxis
      • labelStartVOIAxial

        private javax.swing.JLabel labelStartVOIAxial
      • textFieldStartVOIAxial

        private javax.swing.JTextField textFieldStartVOIAxial
      • labelEndVOIAxial

        private javax.swing.JLabel labelEndVOIAxial
      • textFieldEndVOIAxial

        private javax.swing.JTextField textFieldEndVOIAxial
      • labelMidVOIAxial

        private javax.swing.JLabel labelMidVOIAxial
      • textFieldMidVOIAxial

        private javax.swing.JTextField textFieldMidVOIAxial
      • startVOIAxial

        int startVOIAxial
      • endVOIAxial

        int endVOIAxial
      • midVOIAxial

        int midVOIAxial
      • labelSagittal

        private javax.swing.JLabel labelSagittal
      • labelStartVOISagittal

        private javax.swing.JLabel labelStartVOISagittal
      • textFieldStartVOISagittal

        private javax.swing.JTextField textFieldStartVOISagittal
      • labelEndVOISagittal

        private javax.swing.JLabel labelEndVOISagittal
      • textFieldEndVOISagittal

        private javax.swing.JTextField textFieldEndVOISagittal
      • labelMidVOISagittal

        private javax.swing.JLabel labelMidVOISagittal
      • textFieldMidVOISagittal

        private javax.swing.JTextField textFieldMidVOISagittal
      • startVOISagittal

        int startVOISagittal
      • endVOISagittal

        int endVOISagittal
      • midVOISagittal

        int midVOISagittal
      • labelCoronal

        private javax.swing.JLabel labelCoronal
      • labelStartVOICoronal

        private javax.swing.JLabel labelStartVOICoronal
      • textFieldStartVOICoronal

        private javax.swing.JTextField textFieldStartVOICoronal
      • labelEndVOICoronal

        private javax.swing.JLabel labelEndVOICoronal
      • textFieldEndVOICoronal

        private javax.swing.JTextField textFieldEndVOICoronal
      • labelMidVOICoronal

        private javax.swing.JLabel labelMidVOICoronal
      • textFieldMidVOICoronal

        private javax.swing.JTextField textFieldMidVOICoronal
      • radioBSpline

        private javax.swing.JRadioButton radioBSpline
      • radioOAR

        private javax.swing.JRadioButton radioOAR
      • startVOICoronal

        private int startVOICoronal
      • endVOICoronal

        private int endVOICoronal
      • midVOICoronal

        private int midVOICoronal
      • useBSpline

        private boolean useBSpline
        Flag to indicate to use B-Spline registration or OAR registration
    • Constructor Detail

      • JDialogProstateSegmentationRegBSpline3DFast

        public JDialogProstateSegmentationRegBSpline3DFast​(java.awt.Frame theParentFrame)
        GUI interface for semi-automatic MR prostate segmentation.
        Parameters:
        theParentFrame - the MIPAV main frame.
    • Method Detail

      • autoConfigVOIsNumbers

        public void autoConfigVOIsNumbers()
        After user manually draw the three VOIs on each axial, sagittal, coronal image, the drawn VOIs slices number is auto configured to appear in the dialog GUI interface.
      • configVOIsNumbers

        public void configVOIsNumbers​(ModelImage image,
                                      int[] slices)
        Configure the mid, apex and base VOIs, sort them in order.
        Parameters:
        image - oringial MRI image
        slices - Slice array to store the mid, apex and base VOIs slice number.
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Just handle GUI button clicks event.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class JDialogBase
      • calculateVOIsVolume

        public void calculateVOIsVolume()
        Compute the VOIs binary mask based volumes.
      • printVolume

        public void printVolume​(ModelImage srcImage,
                                VOIVector voiVector,
                                int viewOrientation)
        Print out the three VOIs volume in system console out.
        Parameters:
        srcImage - original MRI image
        voiVector - segmented resulting VOIs contours
        viewOrientation - view axis orientation: axial, or sagittal or coronal.
      • removeContourFromOtherOrientation

        public void removeContourFromOtherOrientation()
        User central gland contours projection to remove the extra interpolated VOIs contours at the apex and base. Parallel processing the algorithm with axial, sagittal and coronal images concurrently.
      • trimVOIsInSingleImage

        public java.lang.Runnable trimVOIsInSingleImage​(ModelImage image,
                                                        int startVOI,
                                                        int endVOI,
                                                        java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> firstVOI,
                                                        java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> secondVOI,
                                                        int viewOrientation)
        In Dicom space, central contours projections to eliminate the extra contours at the apex and base. For example, axial image, project the sagittal, coronal VOIs onto the axial image Dicom space. The central gland part sagittal, coronal VOIs contours is projected on the axial image slices as points based contours. If there is no points on the corresponding axial image slice, however it has contour, the contour is eliminated.
        Parameters:
        image - original MRI image. i.e. axial image
        startVOI - apex VOI slice number
        endVOI - base VOI slice number
        firstVOI - sagittal image VOIs in Dicom space
        secondVOI - coronal image VOIs in Dicom space.
        viewOrientation - image axis orientation
        Returns:
      • removeVOIsInDicomSpace

        public void removeVOIsInDicomSpace​(int zSlice,
                                           float zDicom,
                                           ModelImage image,
                                           java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> firstVOI,
                                           java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> secondVOI,
                                           int viewOrientation)
        Remove the extra VOIs contours in Dicom space.
        Parameters:
        zSlice - axial z slice number
        zDicom - z slice number corresponding Dicom value
        image - original MRI image
        firstVOI - sagittal VOI
        secondVOI - coronal VOI
        viewOrientation - view axis
      • convertVOIToDicomSpace

        public void convertVOIToDicomSpace​(VOIVector src,
                                           java.util.Vector<WildMagic.LibFoundation.Mathematics.Vector3f> target,
                                           ModelImage image,
                                           int startSlice,
                                           int endSlice)
        Conver the VOIs from image space to Dicom space
        Parameters:
        src - source VOIs
        target - converted target VOIs
        image - original MRI image
        startSlice - starting slice
        endSlice - ending slice
      • createTask

        private java.lang.Runnable createTask​(ModelImage image,
                                              int midVOI,
                                              int startVOI,
                                              int endVOI)
        Parallel processing the automatic segmentation algorithm to all the three images concurrently.
        Parameters:
        image - original MRI image
        midVOI - mid slice VOI
        startVOI - apex slice VOI
        endVOI - base slice VOI
        axis - view axis
        Returns:
      • 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.
      • pause

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

        private ModelImage calculateCoherenceEnhancingDiffusion​(ModelImage cropImage)
        Apply the coherence enhancing diffusion filter to the croppred MR image.
        Parameters:
        cropImage - cropped image
        Returns:
        the coherence enhancing diffusion image.
      • isVOIsCloseEnough

        private boolean isVOIsCloseEnough​(int currentSlice,
                                          ModelImage resultImage,
                                          ModelImage refImage)
        Check the registration accuracy. Check to see if the registration runs into errors. Check criterion include VOI area, VOI center, etc. If area and center difference exceed specified threshold, registration runs into error.
        Parameters:
        currentSlice - current image slice
        resultImage - result image after registration
        refImage - registration reference slice
        Returns:
        true registration wrong, false, registration wrong.
      • smoothVOI50

        public void smoothVOI50​(ModelImage resultImage)
        Convert the mask image to VOI with 50 points
        Parameters:
        maskImage - binary mask image
        resultImage - result image
      • smoothVOI120

        public void smoothVOI120​(ModelImage resultImage)
        Convert the mask image to VOI with 120 points.
        Parameters:
        maskImage - binary mask image
        resultImage - result image
      • transformVOI

        public void transformVOI​(ModelImage image,
                                 ModelImage resultImage,
                                 ModelImage refImage,
                                 ModelImage testImage,
                                 int[] boundingBox,
                                 int currentSlice)
        Transform the the resulting VOI from cropped image to oringal MR image.
        Parameters:
        image - original MR image
        resultImage - resulting image after segmentation
        boundingBox - cropped image bounding box
        currentSlice - current image slice
      • sortImageVOIs

        public void sortImageVOIs​(ModelImage image)
        Sorting image VOI
        Parameters:
        image - original MR image
      • sortImageVOIsInit

        public void sortImageVOIsInit​(ModelImage image,
                                      int midVOI,
                                      int startVOI,
                                      int endVOI)
        Sort the original MR image's specified VOIs
        Parameters:
        image - original MR image
        midVOI - mid slice VOI
        startVOI - apex slice VOI
        endVOI - base slice VOI
      • sortCEDImageVOIs

        public void sortCEDImageVOIs​(ModelImage coherenceEnhancingDiffusionImage,
                                     int midVOI,
                                     int startVOI,
                                     int endVOI)
        Sort the CED image VOIs
        Parameters:
        coherenceEnhancingDiffusionImage - CED image
        midVOI - mid slice VOI
        startVOI - apex slice VOI
        endVOI - base slice VOI
      • doFuzzyCmean

        public void doFuzzyCmean​(ModelImage coherenceEnhancingDiffusionImage,
                                 java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC)
        Generate the Fuzzy-C means classes from the CED image
        Parameters:
        coherenceEnhancingDiffusionImage - CED image
        imageStackFuzzyC - Fuzzy-C means classes image stack.
      • getCentroids

        private float[] getCentroids​(ModelImage srcImage,
                                     AlgorithmFuzzyCMeans fcmAlgo,
                                     float[] centroids)
        Gets the minimum and maximum of each image and initializes the centroids dialog appropriately.
        Returns:
        Flag indicating a successful get.
      • doRegistrationMid

        public void doRegistrationMid​(ModelImage image,
                                      ModelImage coherenceEnhancingDiffusionImage,
                                      java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC,
                                      int midVOI,
                                      int startVOI,
                                      int endVOI,
                                      int[] boundingBox)
        The proposed model uses 2D registration to register 2D slices from the middle slice to the adjacent slice. It then generates a new VOI, and takes the VOI as the new initial estimate for the next slice in the series. This process is then iteratively propagated in both forward and backward directions.
        Parameters:
        image - original MR image
        coherenceEnhancingDiffusionImage - coherence enhance diffusion filter
        imageStackFuzzyC - Fuzzy-C segmentation stack
        midVOI - mid slice VOI
        startVOI - apex slice VOI
        endVOI - base slice VOI
        boundingBox - Cropped image bounding box
        axis - axis orientation
      • doRegistrationStart

        public void doRegistrationStart​(ModelImage image,
                                        ModelImage coherenceEnhancingDiffusionImage,
                                        java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC,
                                        int startVOI,
                                        int[] boundingBox)
        Near the apex, apex contour starts as the initial estimate, and repeat the same process toward the end slices.
        Parameters:
        image - original MR image
        coherenceEnhancingDiffusionImage - coherence enhance diffusion filter
        imageStackFuzzyC - Fuzzy-C segmentation stack
        startVOI - apex starting slice VOI number
        boundingBox - Cropped image bounding box
        axis - axis orientation
      • doRegistrationEnd

        public void doRegistrationEnd​(ModelImage image,
                                      ModelImage coherenceEnhancingDiffusionImage,
                                      java.util.Vector<java.util.Vector<ModelImage>> imageStackFuzzyC,
                                      int endVOI,
                                      int[] boundingBox)
        Near the base, base contour starts as the initial estimate, and repeat the same process toward the end slices.
        Parameters:
        image - original MR image
        coherenceEnhancingDiffusionImage - coherence enhance diffusion filter
        imageStackFuzzyC - Fuzzy-C segmentation stack
        startVOI - apex starting slice VOI number
        boundingBox - Cropped image bounding box
        axis - axis orientation
      • adjustVOIs

        public void adjustVOIs​(ModelImage image)
        When user draws the 3 VOIs out of order, adjust the VOIs in ascending order
        Parameters:
        image - source image, axial, sagittal or coronal
      • cropROI

        public ModelImage cropROI​(ModelImage image,
                                  int[] xBounds,
                                  int[] yBounds,
                                  int[] zBounds,
                                  int[] boundingBox,
                                  int midVOI)
        Crop MR image with specified X, Y, Z bounds Use the mid slice as the initial guidance to find the bounds.
        Parameters:
        image - Original MR image
        xBounds - X bounds
        yBounds - Y bounds
        zBounds - Z bounds
        boundingBox - Cropped region rounding box
        midVOI - mid slice VOI
        Returns:
      • init

        public void init()
        Create the dialog interface.