# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.3.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 _ITKThresholdingPython



from sys import version_info as _swig_python_version_info
# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _itkHistogramThresholdCalculatorPython
else:
    import _itkHistogramThresholdCalculatorPython

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.ITKCommonBasePython
import itk.itkMatrixPython
import itk.itkVectorPython
import itk.itkFixedArrayPython
import itk.pyBasePython
import itk.vnl_vector_refPython
import itk.stdcomplexPython
import itk.vnl_vectorPython
import itk.vnl_matrixPython
import itk.itkCovariantVectorPython
import itk.vnl_matrix_fixedPython
import itk.itkPointPython
import itk.itkSimpleDataObjectDecoratorPython
import itk.itkRGBAPixelPython
import itk.itkArrayPython
import itk.itkRGBPixelPython
import itk.itkHistogramPython
import itk.itkSamplePython

def itkHistogramThresholdCalculatorHDF_New():
    return itkHistogramThresholdCalculatorHDF.New()

class itkHistogramThresholdCalculatorHDF(itk.ITKCommonBasePython.itkProcessObject):
    r"""Proxy of C++ itkHistogramThresholdCalculatorHDF 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")
    __repr__ = _swig_repr

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkHistogramThresholdCalculatorHDF_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkHistogramThresholdCalculatorHDF_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF_Clone(self)

    def SetInput(self, input):
        r"""
        SetInput(self, input)

        Parameters
        ----------
        input: itkHistogramD const *

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF_SetInput(self, input)

    def GetInput(self):
        r"""GetInput(self) -> itkHistogramD"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF_GetInput(self)

    def GetOutput(self):
        r"""GetOutput(self) -> itkSimpleDataObjectDecoratorF"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF_GetOutput(self)

    def GetThreshold(self):
        r"""GetThreshold(self) -> float const &"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF_GetThreshold(self)
    __swig_destroy__ = _itkHistogramThresholdCalculatorPython.delete_itkHistogramThresholdCalculatorHDF

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

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

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF_cast(obj)

    def New(*args, **kargs):
        """New() -> itkHistogramThresholdCalculatorHDF

        Create a new object of the class itkHistogramThresholdCalculatorHDF and set the input and the parameters if some
        named or non-named arguments are passed to that method.

        New() tries to assign all the non named parameters to the input of the new objects - the
        first non named parameter in the first input, etc.

        The named parameters are used by calling the method with the same name prefixed by 'Set'.

        Ex:

          itkHistogramThresholdCalculatorHDF.New(reader, threshold=10)

        is (most of the time) equivalent to:

          obj = itkHistogramThresholdCalculatorHDF.New()
          obj.SetInput(0, reader.GetOutput())
          obj.SetThreshold(10)
        """
        obj = itkHistogramThresholdCalculatorHDF.__New_orig__()
        from itk.support import template_class
        template_class.New(obj, *args, **kargs)
        return obj
    New = staticmethod(New)


# Register itkHistogramThresholdCalculatorHDF in _itkHistogramThresholdCalculatorPython:
_itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDF_swigregister(itkHistogramThresholdCalculatorHDF)

def itkHistogramThresholdCalculatorHDSS_New():
    return itkHistogramThresholdCalculatorHDSS.New()

class itkHistogramThresholdCalculatorHDSS(itk.ITKCommonBasePython.itkProcessObject):
    r"""Proxy of C++ itkHistogramThresholdCalculatorHDSS 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")
    __repr__ = _swig_repr

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkHistogramThresholdCalculatorHDSS_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkHistogramThresholdCalculatorHDSS_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS_Clone(self)

    def SetInput(self, input):
        r"""
        SetInput(self, input)

        Parameters
        ----------
        input: itkHistogramD const *

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS_SetInput(self, input)

    def GetInput(self):
        r"""GetInput(self) -> itkHistogramD"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS_GetInput(self)

    def GetOutput(self):
        r"""GetOutput(self) -> itkSimpleDataObjectDecoratorSS"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS_GetOutput(self)

    def GetThreshold(self):
        r"""GetThreshold(self) -> short const &"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS_GetThreshold(self)
    __swig_destroy__ = _itkHistogramThresholdCalculatorPython.delete_itkHistogramThresholdCalculatorHDSS

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

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

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS_cast(obj)

    def New(*args, **kargs):
        """New() -> itkHistogramThresholdCalculatorHDSS

        Create a new object of the class itkHistogramThresholdCalculatorHDSS and set the input and the parameters if some
        named or non-named arguments are passed to that method.

        New() tries to assign all the non named parameters to the input of the new objects - the
        first non named parameter in the first input, etc.

        The named parameters are used by calling the method with the same name prefixed by 'Set'.

        Ex:

          itkHistogramThresholdCalculatorHDSS.New(reader, threshold=10)

        is (most of the time) equivalent to:

          obj = itkHistogramThresholdCalculatorHDSS.New()
          obj.SetInput(0, reader.GetOutput())
          obj.SetThreshold(10)
        """
        obj = itkHistogramThresholdCalculatorHDSS.__New_orig__()
        from itk.support import template_class
        template_class.New(obj, *args, **kargs)
        return obj
    New = staticmethod(New)


# Register itkHistogramThresholdCalculatorHDSS in _itkHistogramThresholdCalculatorPython:
_itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDSS_swigregister(itkHistogramThresholdCalculatorHDSS)

def itkHistogramThresholdCalculatorHDUC_New():
    return itkHistogramThresholdCalculatorHDUC.New()

class itkHistogramThresholdCalculatorHDUC(itk.ITKCommonBasePython.itkProcessObject):
    r"""Proxy of C++ itkHistogramThresholdCalculatorHDUC 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")
    __repr__ = _swig_repr

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkHistogramThresholdCalculatorHDUC_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkHistogramThresholdCalculatorHDUC_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC_Clone(self)

    def SetInput(self, input):
        r"""
        SetInput(self, input)

        Parameters
        ----------
        input: itkHistogramD const *

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC_SetInput(self, input)

    def GetInput(self):
        r"""GetInput(self) -> itkHistogramD"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC_GetInput(self)

    def GetOutput(self):
        r"""GetOutput(self) -> itkSimpleDataObjectDecoratorUC"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC_GetOutput(self)

    def GetThreshold(self):
        r"""GetThreshold(self) -> unsigned char const &"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC_GetThreshold(self)
    __swig_destroy__ = _itkHistogramThresholdCalculatorPython.delete_itkHistogramThresholdCalculatorHDUC

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

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

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC_cast(obj)

    def New(*args, **kargs):
        """New() -> itkHistogramThresholdCalculatorHDUC

        Create a new object of the class itkHistogramThresholdCalculatorHDUC and set the input and the parameters if some
        named or non-named arguments are passed to that method.

        New() tries to assign all the non named parameters to the input of the new objects - the
        first non named parameter in the first input, etc.

        The named parameters are used by calling the method with the same name prefixed by 'Set'.

        Ex:

          itkHistogramThresholdCalculatorHDUC.New(reader, threshold=10)

        is (most of the time) equivalent to:

          obj = itkHistogramThresholdCalculatorHDUC.New()
          obj.SetInput(0, reader.GetOutput())
          obj.SetThreshold(10)
        """
        obj = itkHistogramThresholdCalculatorHDUC.__New_orig__()
        from itk.support import template_class
        template_class.New(obj, *args, **kargs)
        return obj
    New = staticmethod(New)


# Register itkHistogramThresholdCalculatorHDUC in _itkHistogramThresholdCalculatorPython:
_itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHDUC_swigregister(itkHistogramThresholdCalculatorHDUC)

def itkHistogramThresholdCalculatorHFF_New():
    return itkHistogramThresholdCalculatorHFF.New()

class itkHistogramThresholdCalculatorHFF(itk.ITKCommonBasePython.itkProcessObject):
    r"""Proxy of C++ itkHistogramThresholdCalculatorHFF 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")
    __repr__ = _swig_repr

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkHistogramThresholdCalculatorHFF_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkHistogramThresholdCalculatorHFF_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF_Clone(self)

    def SetInput(self, input):
        r"""
        SetInput(self, input)

        Parameters
        ----------
        input: itkHistogramF const *

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF_SetInput(self, input)

    def GetInput(self):
        r"""GetInput(self) -> itkHistogramF"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF_GetInput(self)

    def GetOutput(self):
        r"""GetOutput(self) -> itkSimpleDataObjectDecoratorF"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF_GetOutput(self)

    def GetThreshold(self):
        r"""GetThreshold(self) -> float const &"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF_GetThreshold(self)
    __swig_destroy__ = _itkHistogramThresholdCalculatorPython.delete_itkHistogramThresholdCalculatorHFF

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

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

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF_cast(obj)

    def New(*args, **kargs):
        """New() -> itkHistogramThresholdCalculatorHFF

        Create a new object of the class itkHistogramThresholdCalculatorHFF and set the input and the parameters if some
        named or non-named arguments are passed to that method.

        New() tries to assign all the non named parameters to the input of the new objects - the
        first non named parameter in the first input, etc.

        The named parameters are used by calling the method with the same name prefixed by 'Set'.

        Ex:

          itkHistogramThresholdCalculatorHFF.New(reader, threshold=10)

        is (most of the time) equivalent to:

          obj = itkHistogramThresholdCalculatorHFF.New()
          obj.SetInput(0, reader.GetOutput())
          obj.SetThreshold(10)
        """
        obj = itkHistogramThresholdCalculatorHFF.__New_orig__()
        from itk.support import template_class
        template_class.New(obj, *args, **kargs)
        return obj
    New = staticmethod(New)


# Register itkHistogramThresholdCalculatorHFF in _itkHistogramThresholdCalculatorPython:
_itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFF_swigregister(itkHistogramThresholdCalculatorHFF)

def itkHistogramThresholdCalculatorHFSS_New():
    return itkHistogramThresholdCalculatorHFSS.New()

class itkHistogramThresholdCalculatorHFSS(itk.ITKCommonBasePython.itkProcessObject):
    r"""Proxy of C++ itkHistogramThresholdCalculatorHFSS 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")
    __repr__ = _swig_repr

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkHistogramThresholdCalculatorHFSS_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkHistogramThresholdCalculatorHFSS_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS_Clone(self)

    def SetInput(self, input):
        r"""
        SetInput(self, input)

        Parameters
        ----------
        input: itkHistogramF const *

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS_SetInput(self, input)

    def GetInput(self):
        r"""GetInput(self) -> itkHistogramF"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS_GetInput(self)

    def GetOutput(self):
        r"""GetOutput(self) -> itkSimpleDataObjectDecoratorSS"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS_GetOutput(self)

    def GetThreshold(self):
        r"""GetThreshold(self) -> short const &"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS_GetThreshold(self)
    __swig_destroy__ = _itkHistogramThresholdCalculatorPython.delete_itkHistogramThresholdCalculatorHFSS

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

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

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS_cast(obj)

    def New(*args, **kargs):
        """New() -> itkHistogramThresholdCalculatorHFSS

        Create a new object of the class itkHistogramThresholdCalculatorHFSS and set the input and the parameters if some
        named or non-named arguments are passed to that method.

        New() tries to assign all the non named parameters to the input of the new objects - the
        first non named parameter in the first input, etc.

        The named parameters are used by calling the method with the same name prefixed by 'Set'.

        Ex:

          itkHistogramThresholdCalculatorHFSS.New(reader, threshold=10)

        is (most of the time) equivalent to:

          obj = itkHistogramThresholdCalculatorHFSS.New()
          obj.SetInput(0, reader.GetOutput())
          obj.SetThreshold(10)
        """
        obj = itkHistogramThresholdCalculatorHFSS.__New_orig__()
        from itk.support import template_class
        template_class.New(obj, *args, **kargs)
        return obj
    New = staticmethod(New)


# Register itkHistogramThresholdCalculatorHFSS in _itkHistogramThresholdCalculatorPython:
_itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFSS_swigregister(itkHistogramThresholdCalculatorHFSS)

def itkHistogramThresholdCalculatorHFUC_New():
    return itkHistogramThresholdCalculatorHFUC.New()

class itkHistogramThresholdCalculatorHFUC(itk.ITKCommonBasePython.itkProcessObject):
    r"""Proxy of C++ itkHistogramThresholdCalculatorHFUC 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")
    __repr__ = _swig_repr

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkHistogramThresholdCalculatorHFUC_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkHistogramThresholdCalculatorHFUC_Pointer"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC_Clone(self)

    def SetInput(self, input):
        r"""
        SetInput(self, input)

        Parameters
        ----------
        input: itkHistogramF const *

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC_SetInput(self, input)

    def GetInput(self):
        r"""GetInput(self) -> itkHistogramF"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC_GetInput(self)

    def GetOutput(self):
        r"""GetOutput(self) -> itkSimpleDataObjectDecoratorUC"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC_GetOutput(self)

    def GetThreshold(self):
        r"""GetThreshold(self) -> unsigned char const &"""
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC_GetThreshold(self)
    __swig_destroy__ = _itkHistogramThresholdCalculatorPython.delete_itkHistogramThresholdCalculatorHFUC

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

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

        """
        return _itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC_cast(obj)

    def New(*args, **kargs):
        """New() -> itkHistogramThresholdCalculatorHFUC

        Create a new object of the class itkHistogramThresholdCalculatorHFUC and set the input and the parameters if some
        named or non-named arguments are passed to that method.

        New() tries to assign all the non named parameters to the input of the new objects - the
        first non named parameter in the first input, etc.

        The named parameters are used by calling the method with the same name prefixed by 'Set'.

        Ex:

          itkHistogramThresholdCalculatorHFUC.New(reader, threshold=10)

        is (most of the time) equivalent to:

          obj = itkHistogramThresholdCalculatorHFUC.New()
          obj.SetInput(0, reader.GetOutput())
          obj.SetThreshold(10)
        """
        obj = itkHistogramThresholdCalculatorHFUC.__New_orig__()
        from itk.support import template_class
        template_class.New(obj, *args, **kargs)
        return obj
    New = staticmethod(New)


# Register itkHistogramThresholdCalculatorHFUC in _itkHistogramThresholdCalculatorPython:
_itkHistogramThresholdCalculatorPython.itkHistogramThresholdCalculatorHFUC_swigregister(itkHistogramThresholdCalculatorHFUC)

from itk.support import helpers
import itk.support.types as itkt
from typing import Sequence, Tuple, Union

@helpers.accept_array_like_xarray_torch
def histogram_threshold_calculator(*args, **kwargs):
    """Functional interface for HistogramThresholdCalculator"""
    import itk

    kwarg_typehints = {  }
    specified_kwarg_typehints = { k:v for (k,v) in kwarg_typehints.items() if kwarg_typehints[k] is not ... }
    kwargs.update(specified_kwarg_typehints)


    instance = itk.HistogramThresholdCalculator.New(*args, **kwargs)

    return instance.__internal_call__()

def histogram_threshold_calculator_init_docstring():
    import itk
    from itk.support import template_class

    filter_class = itk.ITKThresholding.HistogramThresholdCalculator
    histogram_threshold_calculator.process_object = filter_class
    is_template = isinstance(filter_class, template_class.itkTemplate)
    if is_template:
        filter_object = filter_class.values()[0]
    else:
        filter_object = filter_class

    histogram_threshold_calculator.__doc__ = filter_object.__doc__



