# 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 _ITKPathPython



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

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.itkVectorContainerPython
import itk.itkVectorPython
import itk.vnl_vectorPython
import itk.stdcomplexPython
import itk.pyBasePython
import itk.vnl_matrixPython
import itk.vnl_vector_refPython
import itk.itkFixedArrayPython
import itk.itkOffsetPython
import itk.itkSizePython
import itk.itkContinuousIndexPython
import itk.itkIndexPython
import itk.itkPointPython
import itk.ITKCommonBasePython
import itk.itkMatrixPython
import itk.itkCovariantVectorPython
import itk.vnl_matrix_fixedPython
import itk.itkArrayPython
import itk.itkParametricPathPython
import itk.itkPathBasePython

def itkPolyLineParametricPath2_New():
    return itkPolyLineParametricPath2.New()

class itkPolyLineParametricPath2(itk.itkParametricPathPython.itkParametricPath2):
    r"""Proxy of C++ itkPolyLineParametricPath2 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

    def AddVertex(self, vertex):
        r"""
        AddVertex(self, vertex)

        Parameters
        ----------
        vertex: itkContinuousIndexD2 const &

        """
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath2_AddVertex(self, vertex)

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkPolyLineParametricPath2_Pointer"""
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath2___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkPolyLineParametricPath2_Pointer"""
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath2_Clone(self)

    def GetModifiableVertexList(self):
        r"""GetModifiableVertexList(self) -> itkVectorContainerUICID2"""
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath2_GetModifiableVertexList(self)

    def GetVertexList(self, *args):
        r"""
        GetVertexList(self) -> itkVectorContainerUICID2
        GetVertexList(self) -> itkVectorContainerUICID2
        """
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath2_GetVertexList(self, *args)
    __swig_destroy__ = _itkPolyLineParametricPathPython.delete_itkPolyLineParametricPath2

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

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

        """
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath2_cast(obj)

    def keys(self):
        """
        Return keys related to the polyline's metadata.
        These keys are used in the dictionary resulting from dict(polyline).
        """
        result = ['name', 'vertexList']
        return result

    def __getitem__(self, key):
        """Access metadata keys, see help(pointset.keys), for string keys."""
        import itk
        if isinstance(key, str):
            state = itk.dict_from_polyline(self)
            return state[key]

    def __setitem__(self, key, value):
        if isinstance(key, str):
            import numpy as np
            if key == 'name':
                self.SetObjectName(value)
            elif key == 'vertexList':
                self.GetVertexList().Initialize()
                for vertex in value:
                    polyline.AddVertex(vertex)

    def __getstate__(self):
        """Get object state, necessary for serialization with pickle."""
        import itk
        state = itk.dict_from_polyline(self)
        return state

    def __setstate__(self, state):
        """Set object state, necessary for serialization with pickle."""
        import itk
        deserialized = itk.polyline_from_dict(state)
        self.__dict__['this'] = deserialized


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

        Create a new object of the class itkPolyLineParametricPath2 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:

          itkPolyLineParametricPath2.New(reader, threshold=10)

        is (most of the time) equivalent to:

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


# Register itkPolyLineParametricPath2 in _itkPolyLineParametricPathPython:
_itkPolyLineParametricPathPython.itkPolyLineParametricPath2_swigregister(itkPolyLineParametricPath2)

def itkPolyLineParametricPath3_New():
    return itkPolyLineParametricPath3.New()

class itkPolyLineParametricPath3(itk.itkParametricPathPython.itkParametricPath3):
    r"""Proxy of C++ itkPolyLineParametricPath3 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

    def AddVertex(self, vertex):
        r"""
        AddVertex(self, vertex)

        Parameters
        ----------
        vertex: itkContinuousIndexD3 const &

        """
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath3_AddVertex(self, vertex)

    @staticmethod
    def __New_orig__():
        r"""__New_orig__() -> itkPolyLineParametricPath3_Pointer"""
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath3___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkPolyLineParametricPath3_Pointer"""
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath3_Clone(self)

    def GetModifiableVertexList(self):
        r"""GetModifiableVertexList(self) -> itkVectorContainerUICID3"""
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath3_GetModifiableVertexList(self)

    def GetVertexList(self, *args):
        r"""
        GetVertexList(self) -> itkVectorContainerUICID3
        GetVertexList(self) -> itkVectorContainerUICID3
        """
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath3_GetVertexList(self, *args)
    __swig_destroy__ = _itkPolyLineParametricPathPython.delete_itkPolyLineParametricPath3

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

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

        """
        return _itkPolyLineParametricPathPython.itkPolyLineParametricPath3_cast(obj)

    def keys(self):
        """
        Return keys related to the polyline's metadata.
        These keys are used in the dictionary resulting from dict(polyline).
        """
        result = ['name', 'vertexList']
        return result

    def __getitem__(self, key):
        """Access metadata keys, see help(pointset.keys), for string keys."""
        import itk
        if isinstance(key, str):
            state = itk.dict_from_polyline(self)
            return state[key]

    def __setitem__(self, key, value):
        if isinstance(key, str):
            import numpy as np
            if key == 'name':
                self.SetObjectName(value)
            elif key == 'vertexList':
                self.GetVertexList().Initialize()
                for vertex in value:
                    polyline.AddVertex(vertex)

    def __getstate__(self):
        """Get object state, necessary for serialization with pickle."""
        import itk
        state = itk.dict_from_polyline(self)
        return state

    def __setstate__(self, state):
        """Set object state, necessary for serialization with pickle."""
        import itk
        deserialized = itk.polyline_from_dict(state)
        self.__dict__['this'] = deserialized


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

        Create a new object of the class itkPolyLineParametricPath3 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:

          itkPolyLineParametricPath3.New(reader, threshold=10)

        is (most of the time) equivalent to:

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


# Register itkPolyLineParametricPath3 in _itkPolyLineParametricPathPython:
_itkPolyLineParametricPathPython.itkPolyLineParametricPath3_swigregister(itkPolyLineParametricPath3)

