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



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 _itkGDCMImageIOPython
else:
    import _itkGDCMImageIOPython

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.ITKIOImageBaseBasePython
import itk.ITKCommonBasePython
import itk.itkMatrixPython
import itk.vnl_vectorPython
import itk.vnl_matrixPython
import itk.stdcomplexPython
import itk.pyBasePython
import itk.vnl_matrix_fixedPython
import itk.itkVectorPython
import itk.itkFixedArrayPython
import itk.vnl_vector_refPython
import itk.itkCovariantVectorPython
import itk.itkPointPython

def itkGDCMImageIO_New():
    return itkGDCMImageIO.New()

class itkGDCMImageIO(itk.ITKIOImageBaseBasePython.itkImageIOBase):
    r"""Proxy of C++ itkGDCMImageIO 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__() -> itkGDCMImageIO_Pointer"""
        return _itkGDCMImageIOPython.itkGDCMImageIO___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkGDCMImageIO_Pointer"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_Clone(self)

    def GetInternalComponentType(self):
        r"""GetInternalComponentType(self) -> itkCommonEnums::IOComponent"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetInternalComponentType(self)

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

        Parameters
        ----------
        _arg: enum itkCommonEnums::IOComponent const

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_SetInternalComponentType(self, _arg)

    def GetRescaleSlope(self):
        r"""GetRescaleSlope(self) -> double"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetRescaleSlope(self)

    def GetRescaleIntercept(self):
        r"""GetRescaleIntercept(self) -> double"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetRescaleIntercept(self)

    def GetUIDPrefix(self):
        r"""GetUIDPrefix(self) -> char const *"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetUIDPrefix(self)

    def SetUIDPrefix(self, *args):
        r"""
        SetUIDPrefix(self, _arg)

        Parameters
        ----------
        _arg: char const *

        SetUIDPrefix(self, _arg)

        Parameters
        ----------
        _arg: std::string const &

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_SetUIDPrefix(self, *args)

    def GetStudyInstanceUID(self):
        r"""GetStudyInstanceUID(self) -> char const *"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetStudyInstanceUID(self)

    def GetSeriesInstanceUID(self):
        r"""GetSeriesInstanceUID(self) -> char const *"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetSeriesInstanceUID(self)

    def GetFrameOfReferenceInstanceUID(self):
        r"""GetFrameOfReferenceInstanceUID(self) -> char const *"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetFrameOfReferenceInstanceUID(self)

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_SetKeepOriginalUID(self, _arg)

    def GetKeepOriginalUID(self):
        r"""GetKeepOriginalUID(self) -> bool"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetKeepOriginalUID(self)

    def KeepOriginalUIDOn(self):
        r"""KeepOriginalUIDOn(self)"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_KeepOriginalUIDOn(self)

    def KeepOriginalUIDOff(self):
        r"""KeepOriginalUIDOff(self)"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_KeepOriginalUIDOff(self)

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_SetLoadPrivateTags(self, _arg)

    def GetLoadPrivateTags(self):
        r"""GetLoadPrivateTags(self) -> bool"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetLoadPrivateTags(self)

    def LoadPrivateTagsOn(self):
        r"""LoadPrivateTagsOn(self)"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_LoadPrivateTagsOn(self)

    def LoadPrivateTagsOff(self):
        r"""LoadPrivateTagsOff(self)"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_LoadPrivateTagsOff(self)

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_SetReadYBRtoRGB(self, _arg)

    def GetReadYBRtoRGB(self):
        r"""GetReadYBRtoRGB(self) -> bool"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetReadYBRtoRGB(self)

    def ReadYBRtoRGBOn(self):
        r"""ReadYBRtoRGBOn(self)"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_ReadYBRtoRGBOn(self)

    def ReadYBRtoRGBOff(self):
        r"""ReadYBRtoRGBOff(self)"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_ReadYBRtoRGBOff(self)

    def GetValueFromTag(self, tag, value):
        r"""
        GetValueFromTag(self, tag, value) -> bool

        Parameters
        ----------
        tag: std::string const &
        value: std::string &

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetValueFromTag(self, tag, value)

    @staticmethod
    def GetLabelFromTag(tag, labelId):
        r"""
        GetLabelFromTag(tag, labelId) -> bool

        Parameters
        ----------
        tag: std::string const &
        labelId: std::string &

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetLabelFromTag(tag, labelId)

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

        Parameters
        ----------
        _arg: enum itkGDCMImageIOEnums::Compression const

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_SetCompressionType(self, _arg)

    def GetCompressionType(self):
        r"""GetCompressionType(self) -> itkGDCMImageIOEnums::Compression"""
        return _itkGDCMImageIOPython.itkGDCMImageIO_GetCompressionType(self)

    def InternalSetCompressor(self, _compressor):
        r"""
        InternalSetCompressor(self, _compressor)

        Parameters
        ----------
        _compressor: std::string const &

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_InternalSetCompressor(self, _compressor)
    __swig_destroy__ = _itkGDCMImageIOPython.delete_itkGDCMImageIO

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMImageIO_cast(obj)

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

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

          itkGDCMImageIO.New(reader, threshold=10)

        is (most of the time) equivalent to:

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


# Register itkGDCMImageIO in _itkGDCMImageIOPython:
_itkGDCMImageIOPython.itkGDCMImageIO_swigregister(itkGDCMImageIO)
class itkGDCMImageIOEnums(object):
    r"""Proxy of C++ itkGDCMImageIOEnums class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Compression_JPEG = _itkGDCMImageIOPython.itkGDCMImageIOEnums_Compression_JPEG
    
    Compression_JPEG2000 = _itkGDCMImageIOPython.itkGDCMImageIOEnums_Compression_JPEG2000
    
    Compression_JPEGLS = _itkGDCMImageIOPython.itkGDCMImageIOEnums_Compression_JPEGLS
    
    Compression_RLE = _itkGDCMImageIOPython.itkGDCMImageIOEnums_Compression_RLE
    

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

        Parameters
        ----------
        arg0: itkGDCMImageIOEnums const &

        """
        _itkGDCMImageIOPython.itkGDCMImageIOEnums_swiginit(self, _itkGDCMImageIOPython.new_itkGDCMImageIOEnums(*args))
    __swig_destroy__ = _itkGDCMImageIOPython.delete_itkGDCMImageIOEnums

# Register itkGDCMImageIOEnums in _itkGDCMImageIOPython:
_itkGDCMImageIOPython.itkGDCMImageIOEnums_swigregister(itkGDCMImageIOEnums)

def itkGDCMImageIOFactory_New():
    return itkGDCMImageIOFactory.New()

class itkGDCMImageIOFactory(itk.ITKCommonBasePython.itkObjectFactoryBase):
    r"""Proxy of C++ itkGDCMImageIOFactory 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__() -> itkGDCMImageIOFactory_Pointer"""
        return _itkGDCMImageIOPython.itkGDCMImageIOFactory___New_orig__()

    @staticmethod
    def RegisterOneFactory():
        r"""RegisterOneFactory()"""
        return _itkGDCMImageIOPython.itkGDCMImageIOFactory_RegisterOneFactory()
    __swig_destroy__ = _itkGDCMImageIOPython.delete_itkGDCMImageIOFactory

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMImageIOFactory_cast(obj)

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

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

          itkGDCMImageIOFactory.New(reader, threshold=10)

        is (most of the time) equivalent to:

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


# Register itkGDCMImageIOFactory in _itkGDCMImageIOPython:
_itkGDCMImageIOPython.itkGDCMImageIOFactory_swigregister(itkGDCMImageIOFactory)

def itkGDCMSeriesFileNames_New():
    return itkGDCMSeriesFileNames.New()

class itkGDCMSeriesFileNames(itk.ITKCommonBasePython.itkProcessObject):
    r"""Proxy of C++ itkGDCMSeriesFileNames 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__() -> itkGDCMSeriesFileNames_Pointer"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames___New_orig__()

    def Clone(self):
        r"""Clone(self) -> itkGDCMSeriesFileNames_Pointer"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_Clone(self)

    def SetInputDirectory(self, *args):
        r"""
        SetInputDirectory(self, name)

        Parameters
        ----------
        name: char const *

        SetInputDirectory(self, name)

        Parameters
        ----------
        name: std::string const &

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_SetInputDirectory(self, *args)

    def SetDirectory(self, name):
        r"""
        SetDirectory(self, name)

        Parameters
        ----------
        name: std::string const &

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_SetDirectory(self, name)

    def GetInputFileNames(self):
        r"""GetInputFileNames(self) -> vectorstring"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetInputFileNames(self)

    def SetOutputDirectory(self, name):
        r"""
        SetOutputDirectory(self, name)

        Parameters
        ----------
        name: std::string const &

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_SetOutputDirectory(self, name)

    def GetOutputFileNames(self):
        r"""GetOutputFileNames(self) -> vectorstring"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetOutputFileNames(self)

    def GetFileNames(self, serie):
        r"""
        GetFileNames(self, serie) -> vectorstring

        Parameters
        ----------
        serie: std::string const

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetFileNames(self, serie)

    def GetSeriesUIDs(self):
        r"""GetSeriesUIDs(self) -> vectorstring"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetSeriesUIDs(self)

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_SetRecursive(self, _arg)

    def GetRecursive(self):
        r"""GetRecursive(self) -> bool"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetRecursive(self)

    def RecursiveOn(self):
        r"""RecursiveOn(self)"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_RecursiveOn(self)

    def RecursiveOff(self):
        r"""RecursiveOff(self)"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_RecursiveOff(self)

    def SetUseSeriesDetails(self, useSeriesDetails):
        r"""
        SetUseSeriesDetails(self, useSeriesDetails)

        Parameters
        ----------
        useSeriesDetails: bool

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_SetUseSeriesDetails(self, useSeriesDetails)

    def GetUseSeriesDetails(self):
        r"""GetUseSeriesDetails(self) -> bool"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetUseSeriesDetails(self)

    def AddSeriesRestriction(self, tag):
        r"""
        AddSeriesRestriction(self, tag)

        Parameters
        ----------
        tag: std::string const &

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_AddSeriesRestriction(self, tag)

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_SetLoadSequences(self, _arg)

    def GetLoadSequences(self):
        r"""GetLoadSequences(self) -> bool"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetLoadSequences(self)

    def LoadSequencesOn(self):
        r"""LoadSequencesOn(self)"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_LoadSequencesOn(self)

    def LoadSequencesOff(self):
        r"""LoadSequencesOff(self)"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_LoadSequencesOff(self)

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_SetLoadPrivateTags(self, _arg)

    def GetLoadPrivateTags(self):
        r"""GetLoadPrivateTags(self) -> bool"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_GetLoadPrivateTags(self)

    def LoadPrivateTagsOn(self):
        r"""LoadPrivateTagsOn(self)"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_LoadPrivateTagsOn(self)

    def LoadPrivateTagsOff(self):
        r"""LoadPrivateTagsOff(self)"""
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_LoadPrivateTagsOff(self)
    __swig_destroy__ = _itkGDCMImageIOPython.delete_itkGDCMSeriesFileNames

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

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

        """
        return _itkGDCMImageIOPython.itkGDCMSeriesFileNames_cast(obj)

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

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

          itkGDCMSeriesFileNames.New(reader, threshold=10)

        is (most of the time) equivalent to:

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


# Register itkGDCMSeriesFileNames in _itkGDCMImageIOPython:
_itkGDCMImageIOPython.itkGDCMSeriesFileNames_swigregister(itkGDCMSeriesFileNames)

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

@helpers.accept_array_like_xarray_torch
def gdcm_series_file_names(*args,  input_directory: str=..., directory: str=..., output_directory: str=..., recursive: bool=..., use_series_details: bool=..., load_sequences: bool=..., load_private_tags: bool=...,**kwargs):
    """Functional interface for GDCMSeriesFileNames"""
    import itk

    kwarg_typehints = { 'input_directory':input_directory,'directory':directory,'output_directory':output_directory,'recursive':recursive,'use_series_details':use_series_details,'load_sequences':load_sequences,'load_private_tags':load_private_tags }
    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.GDCMSeriesFileNames.New(*args, **kwargs)

    return instance.__internal_call__()

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

    filter_class = itk.ITKIOGDCM.GDCMSeriesFileNames
    gdcm_series_file_names.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

    gdcm_series_file_names.__doc__ = filter_object.__doc__



