Class AlgorithmRegBSpline25D

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

    public class AlgorithmRegBSpline25D
    extends AlgorithmRegBSpline
    BSpline based registration of 2.5D images.
    • Field Detail

      • m_iSliceTarget

        protected final int m_iSliceTarget
        Index of the slice in the input source image to use as the target. If the value is -1, then each slice is registered to its adjacent one.
    • Constructor Detail

      • AlgorithmRegBSpline25D

        public AlgorithmRegBSpline25D​(ModelImage kImageResult,
                                      ModelImage kImageSource,
                                      int iSliceTarget,
                                      ModelImage kImageDeformation,
                                      RegistrationMeasure kRegMeasure,
                                      AlgorithmRegBSpline.Options kOptionsPass1,
                                      AlgorithmRegBSpline.Options kOptionsPass2)
        Constructor.
        Parameters:
        kImageResult - ModelImage Reference to an image to store the registered source image. This image must have the same dimensions as the input source image.
        kImageSource - ModelImage Reference to the original input image to use as the registration source.
        iSliceTarget - int Index of the slice in the input source image that is to be used as the reference. If this index is -1, then each slice is registered to the one before it
        kImageDeformation - ModelImage Reference to an image to store the computed deformation. This may be a null reference to indicate that the deformation is not to be computed. If this reference is not null, then the image must have the same dimensions as the input source image.
        kRegMeasure - RegistrationMeasure Reference to the particular cost measure to use for this registration. The cost measure is the same for all passes.
        kOptionsPass1 - Options Options to use for a first pass of registration. This may *not* be a null reference.
        kOptionsPass2 - Options Options to use for a second pass of registration. This may be null to indicate that only a single pass of registration is to be performed.
    • Method Detail

      • finalize

        public void finalize()
        Override of Object method called by garbage collection.
        Overrides:
        finalize in class AlgorithmRegBSpline
      • runAlgorithm

        public void runAlgorithm()
        AlgorithmBase abstract method implementation which performs the registration.
        Specified by:
        runAlgorithm in class AlgorithmBase
        Throws:
        java.lang.RuntimeException - DOCUMENT ME!
      • transform2DVOI

        private void transform2DVOI​(ModelImage image,
                                    ModelImage destImage,
                                    float[] imgBuffer,
                                    float[] kImageMapX,
                                    float[] kImageMapY,
                                    int iSlice,
                                    int iNumSlices)
      • runPass

        protected BSplineRegistration2Df runPass​(ModelSimpleImage kSource,
                                                 ModelSimpleImage kTarget,
                                                 AlgorithmRegBSpline.Options kOptions,
                                                 BSplineRegistration2Df kRegPrev)
        Perform a "pass" of BSpline based registration. A "pass" is defined to be one or more iterations using the BSpline basis parameters, gradient descent parameters, and convergence parameters.
        Parameters:
        kSource - ModelSimpleImage Reference to the original input image to use as the registration source. This image does not have to have the same dimensions as the image to be used as the registration target.
        kTarget - ModelSimpleImage Reference to the original input image to use as the registration target.
        kOptions - Options Options to use for a this registration pass. This may *not* be a null reference.
        kRegPrev - BSplineRegistration2Df Reference to a previous registration which can be used to initialize this registration. This may be a null reference meaning that the this registration uses the default "identity" initialization. If this it not a null reference, then this registration is initialized to provide the a close approximation to the same BSpline mapping as determined by the input registration. The main property of a registration is the position of its control points.
        Returns:
        BSplineRegistration2Df Registration instance resulting from this pass. This may be needed to provide for the initialization of subsequent passes or to compute the deformation image.
      • writeResults

        private void writeResults​(BSplineRegistration2Df[] akReg)
        Save the registration information to a file. This information includes the BSpline parameters; in particular, the coordinates for the lattice of control points.
        Parameters:
        akReg - BSplineRegistration2Df[] Contains the parameters which define the BSpline for registering each slice of the source image to the particular reference slice.