Class AlgorithmASM

All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmASM extends AlgorithmBase implements 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 Details

    • fileDir

      private String fileDir
    • fatalError

      private boolean fatalError
    • p

      private AlgorithmASM.P p
    • Vertices

      private double[][] Vertices
    • Lines

      private int[][] Lines
    • pauseDialog

      private JDialog pauseDialog
    • Itest

      private ModelImage Itest
    • initialVOI

      private VOI initialVOI
    • OKButton

      private JButton OKButton
    • pressedOK

      private boolean pressedOK
    • testFrame

      private ViewJFrameImage testFrame
  • Constructor Details

    • AlgorithmASM

      public AlgorithmASM()
  • Method Details

    • finalize

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

      public void ASM_2D_example()
    • ASM_ApplyModel2D

      private void ASM_ApplyModel2D(ModelImage Itest, AlgorithmASM.TData tform, AlgorithmASM.SData ShapeData, AlgorithmASM.AppData[] AppearanceData, AlgorithmASM.Options options)
    • createPauseDialog

      private void createPauseDialog(ActionListener al)
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Calls various methods depending on the action.
      Specified by:
      actionPerformed in interface 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_MakeAppearanceModel2D

      private void ASM_MakeAppearanceModel2D(AlgorithmASM.ASMData[] TrainingData, AlgorithmASM.Options options, AlgorithmASM.AppData[] AppearanceData)
    • 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)
    • ASM_MakeShapeModel2D

      private void ASM_MakeShapeModel2D(AlgorithmASM.ASMData[] TrainingData, AlgorithmASM.SData ShapeData)
    • 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(String fileName, int nBetween, boolean verbose)
    • runAlgorithm

      public void runAlgorithm()
      Starts the algorithm.
      Specified by:
      runAlgorithm in class AlgorithmBase