Class AlgorithmRegBSpline3D

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

    public class AlgorithmRegBSpline3D
    extends AlgorithmRegBSpline
    BSpline registration of 3D images.
    • Constructor Detail

      • AlgorithmRegBSpline3D

        public AlgorithmRegBSpline3D​(ModelImage kImageResult,
                                     ModelImage kImageSource,
                                     ModelImage kImageTarget,
                                     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 registration target image.
        kImageSource - ModelImage 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.
        kImageTarget - ModelImage Reference to the original input image to use as the registration target.
        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 target 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

      • runAlgorithm

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

        private void transform3DVOI​(ModelImage image,
                                    ModelImage destImage,
                                    float[] imgBuffer,
                                    float[] kImageMapX,
                                    float[] kImageMapY,
                                    float[] kImageMapZ)
      • runPass

        protected BSplineRegistration3Df runPass​(ModelSimpleImage kSource,
                                                 ModelSimpleImage kTarget,
                                                 AlgorithmRegBSpline.Options kOptions,
                                                 BSplineRegistration3Df kRegPrev,
                                                 java.lang.String kProgressPrefixString)
        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.
        kProgressPrefixString - String Text to add to the beginning of the progress bar message.
        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​(BSplineRegistration3Df kReg)
        Save the registration information to a file. This information includes the BSpline parameters; in particular, the coordinates for the lattice of control points.
        Parameters:
        kReg - BSplineRegistration3Df Contains the parameters which define the BSpline for registering the source image to the targe image.