Class AlgorithmASM

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmASM
    extends AlgorithmBase
    implements java.awt.event.ActionListener
    Author:
    William Gandler This is a port of active shape model code from MATLAB to Java. The license is given below: Copyright (c) 2010, Dirk-Jan Kroon All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    • Field Detail

      • fileDir

        private java.lang.String fileDir
      • fatalError

        private boolean fatalError
      • Vertices

        private double[][] Vertices
      • Lines

        private int[][] Lines
      • pauseDialog

        private javax.swing.JDialog pauseDialog
      • initialVOI

        private VOI initialVOI
      • OKButton

        private javax.swing.JButton OKButton
      • pressedOK

        private boolean pressedOK
    • Constructor Detail

      • AlgorithmASM

        public AlgorithmASM()
    • Method Detail

      • finalize

        public void finalize()
        Prepares this class for destruction.
        Overrides:
        finalize in class AlgorithmBase
      • ASM_2D_example

        public void ASM_2D_example()
      • createPauseDialog

        private void createPauseDialog​(java.awt.event.ActionListener al)
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Calls various methods depending on the action.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class AlgorithmBase
        Parameters:
        event - event that triggered function
      • ASM_align_data_inverse2D

        private void ASM_align_data_inverse2D​(double[][] pos,
                                              AlgorithmASM.TData tform)
      • ASM_getProfileAndDerivatives2D

        private void ASM_getProfileAndDerivatives2D​(ModelImage I,
                                                    double[][] P,
                                                    double[][] N,
                                                    int k,
                                                    double[][] gtc,
                                                    double[][] dgtc)
      • linspace_multi

        private void linspace_multi​(double[] d1,
                                    double[] d2,
                                    int n,
                                    double[][] X)
      • ASM_GetContourNormals2D

        private double[][] ASM_GetContourNormals2D​(double[][] V,
                                                   int[][] L)
      • PCA

        private void PCA​(double[][] x,
                         double[] Evalues,
                         double[][] Evectors,
                         double[] x_mean)
      • ASM_align_data2D

        private void ASM_align_data2D​(double[][] Vertices,
                                      AlgorithmASM.TData tform)
      • LoadDataSetNiceContour

        private void LoadDataSetNiceContour​(java.lang.String fileName,
                                            int nBetween,
                                            boolean verbose)