java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.registration.ImRegPOC
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class ImRegPOC extends AlgorithmBase
Author:
aailb This is a port of the MATLAB code poc_prototype.m by Yoshi Ri at the University of Tokyo updated on 2017/8/11. This code is ported to Java with the 2-clause BSD license: The 2-clause BSD License Copyright (c) 2018, Yoshi Ri All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project. The warpPolar routine is derived from warpPolar in the Open Source Computer Vision Library with the license: /*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // // // License Agreement // For Open Source Computer Vision Library // // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. // Copyright (C) 2009, Willow Garage Inc., all rights reserved. // Copyright (C) 2014-2015, Itseez Inc., all rights reserved. // Third party copyrights are property of their respective owners. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistribution's of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistribution's 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. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. // // 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 Intel Corporation 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. // //M
  • Field Details

    • refImage

      private ModelImage refImage
      The inputImage will be registered to this reference image.
    • inputImage

      private ModelImage inputImage
      This image is to registered to the reference image.
    • height

      private int height
    • width

      private int width
    • length

      private int length
    • isMATLABVersion

      private boolean isMATLABVersion
    • alpha

      private double alpha
    • beta

      private double beta
    • hanw

      private double[] hanw
  • Constructor Details

  • Method Details

    • runAlgorithm

      public void runAlgorithm()
      Description copied from class: AlgorithmBase
      Actually runs the algorithm. Implemented by inheriting algorithms.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • runPythonVersion

      public void runPythonVersion()
    • Warp_4dof

      private double[] Warp_4dof(double[] Img, double dx, double dy, double theta, double scale, double outOfBoundsValue)
    • poc2warp

      private Jama.Matrix poc2warp(double cx, double cy, double dx, double dy, double theta, double scale)
    • PhaseCorrelation

      private double[][] PhaseCorrelation(double[] a, double[] b, double[] Diff, double[] peak)
    • WeightedCOG

      private double[] WeightedCOG(double[][] mat)
    • CenterOfGravity

      private double[] CenterOfGravity(double[][] mat)
    • createHanningWindow

      private double[] createHanningWindow()
    • runMATLABVersion

      public void runMATLABVersion()
    • imtranslate

      private double[] imtranslate(double[][] Image, double translateX, double translateY, double outOfBoundsValue)
    • ImageRotateScale

      private double[][] ImageRotateScale(double[][] Image, double theta, double scale, int width, int height)
    • log2

      private double log2(double input)
    • fftshift

      private double[][] fftshift(double[] in, int yDim, int xDim)