# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.4.1
#
# Do not make changes to this file unless you know what you are doing - modify
# the SWIG interface file instead.


import collections

from sys import version_info as _version_info
if _version_info < (3, 7, 0):
    raise RuntimeError("Python 3.7 or later required")

from . import _ITKCommonPython


from . import _ITKOptimizersv4Python



from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if getattr(globals().get("__spec__"), "parent", None) or __package__ or "." in __name__:
    from . import _itkObjectToObjectOptimizerBasePython
else:
    import _itkObjectToObjectOptimizerBasePython

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "this":
            set(self, name, value)
        elif name == "thisown":
            self.this.own(value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


if _swig_python_version_info[0:2] >= (3, 3):
    import collections.abc
else:
    import collections

import itk.itkOptimizerParametersPython
import itk.vnl_vectorPython
import itk.stdcomplexPython
import itk.pyBasePython
import itk.vnl_matrixPython
import itk.ITKCommonBasePython
import itk.itkMatrixPython
import itk.vnl_matrix_fixedPython
import itk.itkPointPython
import itk.vnl_vector_refPython
import itk.itkFixedArrayPython
import itk.itkVectorPython
import itk.itkCovariantVectorPython
import itk.itkArrayPython
import itk.itkOptimizerParameterScalesEstimatorPython
import itk.itkObjectToObjectMetricBasePython
import itk.itkSingleValuedCostFunctionv4Python
import itk.itkCostFunctionPython
class itkObjectToObjectOptimizerBaseTemplateD(itk.ITKCommonBasePython.itkObject):
    r"""Proxy of C++ itkObjectToObjectOptimizerBaseTemplateD class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def SetMetric(self, _arg):
        r"""
        SetMetric(self, _arg)

        Parameters
        ----------
        _arg: itkObjectToObjectMetricBaseTemplateD *

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_SetMetric(self, _arg)

    def GetModifiableMetric(self):
        r"""GetModifiableMetric(self) -> itkObjectToObjectMetricBaseTemplateD"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetModifiableMetric(self)

    def GetMetric(self, *args):
        r"""
        GetMetric(self) -> itkObjectToObjectMetricBaseTemplateD
        GetMetric(self) -> itkObjectToObjectMetricBaseTemplateD
        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetMetric(self, *args)

    def GetCurrentMetricValue(self):
        r"""GetCurrentMetricValue(self) -> double const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetCurrentMetricValue(self)

    def GetValue(self):
        r"""GetValue(self) -> double const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetValue(self)

    def SetScales(self, scales):
        r"""
        SetScales(self, scales)

        Parameters
        ----------
        scales: itkOptimizerParametersD const &

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_SetScales(self, scales)

    def GetScales(self):
        r"""GetScales(self) -> itkOptimizerParametersD"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetScales(self)

    def GetScalesAreIdentity(self):
        r"""GetScalesAreIdentity(self) -> bool const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetScalesAreIdentity(self)

    def SetWeights(self, _arg):
        r"""
        SetWeights(self, _arg)

        Parameters
        ----------
        _arg: itkOptimizerParametersD

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_SetWeights(self, _arg)

    def GetWeights(self):
        r"""GetWeights(self) -> itkOptimizerParametersD"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetWeights(self)

    def GetWeightsAreIdentity(self):
        r"""GetWeightsAreIdentity(self) -> bool const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetWeightsAreIdentity(self)

    def GetScalesInitialized(self):
        r"""GetScalesInitialized(self) -> bool"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetScalesInitialized(self)

    def SetScalesEstimator(self, _arg):
        r"""
        SetScalesEstimator(self, _arg)

        Parameters
        ----------
        _arg: itkOptimizerParameterScalesEstimatorTemplateD *

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_SetScalesEstimator(self, _arg)

    def SetDoEstimateScales(self, _arg):
        r"""
        SetDoEstimateScales(self, _arg)

        Parameters
        ----------
        _arg: bool

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_SetDoEstimateScales(self, _arg)

    def GetDoEstimateScales(self):
        r"""GetDoEstimateScales(self) -> bool const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetDoEstimateScales(self)

    def DoEstimateScalesOn(self):
        r"""DoEstimateScalesOn(self)"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_DoEstimateScalesOn(self)

    def DoEstimateScalesOff(self):
        r"""DoEstimateScalesOff(self)"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_DoEstimateScalesOff(self)

    def SetNumberOfWorkUnits(self, number):
        r"""
        SetNumberOfWorkUnits(self, number)

        Parameters
        ----------
        number: unsigned int

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_SetNumberOfWorkUnits(self, number)

    def GetNumberOfWorkUnits(self):
        r"""GetNumberOfWorkUnits(self) -> unsigned int const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetNumberOfWorkUnits(self)

    def GetCurrentIteration(self):
        r"""GetCurrentIteration(self) -> unsigned long"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetCurrentIteration(self)

    def SetNumberOfIterations(self, _arg):
        r"""
        SetNumberOfIterations(self, _arg)

        Parameters
        ----------
        _arg: unsigned long

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_SetNumberOfIterations(self, _arg)

    def GetNumberOfIterations(self):
        r"""GetNumberOfIterations(self) -> unsigned long"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetNumberOfIterations(self)

    def GetCurrentPosition(self):
        r"""GetCurrentPosition(self) -> itkOptimizerParametersD"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetCurrentPosition(self)

    def StartOptimization(self, doOnlyInitialization=False):
        r"""
        StartOptimization(self, doOnlyInitialization=False)

        Parameters
        ----------
        doOnlyInitialization: bool

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_StartOptimization(self, doOnlyInitialization)

    def GetStopConditionDescription(self):
        r"""GetStopConditionDescription(self) -> std::string const"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_GetStopConditionDescription(self)

    def CanUseScales(self):
        r"""CanUseScales(self) -> bool"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_CanUseScales(self)
    __swig_destroy__ = _itkObjectToObjectOptimizerBasePython.delete_itkObjectToObjectOptimizerBaseTemplateD

    @staticmethod
    def cast(obj):
        r"""
        cast(obj) -> itkObjectToObjectOptimizerBaseTemplateD

        Parameters
        ----------
        obj: itkLightObject *

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_cast(obj)

# Register itkObjectToObjectOptimizerBaseTemplateD in _itkObjectToObjectOptimizerBasePython:
_itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateD_swigregister(itkObjectToObjectOptimizerBaseTemplateD)
class itkObjectToObjectOptimizerBaseTemplateEnums(object):
    r"""Proxy of C++ itkObjectToObjectOptimizerBaseTemplateEnums class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    StopConditionObjectToObjectOptimizer_MAXIMUM_NUMBER_OF_ITERATIONS = _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_StopConditionObjectToObjectOptimizer_MAXIMUM_NUMBER_OF_ITERATIONS
    
    StopConditionObjectToObjectOptimizer_COSTFUNCTION_ERROR = _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_StopConditionObjectToObjectOptimizer_COSTFUNCTION_ERROR
    
    StopConditionObjectToObjectOptimizer_UPDATE_PARAMETERS_ERROR = _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_StopConditionObjectToObjectOptimizer_UPDATE_PARAMETERS_ERROR
    
    StopConditionObjectToObjectOptimizer_STEP_TOO_SMALL = _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_StopConditionObjectToObjectOptimizer_STEP_TOO_SMALL
    
    StopConditionObjectToObjectOptimizer_CONVERGENCE_CHECKER_PASSED = _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_StopConditionObjectToObjectOptimizer_CONVERGENCE_CHECKER_PASSED
    
    StopConditionObjectToObjectOptimizer_GRADIENT_MAGNITUDE_TOLEARANCE = _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_StopConditionObjectToObjectOptimizer_GRADIENT_MAGNITUDE_TOLEARANCE
    
    StopConditionObjectToObjectOptimizer_OTHER_ERROR = _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_StopConditionObjectToObjectOptimizer_OTHER_ERROR
    

    def __init__(self, *args):
        r"""
        __init__(self) -> itkObjectToObjectOptimizerBaseTemplateEnums
        __init__(self, arg0) -> itkObjectToObjectOptimizerBaseTemplateEnums

        Parameters
        ----------
        arg0: itkObjectToObjectOptimizerBaseTemplateEnums const &

        """
        _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_swiginit(self, _itkObjectToObjectOptimizerBasePython.new_itkObjectToObjectOptimizerBaseTemplateEnums(*args))
    __swig_destroy__ = _itkObjectToObjectOptimizerBasePython.delete_itkObjectToObjectOptimizerBaseTemplateEnums

# Register itkObjectToObjectOptimizerBaseTemplateEnums in _itkObjectToObjectOptimizerBasePython:
_itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateEnums_swigregister(itkObjectToObjectOptimizerBaseTemplateEnums)
class itkObjectToObjectOptimizerBaseTemplateF(itk.ITKCommonBasePython.itkObject):
    r"""Proxy of C++ itkObjectToObjectOptimizerBaseTemplateF class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def SetMetric(self, _arg):
        r"""
        SetMetric(self, _arg)

        Parameters
        ----------
        _arg: itkObjectToObjectMetricBaseTemplateF *

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_SetMetric(self, _arg)

    def GetModifiableMetric(self):
        r"""GetModifiableMetric(self) -> itkObjectToObjectMetricBaseTemplateF"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetModifiableMetric(self)

    def GetMetric(self, *args):
        r"""
        GetMetric(self) -> itkObjectToObjectMetricBaseTemplateF
        GetMetric(self) -> itkObjectToObjectMetricBaseTemplateF
        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetMetric(self, *args)

    def GetCurrentMetricValue(self):
        r"""GetCurrentMetricValue(self) -> float const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetCurrentMetricValue(self)

    def GetValue(self):
        r"""GetValue(self) -> float const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetValue(self)

    def SetScales(self, scales):
        r"""
        SetScales(self, scales)

        Parameters
        ----------
        scales: itkOptimizerParametersF const &

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_SetScales(self, scales)

    def GetScales(self):
        r"""GetScales(self) -> itkOptimizerParametersF"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetScales(self)

    def GetScalesAreIdentity(self):
        r"""GetScalesAreIdentity(self) -> bool const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetScalesAreIdentity(self)

    def SetWeights(self, _arg):
        r"""
        SetWeights(self, _arg)

        Parameters
        ----------
        _arg: itkOptimizerParametersF

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_SetWeights(self, _arg)

    def GetWeights(self):
        r"""GetWeights(self) -> itkOptimizerParametersF"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetWeights(self)

    def GetWeightsAreIdentity(self):
        r"""GetWeightsAreIdentity(self) -> bool const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetWeightsAreIdentity(self)

    def GetScalesInitialized(self):
        r"""GetScalesInitialized(self) -> bool"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetScalesInitialized(self)

    def SetScalesEstimator(self, _arg):
        r"""
        SetScalesEstimator(self, _arg)

        Parameters
        ----------
        _arg: itkOptimizerParameterScalesEstimatorTemplateF *

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_SetScalesEstimator(self, _arg)

    def SetDoEstimateScales(self, _arg):
        r"""
        SetDoEstimateScales(self, _arg)

        Parameters
        ----------
        _arg: bool

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_SetDoEstimateScales(self, _arg)

    def GetDoEstimateScales(self):
        r"""GetDoEstimateScales(self) -> bool const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetDoEstimateScales(self)

    def DoEstimateScalesOn(self):
        r"""DoEstimateScalesOn(self)"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_DoEstimateScalesOn(self)

    def DoEstimateScalesOff(self):
        r"""DoEstimateScalesOff(self)"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_DoEstimateScalesOff(self)

    def SetNumberOfWorkUnits(self, number):
        r"""
        SetNumberOfWorkUnits(self, number)

        Parameters
        ----------
        number: unsigned int

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_SetNumberOfWorkUnits(self, number)

    def GetNumberOfWorkUnits(self):
        r"""GetNumberOfWorkUnits(self) -> unsigned int const &"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetNumberOfWorkUnits(self)

    def GetCurrentIteration(self):
        r"""GetCurrentIteration(self) -> unsigned long"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetCurrentIteration(self)

    def SetNumberOfIterations(self, _arg):
        r"""
        SetNumberOfIterations(self, _arg)

        Parameters
        ----------
        _arg: unsigned long

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_SetNumberOfIterations(self, _arg)

    def GetNumberOfIterations(self):
        r"""GetNumberOfIterations(self) -> unsigned long"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetNumberOfIterations(self)

    def GetCurrentPosition(self):
        r"""GetCurrentPosition(self) -> itkOptimizerParametersF"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetCurrentPosition(self)

    def StartOptimization(self, doOnlyInitialization=False):
        r"""
        StartOptimization(self, doOnlyInitialization=False)

        Parameters
        ----------
        doOnlyInitialization: bool

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_StartOptimization(self, doOnlyInitialization)

    def GetStopConditionDescription(self):
        r"""GetStopConditionDescription(self) -> std::string const"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_GetStopConditionDescription(self)

    def CanUseScales(self):
        r"""CanUseScales(self) -> bool"""
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_CanUseScales(self)
    __swig_destroy__ = _itkObjectToObjectOptimizerBasePython.delete_itkObjectToObjectOptimizerBaseTemplateF

    @staticmethod
    def cast(obj):
        r"""
        cast(obj) -> itkObjectToObjectOptimizerBaseTemplateF

        Parameters
        ----------
        obj: itkLightObject *

        """
        return _itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_cast(obj)

# Register itkObjectToObjectOptimizerBaseTemplateF in _itkObjectToObjectOptimizerBasePython:
_itkObjectToObjectOptimizerBasePython.itkObjectToObjectOptimizerBaseTemplateF_swigregister(itkObjectToObjectOptimizerBaseTemplateF)

