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

# This wrapper is part of IMP,
# Copyright 2007-2021 IMP Inventors. All rights reserved.

from __future__ import print_function, division, absolute_import
from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

import _IMP_em2d

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 == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, 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__)


import weakref

class IMP_EM2D_SwigPyIterator(object):
    r"""Proxy of C++ swig::IMP_EM2D_SwigPyIterator 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
    __swig_destroy__ = _IMP_em2d.delete_IMP_EM2D_SwigPyIterator

    def value(self):
        r"""value(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_value(self)

    def incr(self, n=1):
        r"""incr(IMP_EM2D_SwigPyIterator self, size_t n=1) -> IMP_EM2D_SwigPyIterator"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        r"""decr(IMP_EM2D_SwigPyIterator self, size_t n=1) -> IMP_EM2D_SwigPyIterator"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_decr(self, n)

    def distance(self, x):
        r"""distance(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> ptrdiff_t"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_distance(self, x)

    def equal(self, x):
        r"""equal(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> bool"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_equal(self, x)

    def copy(self):
        r"""copy(IMP_EM2D_SwigPyIterator self) -> IMP_EM2D_SwigPyIterator"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_copy(self)

    def next(self):
        r"""next(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_next(self)

    def __next__(self):
        r"""__next__(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator___next__(self)

    def previous(self):
        r"""previous(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_previous(self)

    def advance(self, n):
        r"""advance(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        r"""__eq__(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> bool"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        r"""__ne__(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> bool"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        r"""__iadd__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        r"""__isub__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        r"""__add__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
        return _IMP_em2d.IMP_EM2D_SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        r"""
        __sub__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator
        __sub__(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> ptrdiff_t
        """
        return _IMP_em2d.IMP_EM2D_SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register IMP_EM2D_SwigPyIterator in _IMP_em2d:
_IMP_em2d.IMP_EM2D_SwigPyIterator_swigregister(IMP_EM2D_SwigPyIterator)


_value_types=[]
_object_types=[]
_raii_types=[]
_plural_types=[]

IMP_DEBUG = _IMP_em2d.IMP_DEBUG

IMP_RELEASE = _IMP_em2d.IMP_RELEASE

IMP_SILENT = _IMP_em2d.IMP_SILENT

IMP_PROGRESS = _IMP_em2d.IMP_PROGRESS

IMP_TERSE = _IMP_em2d.IMP_TERSE

IMP_VERBOSE = _IMP_em2d.IMP_VERBOSE

IMP_MEMORY = _IMP_em2d.IMP_MEMORY

IMP_NONE = _IMP_em2d.IMP_NONE

IMP_USAGE = _IMP_em2d.IMP_USAGE

IMP_INTERNAL = _IMP_em2d.IMP_INTERNAL

IMP_KERNEL_HAS_LOG4CXX = _IMP_em2d.IMP_KERNEL_HAS_LOG4CXX

IMP_COMPILER_HAS_AUTO = _IMP_em2d.IMP_COMPILER_HAS_AUTO

IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_em2d.IMP_COMPILER_HAS_DEBUG_VECTOR

IMP_COMPILER_HAS_UNIQUE_PTR = _IMP_em2d.IMP_COMPILER_HAS_UNIQUE_PTR

IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_em2d.IMP_KERNEL_HAS_BOOST_RANDOM

IMP_KERNEL_HAS_NUMPY = _IMP_em2d.IMP_KERNEL_HAS_NUMPY

IMP_KERNEL_HAS_GPERFTOOLS = _IMP_em2d.IMP_KERNEL_HAS_GPERFTOOLS

IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_em2d.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER

IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_em2d.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER

IMPKERNEL_SHOW_WARNINGS = _IMP_em2d.IMPKERNEL_SHOW_WARNINGS


import sys
class _DirectorObjects(object):
    """@internal Simple class to keep references to director objects
       to prevent premature deletion."""
    def __init__(self):
        self._objects = []
    def register(self, obj):
        """Take a reference to a director object; will only work for
           refcounted C++ classes"""
        if hasattr(obj, 'get_ref_count'):
            self._objects.append(obj)
    def cleanup(self):
        """Only drop our reference and allow cleanup by Python if no other
           Python references exist (we hold 3 references: one in self._objects,
           one in x, and one in the argument list for getrefcount) *and* no
           other C++ references exist (the Python object always holds one)"""
        objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
                                         or x.get_ref_count() > 1]
# Do in two steps so the references are kept until the end of the
# function (deleting references may trigger a fresh call to this method)
        self._objects = objs
    def get_object_count(self):
        """Get number of director objects (useful for testing only)"""
        return len(self._objects)
_director_objects = _DirectorObjects()

class _ostream(object):
    r"""Proxy of C++ std::ostream 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 write(self, osa_buf):
        r"""write(_ostream self, char const * osa_buf)"""
        return _IMP_em2d._ostream_write(self, osa_buf)

# Register _ostream in _IMP_em2d:
_IMP_em2d._ostream_swigregister(_ostream)

IMP_COMPILER_HAS_OVERRIDE = _IMP_em2d.IMP_COMPILER_HAS_OVERRIDE

IMP_COMPILER_HAS_FINAL = _IMP_em2d.IMP_COMPILER_HAS_FINAL

IMP_HAS_NOEXCEPT = _IMP_em2d.IMP_HAS_NOEXCEPT

IMP_C_OPEN_BINARY = _IMP_em2d.IMP_C_OPEN_BINARY

import IMP
IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_CGAL_HAS_BOOST_FILESYSTEM

IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS

IMP_CGAL_HAS_BOOST_RANDOM = _IMP_em2d.IMP_CGAL_HAS_BOOST_RANDOM

IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_CGAL_HAS_BOOST_SYSTEM

IMP_CGAL_HAS_NUMPY = _IMP_em2d.IMP_CGAL_HAS_NUMPY

IMPCGAL_SHOW_WARNINGS = _IMP_em2d.IMPCGAL_SHOW_WARNINGS

import IMP.cgal
IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_em2d.IMP_ALGEBRA_HAS_IMP_CGAL

IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM

IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS

IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_RANDOM

IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_SYSTEM

IMP_ALGEBRA_HAS_CGAL = _IMP_em2d.IMP_ALGEBRA_HAS_CGAL

IMP_ALGEBRA_HAS_NUMPY = _IMP_em2d.IMP_ALGEBRA_HAS_NUMPY

IMP_ALGEBRA_HAS_ANN = _IMP_em2d.IMP_ALGEBRA_HAS_ANN

IMPALGEBRA_SHOW_WARNINGS = _IMP_em2d.IMPALGEBRA_SHOW_WARNINGS

import IMP.algebra
IMP_DISPLAY_HAS_IMP_CGAL = _IMP_em2d.IMP_DISPLAY_HAS_IMP_CGAL

IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_FILESYSTEM

IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS

IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_RANDOM

IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_SYSTEM

IMP_DISPLAY_HAS_CGAL = _IMP_em2d.IMP_DISPLAY_HAS_CGAL

IMP_DISPLAY_HAS_NUMPY = _IMP_em2d.IMP_DISPLAY_HAS_NUMPY

IMPDISPLAY_SHOW_WARNINGS = _IMP_em2d.IMPDISPLAY_SHOW_WARNINGS

import IMP.display
IMP_GSL_HAS_IMP_CGAL = _IMP_em2d.IMP_GSL_HAS_IMP_CGAL

IMP_GSL_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_GSL_HAS_BOOST_FILESYSTEM

IMP_GSL_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_GSL_HAS_BOOST_PROGRAMOPTIONS

IMP_GSL_HAS_BOOST_RANDOM = _IMP_em2d.IMP_GSL_HAS_BOOST_RANDOM

IMP_GSL_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_GSL_HAS_BOOST_SYSTEM

IMP_GSL_HAS_CGAL = _IMP_em2d.IMP_GSL_HAS_CGAL

IMP_GSL_HAS_NUMPY = _IMP_em2d.IMP_GSL_HAS_NUMPY

IMPGSL_SHOW_WARNINGS = _IMP_em2d.IMPGSL_SHOW_WARNINGS

import IMP.gsl
IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL

IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM

IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS

IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM

IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM

IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_CGAL

IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_HDF5

IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_NUMPY

IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_em2d.IMPSCOREFUNCTOR_SHOW_WARNINGS

import IMP.score_functor
IMP_STATISTICS_HAS_IMP_CGAL = _IMP_em2d.IMP_STATISTICS_HAS_IMP_CGAL

IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_FILESYSTEM

IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS

IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_RANDOM

IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_SYSTEM

IMP_STATISTICS_HAS_CGAL = _IMP_em2d.IMP_STATISTICS_HAS_CGAL

IMP_STATISTICS_HAS_NUMPY = _IMP_em2d.IMP_STATISTICS_HAS_NUMPY

IMPSTATISTICS_SHOW_WARNINGS = _IMP_em2d.IMPSTATISTICS_SHOW_WARNINGS

import IMP.statistics
IMP_CORE_HAS_IMP_CGAL = _IMP_em2d.IMP_CORE_HAS_IMP_CGAL

IMP_CORE_HAS_IMP_KERNEL = _IMP_em2d.IMP_CORE_HAS_IMP_KERNEL

IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_CORE_HAS_BOOST_FILESYSTEM

IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS

IMP_CORE_HAS_BOOST_RANDOM = _IMP_em2d.IMP_CORE_HAS_BOOST_RANDOM

IMP_CORE_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_CORE_HAS_BOOST_SYSTEM

IMP_CORE_HAS_CGAL = _IMP_em2d.IMP_CORE_HAS_CGAL

IMP_CORE_HAS_HDF5 = _IMP_em2d.IMP_CORE_HAS_HDF5

IMP_CORE_HAS_NUMPY = _IMP_em2d.IMP_CORE_HAS_NUMPY

IMPCORE_SHOW_WARNINGS = _IMP_em2d.IMPCORE_SHOW_WARNINGS

import IMP.core
IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_em2d.IMP_CONTAINER_HAS_IMP_ALGEBRA

IMP_CONTAINER_HAS_IMP_CGAL = _IMP_em2d.IMP_CONTAINER_HAS_IMP_CGAL

IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_em2d.IMP_CONTAINER_HAS_IMP_DISPLAY

IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_em2d.IMP_CONTAINER_HAS_IMP_KERNEL

IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR

IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_FILESYSTEM

IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS

IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_RANDOM

IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_SYSTEM

IMP_CONTAINER_HAS_CGAL = _IMP_em2d.IMP_CONTAINER_HAS_CGAL

IMP_CONTAINER_HAS_HDF5 = _IMP_em2d.IMP_CONTAINER_HAS_HDF5

IMP_CONTAINER_HAS_NUMPY = _IMP_em2d.IMP_CONTAINER_HAS_NUMPY

IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_em2d.IMP_CONTAINER_HAS_PYTHON_IHM

IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_em2d.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP

IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_em2d.IMP_CONTAINER_HAS_ROBIN_MAP

IMPCONTAINER_SHOW_WARNINGS = _IMP_em2d.IMPCONTAINER_SHOW_WARNINGS

import IMP.container
IMP_ATOM_HAS_IMP_CGAL = _IMP_em2d.IMP_ATOM_HAS_IMP_CGAL

IMP_ATOM_HAS_IMP_KERNEL = _IMP_em2d.IMP_ATOM_HAS_IMP_KERNEL

IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR

IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS

IMP_ATOM_HAS_BOOST_RANDOM = _IMP_em2d.IMP_ATOM_HAS_BOOST_RANDOM

IMP_ATOM_HAS_BOOST_REGEX = _IMP_em2d.IMP_ATOM_HAS_BOOST_REGEX

IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_ATOM_HAS_BOOST_SYSTEM

IMP_ATOM_HAS_CGAL = _IMP_em2d.IMP_ATOM_HAS_CGAL

IMP_ATOM_HAS_HDF5 = _IMP_em2d.IMP_ATOM_HAS_HDF5

IMP_ATOM_HAS_NUMPY = _IMP_em2d.IMP_ATOM_HAS_NUMPY

IMP_ATOM_HAS_PYTHON_IHM = _IMP_em2d.IMP_ATOM_HAS_PYTHON_IHM

IMPATOM_SHOW_WARNINGS = _IMP_em2d.IMPATOM_SHOW_WARNINGS

IMP_ATOM_TYPE_INDEX = _IMP_em2d.IMP_ATOM_TYPE_INDEX

IMP_RESIDUE_TYPE_INDEX = _IMP_em2d.IMP_RESIDUE_TYPE_INDEX

IMP_HIERARCHY_TYPE_INDEX = _IMP_em2d.IMP_HIERARCHY_TYPE_INDEX

IMP_CHAIN_TYPE_INDEX = _IMP_em2d.IMP_CHAIN_TYPE_INDEX

import IMP.atom
IMP_EM_HAS_IMP_CGAL = _IMP_em2d.IMP_EM_HAS_IMP_CGAL

IMP_EM_HAS_IMP_CONTAINER = _IMP_em2d.IMP_EM_HAS_IMP_CONTAINER

IMP_EM_HAS_IMP_DISPLAY = _IMP_em2d.IMP_EM_HAS_IMP_DISPLAY

IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_EM_HAS_IMP_SCORE_FUNCTOR

IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_EM_HAS_BOOST_FILESYSTEM

IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_EM_HAS_BOOST_PROGRAMOPTIONS

IMP_EM_HAS_BOOST_RANDOM = _IMP_em2d.IMP_EM_HAS_BOOST_RANDOM

IMP_EM_HAS_BOOST_REGEX = _IMP_em2d.IMP_EM_HAS_BOOST_REGEX

IMP_EM_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_EM_HAS_BOOST_SYSTEM

IMP_EM_HAS_CGAL = _IMP_em2d.IMP_EM_HAS_CGAL

IMP_EM_HAS_HDF5 = _IMP_em2d.IMP_EM_HAS_HDF5

IMP_EM_HAS_NUMPY = _IMP_em2d.IMP_EM_HAS_NUMPY

IMP_EM_HAS_PYTHON_IHM = _IMP_em2d.IMP_EM_HAS_PYTHON_IHM

IMPEM_SHOW_WARNINGS = _IMP_em2d.IMPEM_SHOW_WARNINGS

import IMP.em
IMP_SAXS_HAS_IMP_CGAL = _IMP_em2d.IMP_SAXS_HAS_IMP_CGAL

IMP_SAXS_HAS_IMP_CONTAINER = _IMP_em2d.IMP_SAXS_HAS_IMP_CONTAINER

IMP_SAXS_HAS_IMP_DISPLAY = _IMP_em2d.IMP_SAXS_HAS_IMP_DISPLAY

IMP_SAXS_HAS_IMP_KERNEL = _IMP_em2d.IMP_SAXS_HAS_IMP_KERNEL

IMP_SAXS_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_SAXS_HAS_IMP_SCORE_FUNCTOR

IMP_SAXS_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_SAXS_HAS_BOOST_FILESYSTEM

IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS

IMP_SAXS_HAS_BOOST_RANDOM = _IMP_em2d.IMP_SAXS_HAS_BOOST_RANDOM

IMP_SAXS_HAS_BOOST_REGEX = _IMP_em2d.IMP_SAXS_HAS_BOOST_REGEX

IMP_SAXS_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_SAXS_HAS_BOOST_SYSTEM

IMP_SAXS_HAS_CGAL = _IMP_em2d.IMP_SAXS_HAS_CGAL

IMP_SAXS_HAS_HDF5 = _IMP_em2d.IMP_SAXS_HAS_HDF5

IMP_SAXS_HAS_NUMPY = _IMP_em2d.IMP_SAXS_HAS_NUMPY

IMP_SAXS_HAS_PYTHON_IHM = _IMP_em2d.IMP_SAXS_HAS_PYTHON_IHM

IMPSAXS_SHOW_WARNINGS = _IMP_em2d.IMPSAXS_SHOW_WARNINGS

import IMP.saxs
IMP_ISD_HAS_IMP_CGAL = _IMP_em2d.IMP_ISD_HAS_IMP_CGAL

IMP_ISD_HAS_IMP_DISPLAY = _IMP_em2d.IMP_ISD_HAS_IMP_DISPLAY

IMP_ISD_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_ISD_HAS_IMP_SCORE_FUNCTOR

IMP_ISD_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_ISD_HAS_BOOST_FILESYSTEM

IMP_ISD_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_ISD_HAS_BOOST_PROGRAMOPTIONS

IMP_ISD_HAS_BOOST_RANDOM = _IMP_em2d.IMP_ISD_HAS_BOOST_RANDOM

IMP_ISD_HAS_BOOST_REGEX = _IMP_em2d.IMP_ISD_HAS_BOOST_REGEX

IMP_ISD_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_ISD_HAS_BOOST_SYSTEM

IMP_ISD_HAS_CGAL = _IMP_em2d.IMP_ISD_HAS_CGAL

IMP_ISD_HAS_HDF5 = _IMP_em2d.IMP_ISD_HAS_HDF5

IMP_ISD_HAS_NUMPY = _IMP_em2d.IMP_ISD_HAS_NUMPY

IMP_ISD_HAS_PYTHON_IHM = _IMP_em2d.IMP_ISD_HAS_PYTHON_IHM

IMPISD_SHOW_WARNINGS = _IMP_em2d.IMPISD_SHOW_WARNINGS

import IMP.isd
IMP_RMF_HAS_IMP_CGAL = _IMP_em2d.IMP_RMF_HAS_IMP_CGAL

IMP_RMF_HAS_IMP_EM = _IMP_em2d.IMP_RMF_HAS_IMP_EM

IMP_RMF_HAS_IMP_SAXS = _IMP_em2d.IMP_RMF_HAS_IMP_SAXS

IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_RMF_HAS_IMP_SCORE_FUNCTOR

IMP_RMF_HAS_IMP_STATISTICS = _IMP_em2d.IMP_RMF_HAS_IMP_STATISTICS

IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_RMF_HAS_BOOST_FILESYSTEM

IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS

IMP_RMF_HAS_BOOST_RANDOM = _IMP_em2d.IMP_RMF_HAS_BOOST_RANDOM

IMP_RMF_HAS_BOOST_REGEX = _IMP_em2d.IMP_RMF_HAS_BOOST_REGEX

IMP_RMF_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_RMF_HAS_BOOST_SYSTEM

IMP_RMF_HAS_CGAL = _IMP_em2d.IMP_RMF_HAS_CGAL

IMP_RMF_HAS_HDF5 = _IMP_em2d.IMP_RMF_HAS_HDF5

IMP_RMF_HAS_NUMPY = _IMP_em2d.IMP_RMF_HAS_NUMPY

IMP_RMF_HAS_PYTHON_IHM = _IMP_em2d.IMP_RMF_HAS_PYTHON_IHM

IMPRMF_SHOW_WARNINGS = _IMP_em2d.IMPRMF_SHOW_WARNINGS

import IMP.rmf
import RMF
IMP_DOMINO_HAS_IMP_ATOM = _IMP_em2d.IMP_DOMINO_HAS_IMP_ATOM

IMP_DOMINO_HAS_IMP_CGAL = _IMP_em2d.IMP_DOMINO_HAS_IMP_CGAL

IMP_DOMINO_HAS_IMP_EM = _IMP_em2d.IMP_DOMINO_HAS_IMP_EM

IMP_DOMINO_HAS_IMP_ISD = _IMP_em2d.IMP_DOMINO_HAS_IMP_ISD

IMP_DOMINO_HAS_IMP_KERNEL = _IMP_em2d.IMP_DOMINO_HAS_IMP_KERNEL

IMP_DOMINO_HAS_IMP_RMF = _IMP_em2d.IMP_DOMINO_HAS_IMP_RMF

IMP_DOMINO_HAS_IMP_SAXS = _IMP_em2d.IMP_DOMINO_HAS_IMP_SAXS

IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR

IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_DOMINO_HAS_BOOST_FILESYSTEM

IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS

IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_em2d.IMP_DOMINO_HAS_BOOST_RANDOM

IMP_DOMINO_HAS_BOOST_REGEX = _IMP_em2d.IMP_DOMINO_HAS_BOOST_REGEX

IMP_DOMINO_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_DOMINO_HAS_BOOST_SYSTEM

IMP_DOMINO_HAS_CGAL = _IMP_em2d.IMP_DOMINO_HAS_CGAL

IMP_DOMINO_HAS_HDF5 = _IMP_em2d.IMP_DOMINO_HAS_HDF5

IMP_DOMINO_HAS_NUMPY = _IMP_em2d.IMP_DOMINO_HAS_NUMPY

IMP_DOMINO_HAS_RMF = _IMP_em2d.IMP_DOMINO_HAS_RMF

IMP_DOMINO_HAS_PYTHON_IHM = _IMP_em2d.IMP_DOMINO_HAS_PYTHON_IHM

IMPDOMINO_SHOW_WARNINGS = _IMP_em2d.IMPDOMINO_SHOW_WARNINGS

import RMF_HDF5
import IMP.domino
IMP_EM2D_HAS_IMP_CGAL = _IMP_em2d.IMP_EM2D_HAS_IMP_CGAL

IMP_EM2D_HAS_IMP_ISD = _IMP_em2d.IMP_EM2D_HAS_IMP_ISD

IMP_EM2D_HAS_IMP_KERNEL = _IMP_em2d.IMP_EM2D_HAS_IMP_KERNEL

IMP_EM2D_HAS_IMP_RMF = _IMP_em2d.IMP_EM2D_HAS_IMP_RMF

IMP_EM2D_HAS_IMP_SAXS = _IMP_em2d.IMP_EM2D_HAS_IMP_SAXS

IMP_EM2D_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_EM2D_HAS_IMP_SCORE_FUNCTOR

IMP_EM2D_HAS_IMP_STATISTICS = _IMP_em2d.IMP_EM2D_HAS_IMP_STATISTICS

IMP_EM2D_HAS_BOOST_GRAPH = _IMP_em2d.IMP_EM2D_HAS_BOOST_GRAPH

IMP_EM2D_HAS_BOOST_RANDOM = _IMP_em2d.IMP_EM2D_HAS_BOOST_RANDOM

IMP_EM2D_HAS_BOOST_REGEX = _IMP_em2d.IMP_EM2D_HAS_BOOST_REGEX

IMP_EM2D_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_EM2D_HAS_BOOST_SYSTEM

IMP_EM2D_HAS_CGAL = _IMP_em2d.IMP_EM2D_HAS_CGAL

IMP_EM2D_HAS_GSL = _IMP_em2d.IMP_EM2D_HAS_GSL

IMP_EM2D_HAS_HDF5 = _IMP_em2d.IMP_EM2D_HAS_HDF5

IMP_EM2D_HAS_NUMPY = _IMP_em2d.IMP_EM2D_HAS_NUMPY

IMP_EM2D_HAS_OPENCV3 = _IMP_em2d.IMP_EM2D_HAS_OPENCV3

IMP_EM2D_HAS_RMF = _IMP_em2d.IMP_EM2D_HAS_RMF

IMP_EM2D_HAS_PYTHON_IHM = _IMP_em2d.IMP_EM2D_HAS_PYTHON_IHM

IMP_EM2D_HAS_OPENCV21 = _IMP_em2d.IMP_EM2D_HAS_OPENCV21

IMP_EM2D_HAS_OPENCV22 = _IMP_em2d.IMP_EM2D_HAS_OPENCV22

IMPEM2D_SHOW_WARNINGS = _IMP_em2d.IMPEM2D_SHOW_WARNINGS


PolarResamplingParametersList=list
_plural_types.append("PolarResamplingParametersList")
_value_types.append("PolarResamplingParameters")


ProjectionMasks=list
_plural_types.append("ProjectionMasks")
_value_types.append("ProjectionMask")


MasksManagers=list
_plural_types.append("MasksManagers")
_value_types.append("MasksManager")


RegistrationResults=list
_plural_types.append("RegistrationResults")
_value_types.append("RegistrationResult")


ClusterSets=list
_plural_types.append("ClusterSets")
_value_types.append("ClusterSet")


SingleLinkages=list
_plural_types.append("SingleLinkages")
_value_types.append("SingleLinkage")


CompleteLinkages=list
_plural_types.append("CompleteLinkages")
_value_types.append("CompleteLinkage")


AverageDistanceLinkages=list
_plural_types.append("AverageDistanceLinkages")
_value_types.append("AverageDistanceLinkage")


SegmentationParametersList=list
_plural_types.append("SegmentationParametersList")
_value_types.append("SegmentationParameters")


MatchTemplateResults=list
_plural_types.append("MatchTemplateResults")
_value_types.append("MatchTemplateResult")


ProjectingParametersList=list
_plural_types.append("ProjectingParametersList")
_value_types.append("ProjectingParameters")


ProjectingOptionsList=list
_plural_types.append("ProjectingOptionsList")
_value_types.append("ProjectingOptions")


Em2DRestraintParametersList=list
_plural_types.append("Em2DRestraintParametersList")
_value_types.append("Em2DRestraintParameters")


_object_types.append("ProjectionFinder")


def _object_cast_to_ProjectionFinder(o):
    r"""_object_cast_to_ProjectionFinder(Object o) -> ProjectionFinder"""
    return _IMP_em2d._object_cast_to_ProjectionFinder(o)

_object_types.append("ScoreFunction")


def _object_cast_to_ScoreFunction(o):
    r"""_object_cast_to_ScoreFunction(Object o) -> ScoreFunction"""
    return _IMP_em2d._object_cast_to_ScoreFunction(o)

_object_types.append("ChiSquaredScore")


def _object_cast_to_ChiSquaredScore(o):
    r"""_object_cast_to_ChiSquaredScore(Object o) -> ChiSquaredScore"""
    return _IMP_em2d._object_cast_to_ChiSquaredScore(o)

_object_types.append("EM2DScore")


def _object_cast_to_EM2DScore(o):
    r"""_object_cast_to_EM2DScore(Object o) -> EM2DScore"""
    return _IMP_em2d._object_cast_to_EM2DScore(o)

_object_types.append("MeanAbsoluteDifference")


def _object_cast_to_MeanAbsoluteDifference(o):
    r"""_object_cast_to_MeanAbsoluteDifference(Object o) -> MeanAbsoluteDifference"""
    return _IMP_em2d._object_cast_to_MeanAbsoluteDifference(o)

_object_types.append("ProjectionParametersScoreState")


def _object_cast_to_ProjectionParametersScoreState(o):
    r"""_object_cast_to_ProjectionParametersScoreState(Object o) -> ProjectionParametersScoreState"""
    return _IMP_em2d._object_cast_to_ProjectionParametersScoreState(o)

_object_types.append("Em2DRestraint")


def _object_cast_to_Em2DRestraint(o):
    r"""_object_cast_to_Em2DRestraint(Object o) -> Em2DRestraint"""
    return _IMP_em2d._object_cast_to_Em2DRestraint(o)

_object_types.append("Image")


def _object_cast_to_Image(o):
    r"""_object_cast_to_Image(Object o) -> Image"""
    return _IMP_em2d._object_cast_to_Image(o)

_object_types.append("ImageReaderWriter")


def _object_cast_to_ImageReaderWriter(o):
    r"""_object_cast_to_ImageReaderWriter(Object o) -> ImageReaderWriter"""
    return _IMP_em2d._object_cast_to_ImageReaderWriter(o)

_object_types.append("JPGImageReaderWriter")


def _object_cast_to_JPGImageReaderWriter(o):
    r"""_object_cast_to_JPGImageReaderWriter(Object o) -> JPGImageReaderWriter"""
    return _IMP_em2d._object_cast_to_JPGImageReaderWriter(o)

_object_types.append("TIFFImageReaderWriter")


def _object_cast_to_TIFFImageReaderWriter(o):
    r"""_object_cast_to_TIFFImageReaderWriter(Object o) -> TIFFImageReaderWriter"""
    return _IMP_em2d._object_cast_to_TIFFImageReaderWriter(o)

_object_types.append("SpiderImageReaderWriter")


def _object_cast_to_SpiderImageReaderWriter(o):
    r"""_object_cast_to_SpiderImageReaderWriter(Object o) -> SpiderImageReaderWriter"""
    return _IMP_em2d._object_cast_to_SpiderImageReaderWriter(o)

_object_types.append("CollisionCrossSection")


def _object_cast_to_CollisionCrossSection(o):
    r"""_object_cast_to_CollisionCrossSection(Object o) -> CollisionCrossSection"""
    return _IMP_em2d._object_cast_to_CollisionCrossSection(o)

_object_types.append("GridStates")


def _object_cast_to_GridStates(o):
    r"""_object_cast_to_GridStates(Object o) -> GridStates"""
    return _IMP_em2d._object_cast_to_GridStates(o)

_object_types.append("ProjectionStates")


def _object_cast_to_ProjectionStates(o):
    r"""_object_cast_to_ProjectionStates(Object o) -> ProjectionStates"""
    return _IMP_em2d._object_cast_to_ProjectionStates(o)

_object_types.append("DistanceFilter")


def _object_cast_to_DistanceFilter(o):
    r"""_object_cast_to_DistanceFilter(Object o) -> DistanceFilter"""
    return _IMP_em2d._object_cast_to_DistanceFilter(o)

_object_types.append("DistanceFilterTable")


def _object_cast_to_DistanceFilterTable(o):
    r"""_object_cast_to_DistanceFilterTable(Object o) -> DistanceFilterTable"""
    return _IMP_em2d._object_cast_to_DistanceFilterTable(o)

_object_types.append("RigidBodiesImageFitRestraint")


def _object_cast_to_RigidBodiesImageFitRestraint(o):
    r"""_object_cast_to_RigidBodiesImageFitRestraint(Object o) -> RigidBodiesImageFitRestraint"""
    return _IMP_em2d._object_cast_to_RigidBodiesImageFitRestraint(o)

_object_types.append("DummyRestraint")


def _object_cast_to_DummyRestraint(o):
    r"""_object_cast_to_DummyRestraint(Object o) -> DummyRestraint"""
    return _IMP_em2d._object_cast_to_DummyRestraint(o)

_object_types.append("ParticlesDummyRestraint")


def _object_cast_to_ParticlesDummyRestraint(o):
    r"""_object_cast_to_ParticlesDummyRestraint(Object o) -> ParticlesDummyRestraint"""
    return _IMP_em2d._object_cast_to_ParticlesDummyRestraint(o)

_object_types.append("RelativePositionMover")


def _object_cast_to_RelativePositionMover(o):
    r"""_object_cast_to_RelativePositionMover(Object o) -> RelativePositionMover"""
    return _IMP_em2d._object_cast_to_RelativePositionMover(o)

_object_types.append("PCAFitRestraint")


def _object_cast_to_em2dPCAFitRestraint(o):
    r"""_object_cast_to_em2dPCAFitRestraint(Object o) -> PCAFitRestraint"""
    return _IMP_em2d._object_cast_to_em2dPCAFitRestraint(o)

def ProjectionParametersList(l=[]):
    return [ProjectionParameters(x) for x in l]
_plural_types.append("ProjectionParametersList")


_value_types.append("ProjectionParameters")


def show(*args):
    r"""show(cv::Mat const & m, _ostream out=std::cout)"""
    return _IMP_em2d.show(*args)

def write_matrix(m, name):
    r"""write_matrix(cv::Mat & m, std::string name)"""
    return _IMP_em2d.write_matrix(m, name)
class ImageReaderWriter(IMP.Object):
    r"""Proxy of C++ IMP::em2d::ImageReaderWriter 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")

    def read(self, filename, header, data):
        r"""read(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat & data)"""
        return _IMP_em2d.ImageReaderWriter_read(self, filename, header, data)

    def read_from_floats(self, filename, header, data):
        r"""read_from_floats(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat & data)"""
        return _IMP_em2d.ImageReaderWriter_read_from_floats(self, filename, header, data)

    def read_from_ints(self, filename, header, data):
        r"""read_from_ints(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat & data)"""
        return _IMP_em2d.ImageReaderWriter_read_from_ints(self, filename, header, data)

    def write(self, filename, header, data):
        r"""write(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat const & data)"""
        return _IMP_em2d.ImageReaderWriter_write(self, filename, header, data)

    def write_to_floats(self, filename, header, data):
        r"""write_to_floats(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat const & data)"""
        return _IMP_em2d.ImageReaderWriter_write_to_floats(self, filename, header, data)

    def write_to_ints(self, filename, header, data):
        r"""write_to_ints(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat const & data)"""
        return _IMP_em2d.ImageReaderWriter_write_to_ints(self, filename, header, data)

    def get_version_info(self):
        r"""get_version_info(ImageReaderWriter self) -> VersionInfo"""
        return _IMP_em2d.ImageReaderWriter_get_version_info(self)

    def __str__(self):
        r"""__str__(ImageReaderWriter self) -> std::string"""
        return _IMP_em2d.ImageReaderWriter___str__(self)

    def __repr__(self):
        r"""__repr__(ImageReaderWriter self) -> std::string"""
        return _IMP_em2d.ImageReaderWriter___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_ImageReaderWriter(o)


# Register ImageReaderWriter in _IMP_em2d:
_IMP_em2d.ImageReaderWriter_swigregister(ImageReaderWriter)

class PolarResamplingParameters(object):
    r"""Proxy of C++ IMP::em2d::PolarResamplingParameters class."""

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

    def __init__(self, *args):
        r"""
        __init__(PolarResamplingParameters self) -> PolarResamplingParameters
        __init__(PolarResamplingParameters self, unsigned int rows, unsigned int cols) -> PolarResamplingParameters
        __init__(PolarResamplingParameters self, cv::Mat const & m) -> PolarResamplingParameters
        """
        _IMP_em2d.PolarResamplingParameters_swiginit(self, _IMP_em2d.new_PolarResamplingParameters(*args))
    __swig_destroy__ = _IMP_em2d.delete_PolarResamplingParameters

    def setup(self, rows, cols):
        r"""setup(PolarResamplingParameters self, unsigned int rows, unsigned int cols)"""
        return _IMP_em2d.PolarResamplingParameters_setup(self, rows, cols)

    def get_starting_radius(self):
        r"""get_starting_radius(PolarResamplingParameters self) -> double"""
        return _IMP_em2d.PolarResamplingParameters_get_starting_radius(self)

    def get_ending_radius(self):
        r"""get_ending_radius(PolarResamplingParameters self) -> double"""
        return _IMP_em2d.PolarResamplingParameters_get_ending_radius(self)

    def get_radius(self, n_ring):
        r"""get_radius(PolarResamplingParameters self, unsigned int n_ring) -> double"""
        return _IMP_em2d.PolarResamplingParameters_get_radius(self, n_ring)

    def get_number_of_rings(self):
        r"""get_number_of_rings(PolarResamplingParameters self) -> unsigned int"""
        return _IMP_em2d.PolarResamplingParameters_get_number_of_rings(self)

    def set_estimated_number_of_angles(self, aprox_value):
        r"""set_estimated_number_of_angles(PolarResamplingParameters self, unsigned int aprox_value)"""
        return _IMP_em2d.PolarResamplingParameters_set_estimated_number_of_angles(self, aprox_value)

    def get_number_of_angles(self):
        r"""get_number_of_angles(PolarResamplingParameters self) -> unsigned int"""
        return _IMP_em2d.PolarResamplingParameters_get_number_of_angles(self)

    def get_angle_step(self):
        r"""get_angle_step(PolarResamplingParameters self) -> double"""
        return _IMP_em2d.PolarResamplingParameters_get_angle_step(self)

    def get_radius_step(self):
        r"""get_radius_step(PolarResamplingParameters self) -> double"""
        return _IMP_em2d.PolarResamplingParameters_get_radius_step(self)

    def create_maps_for_resampling(self):
        r"""create_maps_for_resampling(PolarResamplingParameters self)"""
        return _IMP_em2d.PolarResamplingParameters_create_maps_for_resampling(self)

    def get_resampling_maps(self, m1, m2):
        r"""get_resampling_maps(PolarResamplingParameters self, cv::Mat & m1, cv::Mat & m2)"""
        return _IMP_em2d.PolarResamplingParameters_get_resampling_maps(self, m1, m2)

    def get_resampling_map(self, m1):
        r"""get_resampling_map(PolarResamplingParameters self, cv::Mat & m1)"""
        return _IMP_em2d.PolarResamplingParameters_get_resampling_map(self, m1)

    def show(self, out):
        r"""show(PolarResamplingParameters self, _ostream out)"""
        return _IMP_em2d.PolarResamplingParameters_show(self, out)

    def get_is_setup(self):
        r"""get_is_setup(PolarResamplingParameters self) -> bool"""
        return _IMP_em2d.PolarResamplingParameters_get_is_setup(self)

    def __str__(self):
        r"""__str__(PolarResamplingParameters self) -> std::string"""
        return _IMP_em2d.PolarResamplingParameters___str__(self)

    def __repr__(self):
        r"""__repr__(PolarResamplingParameters self) -> std::string"""
        return _IMP_em2d.PolarResamplingParameters___repr__(self)

# Register PolarResamplingParameters in _IMP_em2d:
_IMP_em2d.PolarResamplingParameters_swigregister(PolarResamplingParameters)

class SegmentationParameters(object):
    r"""Proxy of C++ IMP::em2d::SegmentationParameters class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    image_pixel_size = property(_IMP_em2d.SegmentationParameters_image_pixel_size_get, _IMP_em2d.SegmentationParameters_image_pixel_size_set, doc=r"""image_pixel_size : double""")
    diffusion_beta = property(_IMP_em2d.SegmentationParameters_diffusion_beta_get, _IMP_em2d.SegmentationParameters_diffusion_beta_set, doc=r"""diffusion_beta : double""")
    diffusion_timesteps = property(_IMP_em2d.SegmentationParameters_diffusion_timesteps_get, _IMP_em2d.SegmentationParameters_diffusion_timesteps_set, doc=r"""diffusion_timesteps : double""")
    fill_holes_stddevs = property(_IMP_em2d.SegmentationParameters_fill_holes_stddevs_get, _IMP_em2d.SegmentationParameters_fill_holes_stddevs_set, doc=r"""fill_holes_stddevs : double""")
    opening_kernel = property(_IMP_em2d.SegmentationParameters_opening_kernel_get, _IMP_em2d.SegmentationParameters_opening_kernel_set, doc=r"""opening_kernel : cv::Mat""")
    remove_sizing_percentage = property(_IMP_em2d.SegmentationParameters_remove_sizing_percentage_get, _IMP_em2d.SegmentationParameters_remove_sizing_percentage_set, doc=r"""remove_sizing_percentage : double""")
    binary_background = property(_IMP_em2d.SegmentationParameters_binary_background_get, _IMP_em2d.SegmentationParameters_binary_background_set, doc=r"""binary_background : int""")
    binary_foreground = property(_IMP_em2d.SegmentationParameters_binary_foreground_get, _IMP_em2d.SegmentationParameters_binary_foreground_set, doc=r"""binary_foreground : int""")
    threshold = property(_IMP_em2d.SegmentationParameters_threshold_get, _IMP_em2d.SegmentationParameters_threshold_set, doc=r"""threshold : double""")

    def __init__(self, *args):
        r"""
        __init__(SegmentationParameters self) -> SegmentationParameters
        __init__(SegmentationParameters self, double apix, double diff_beta, unsigned int diff_timesteps, double fh_stddevs, cv::Mat const & kr, int background, int foreground) -> SegmentationParameters
        """
        _IMP_em2d.SegmentationParameters_swiginit(self, _IMP_em2d.new_SegmentationParameters(*args))

    def show(self, *args):
        r"""show(SegmentationParameters self, _ostream out=std::cout)"""
        return _IMP_em2d.SegmentationParameters_show(self, *args)

    def __str__(self):
        r"""__str__(SegmentationParameters self) -> std::string"""
        return _IMP_em2d.SegmentationParameters___str__(self)

    def __repr__(self):
        r"""__repr__(SegmentationParameters self) -> std::string"""
        return _IMP_em2d.SegmentationParameters___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_SegmentationParameters

# Register SegmentationParameters in _IMP_em2d:
_IMP_em2d.SegmentationParameters_swigregister(SegmentationParameters)

class MatchTemplateResult(object):
    r"""Proxy of C++ IMP::em2d::MatchTemplateResult class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    pair = property(_IMP_em2d.MatchTemplateResult_pair_get, _IMP_em2d.MatchTemplateResult_pair_set, doc=r"""pair : IMP::IntPair""")
    cross_correlation = property(_IMP_em2d.MatchTemplateResult_cross_correlation_get, _IMP_em2d.MatchTemplateResult_cross_correlation_set, doc=r"""cross_correlation : double""")

    def __init__(self, p, cc):
        r"""__init__(MatchTemplateResult self, IMP::IntPair p, double cc) -> MatchTemplateResult"""
        _IMP_em2d.MatchTemplateResult_swiginit(self, _IMP_em2d.new_MatchTemplateResult(p, cc))

    def show(self, *args):
        r"""show(MatchTemplateResult self, _ostream out=std::cout)"""
        return _IMP_em2d.MatchTemplateResult_show(self, *args)

    def __str__(self):
        r"""__str__(MatchTemplateResult self) -> std::string"""
        return _IMP_em2d.MatchTemplateResult___str__(self)

    def __repr__(self):
        r"""__repr__(MatchTemplateResult self) -> std::string"""
        return _IMP_em2d.MatchTemplateResult___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_MatchTemplateResult

# Register MatchTemplateResult in _IMP_em2d:
_IMP_em2d.MatchTemplateResult_swigregister(MatchTemplateResult)


def apply_mask(m, result, mask, val):
    r"""apply_mask(cv::Mat const & m, cv::Mat & result, IMP::em2d::cvIntMat const & mask, double val)"""
    return _IMP_em2d.apply_mask(m, result, mask, val)

def apply_circular_mask(mat, result, radius, value=0.0):
    r"""apply_circular_mask(cv::Mat const & mat, cv::Mat & result, int radius, double value=0.0)"""
    return _IMP_em2d.apply_circular_mask(mat, result, radius, value)

def get_mean(mat, mask):
    r"""get_mean(cv::Mat const & mat, IMP::em2d::cvIntMat const & mask) -> double"""
    return _IMP_em2d.get_mean(mat, mask)

def create_circular_mask(rows, cols, radius):
    r"""create_circular_mask(int rows, int cols, int radius) -> IMP::em2d::cvIntMat"""
    return _IMP_em2d.create_circular_mask(rows, cols, radius)

def do_histogram_stretching(m, boxes, offset):
    r"""do_histogram_stretching(cv::Mat & m, int boxes, int offset)"""
    return _IMP_em2d.do_histogram_stretching(m, boxes, offset)

def do_dilate_and_shrink_warp(m, grayscale, kernel):
    r"""do_dilate_and_shrink_warp(cv::Mat & m, cv::Mat const & grayscale, cv::Mat & kernel)"""
    return _IMP_em2d.do_dilate_and_shrink_warp(m, grayscale, kernel)

def do_morphologic_reconstruction(mask, marker, neighbors_mode=4):
    r"""do_morphologic_reconstruction(cv::Mat const & mask, cv::Mat & marker, int neighbors_mode=4)"""
    return _IMP_em2d.do_morphologic_reconstruction(mask, marker, neighbors_mode)

def do_labeling(m, mat_to_label):
    r"""do_labeling(IMP::em2d::cvIntMat const & m, IMP::em2d::cvIntMat & mat_to_label) -> int"""
    return _IMP_em2d.do_labeling(m, mat_to_label)

def get_diffusion_filtering_partial_derivative(m, der, dx, dy, ang):
    r"""get_diffusion_filtering_partial_derivative(cv::Mat const & m, cv::Mat & der, double dx, double dy, double ang)"""
    return _IMP_em2d.get_diffusion_filtering_partial_derivative(m, der, dx, dy, ang)

def get_domes(m, result, h):
    r"""get_domes(cv::Mat & m, cv::Mat & result, double h)"""
    return _IMP_em2d.get_domes(m, result, h)

def get_transformed(input, transformed, T):
    r"""get_transformed(cv::Mat const & input, cv::Mat & transformed, Transformation2D T)"""
    return _IMP_em2d.get_transformed(input, transformed, T)

def apply_threshold(m, result, threshold=0.0):
    r"""apply_threshold(cv::Mat & m, cv::Mat & result, double threshold=0.0)"""
    return _IMP_em2d.apply_threshold(m, result, threshold)

def do_morphologic_contrast_enhancement(m, result, kernel, iterations):
    r"""do_morphologic_contrast_enhancement(cv::Mat const & m, cv::Mat & result, cv::Mat const & kernel, unsigned int iterations)"""
    return _IMP_em2d.do_morphologic_contrast_enhancement(m, result, kernel, iterations)

def get_morphologic_gradient(m, result, kernel):
    r"""get_morphologic_gradient(cv::Mat const & m, cv::Mat & result, cv::Mat const & kernel)"""
    return _IMP_em2d.get_morphologic_gradient(m, result, kernel)

def get_overlap_percentage(m1, m2, center):
    r"""get_overlap_percentage(cv::Mat & m1, cv::Mat & m2, IMP::IntPair const & center) -> double"""
    return _IMP_em2d.get_overlap_percentage(m1, m2, center)

def get_best_template_matches(m, templ, n):
    r"""get_best_template_matches(cv::Mat const & m, cv::Mat const & templ, unsigned int n) -> IMP::em2d::MatchTemplateResults"""
    return _IMP_em2d.get_best_template_matches(m, templ, n)
class Image(IMP.Object):
    r"""Proxy of C++ IMP::em2d::Image class."""

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

    def __init__(self, *args):
        r"""
        __init__(Image self) -> Image
        __init__(Image self, int rows, int cols) -> Image
        __init__(Image self, IMP::String filename, ImageReaderWriter reader) -> Image
        """
        _IMP_em2d.Image_swiginit(self, _IMP_em2d.new_Image(*args))

    def get_data(self):
        r"""get_data(Image self) -> cv::Mat &"""
        return _IMP_em2d.Image_get_data(self)

    def set_data(self, mat):
        r"""set_data(Image self, cv::Mat const & mat)"""
        return _IMP_em2d.Image_set_data(self, mat)

    def set_zeros(self):
        r"""set_zeros(Image self)"""
        return _IMP_em2d.Image_set_zeros(self)

    def set_value(self, *args):
        r"""
        set_value(Image self, double val)
        set_value(Image self, int i, int j, double val)
        """
        return _IMP_em2d.Image_set_value(self, *args)

    def __call__(self, i, j):
        r"""__call__(Image self, int i, int j) -> double"""
        return _IMP_em2d.Image___call__(self, i, j)

    def get_header(self):
        r"""get_header(Image self) -> ImageHeader"""
        return _IMP_em2d.Image_get_header(self)

    def set_size(self, *args):
        r"""
        set_size(Image self, int rows, int cols)
        set_size(Image self, Image img)
        """
        return _IMP_em2d.Image_set_size(self, *args)

    def update_header(self):
        r"""update_header(Image self)"""
        return _IMP_em2d.Image_update_header(self)

    def read(self, filename, reader):
        r"""read(Image self, IMP::String filename, ImageReaderWriter reader)"""
        return _IMP_em2d.Image_read(self, filename, reader)

    def write(self, filename, writer):
        r"""write(Image self, IMP::String const & filename, ImageReaderWriter writer)"""
        return _IMP_em2d.Image_write(self, filename, writer)

    def show(self, out):
        r"""show(Image self, _ostream out)"""
        return _IMP_em2d.Image_show(self, out)

    def get_version_info(self):
        r"""get_version_info(Image self) -> VersionInfo"""
        return _IMP_em2d.Image_get_version_info(self)

    def set_name(self, name):
        r"""set_name(Image self, IMP::String const & name)"""
        return _IMP_em2d.Image_set_name(self, name)

    def get_name(self):
        r"""get_name(Image self) -> IMP::String"""
        return _IMP_em2d.Image_get_name(self)

    def get_min_and_max_values(self):
        r"""get_min_and_max_values(Image self) -> IMP::FloatRange"""
        return _IMP_em2d.Image_get_min_and_max_values(self)

    def __str__(self):
        r"""__str__(Image self) -> std::string"""
        return _IMP_em2d.Image___str__(self)

    def __repr__(self):
        r"""__repr__(Image self) -> std::string"""
        return _IMP_em2d.Image___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_Image(o)


# Register Image in _IMP_em2d:
_IMP_em2d.Image_swigregister(Image)


def read_images(names, rw):
    r"""read_images(IMP::Strings const & names, ImageReaderWriter rw) -> IMP::em2d::Images"""
    return _IMP_em2d.read_images(names, rw)

def save_images(images, names, rw):
    r"""save_images(IMP::em2d::Images images, IMP::Strings const & names, ImageReaderWriter rw)"""
    return _IMP_em2d.save_images(images, names, rw)

def do_normalize(*args):
    r"""
    do_normalize(cv::Mat & m)
    do_normalize(Image im, bool force=False)
    """
    return _IMP_em2d.do_normalize(*args)

def get_histogram(*args):
    r"""
    get_histogram(cv::Mat const & m, int bins) -> IMP::Floats
    get_histogram(Image img, int bins) -> IMP::Floats
    """
    return _IMP_em2d.get_histogram(*args)

def apply_variance_filter(*args):
    r"""
    apply_variance_filter(cv::Mat const & input, cv::Mat & filtered, int kernelsize)
    apply_variance_filter(Image input, Image filtered, int kernelsize)
    """
    return _IMP_em2d.apply_variance_filter(*args)

def apply_diffusion_filter(*args):
    r"""
    apply_diffusion_filter(cv::Mat const & m, cv::Mat & result, double beta, double pixelsize, unsigned int time_steps)
    apply_diffusion_filter(Image input, Image filtered, double beta, double pixelsize, int time_steps)
    """
    return _IMP_em2d.apply_diffusion_filter(*args)

def do_fill_holes(*args):
    r"""
    do_fill_holes(cv::Mat const & m, cv::Mat & result, double h)
    do_fill_holes(Image input, Image result, double n_stddevs)
    """
    return _IMP_em2d.do_fill_holes(*args)

def do_combined_fill_holes_and_threshold(*args):
    r"""
    do_combined_fill_holes_and_threshold(cv::Mat & m, cv::Mat & result, double n_stddevs, double threshold=0.0)
    do_combined_fill_holes_and_threshold(Image input, Image result, double n_stddevs)
    """
    return _IMP_em2d.do_combined_fill_holes_and_threshold(*args)

def do_extend_borders(*args):
    r"""
    do_extend_borders(cv::Mat & orig, cv::Mat & dst, unsigned int pix)
    do_extend_borders(Image im1, Image im2, unsigned int pix)
    """
    return _IMP_em2d.do_extend_borders(*args)

def do_segmentation(*args):
    r"""
    do_segmentation(cv::Mat const & m, cv::Mat & result, SegmentationParameters params)
    do_segmentation(Image input, Image result, SegmentationParameters params)
    """
    return _IMP_em2d.do_segmentation(*args)

def do_remove_small_objects(*args):
    r"""
    do_remove_small_objects(IMP::em2d::cvIntMat & m, double percentage, int background=0, int foreground=1)
    do_remove_small_objects(Image input, double percentage, int background=0, int foreground=1)
    """
    return _IMP_em2d.do_remove_small_objects(*args)

def do_subtract_images(first, second, result):
    r"""do_subtract_images(Image first, Image second, Image result)"""
    return _IMP_em2d.do_subtract_images(first, second, result)

def add_noise(*args):
    r"""
    add_noise(cv::Mat & v, double op1, double op2, IMP::String const & mode="uniform", double df=3)
    add_noise(Image im1, double op1, double op2, IMP::String const & mode="uniform", double df=3)
    """
    return _IMP_em2d.add_noise(*args)

def do_resample_polar(*args):
    r"""
    do_resample_polar(cv::Mat const & input, cv::Mat & resampled, PolarResamplingParameters polar_params)
    do_resample_polar(Image im1, Image im2, PolarResamplingParameters polar_params)
    """
    return _IMP_em2d.do_resample_polar(*args)

def crop(*args):
    r"""
    crop(cv::Mat const & m, IMP::IntPair const & center, int size) -> cv::Mat
    crop(Image img, IMP::IntPair const & center, int size)
    """
    return _IMP_em2d.crop(*args)

def apply_mean_outside_mask(img, radius):
    r"""apply_mean_outside_mask(Image img, double radius)"""
    return _IMP_em2d.apply_mean_outside_mask(img, radius)
class RegistrationResult(object):
    r"""Proxy of C++ IMP::em2d::RegistrationResult class."""

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

    def __init__(self, *args):
        r"""
        __init__(RegistrationResult self) -> RegistrationResult
        __init__(RegistrationResult self, double phi, double theta, double psi, Vector2D shift, int projection_index=0, int image_index=0, IMP::String name="") -> RegistrationResult
        __init__(RegistrationResult self, Rotation3D R, Vector2D shift=IMP::algebra::Vector2D(0., 0.), int projection_index=0, int image_index=0, IMP::String name="") -> RegistrationResult
        """
        _IMP_em2d.RegistrationResult_swiginit(self, _IMP_em2d.new_RegistrationResult(*args))

    def get_phi(self):
        r"""get_phi(RegistrationResult self) -> double"""
        return _IMP_em2d.RegistrationResult_get_phi(self)

    def get_theta(self):
        r"""get_theta(RegistrationResult self) -> double"""
        return _IMP_em2d.RegistrationResult_get_theta(self)

    def get_psi(self):
        r"""get_psi(RegistrationResult self) -> double"""
        return _IMP_em2d.RegistrationResult_get_psi(self)

    def get_shift(self):
        r"""get_shift(RegistrationResult self) -> Vector2D"""
        return _IMP_em2d.RegistrationResult_get_shift(self)

    def get_shift_3d(self):
        r"""get_shift_3d(RegistrationResult self) -> Vector3D"""
        return _IMP_em2d.RegistrationResult_get_shift_3d(self)

    def get_projection_index(self):
        r"""get_projection_index(RegistrationResult self) -> int"""
        return _IMP_em2d.RegistrationResult_get_projection_index(self)

    def set_projection_index(self, index):
        r"""set_projection_index(RegistrationResult self, int index)"""
        return _IMP_em2d.RegistrationResult_set_projection_index(self, index)

    def get_image_index(self):
        r"""get_image_index(RegistrationResult self) -> int"""
        return _IMP_em2d.RegistrationResult_get_image_index(self)

    def set_image_index(self, index):
        r"""set_image_index(RegistrationResult self, int index)"""
        return _IMP_em2d.RegistrationResult_set_image_index(self, index)

    def get_name(self):
        r"""get_name(RegistrationResult self) -> IMP::String"""
        return _IMP_em2d.RegistrationResult_get_name(self)

    def get_ccc(self):
        r"""get_ccc(RegistrationResult self) -> double"""
        return _IMP_em2d.RegistrationResult_get_ccc(self)

    def set_ccc(self, ccc):
        r"""set_ccc(RegistrationResult self, double ccc)"""
        return _IMP_em2d.RegistrationResult_set_ccc(self, ccc)

    def get_score(self):
        r"""get_score(RegistrationResult self) -> double"""
        return _IMP_em2d.RegistrationResult_get_score(self)

    def set_score(self, Score):
        r"""set_score(RegistrationResult self, double Score)"""
        return _IMP_em2d.RegistrationResult_set_score(self, Score)

    def set_rotation(self, *args):
        r"""
        set_rotation(RegistrationResult self, double phi, double theta, double psi)
        set_rotation(RegistrationResult self, Rotation3D R)
        """
        return _IMP_em2d.RegistrationResult_set_rotation(self, *args)

    def set_shift(self, shift):
        r"""set_shift(RegistrationResult self, Vector2D shift)"""
        return _IMP_em2d.RegistrationResult_set_shift(self, shift)

    def set_name(self, name):
        r"""set_name(RegistrationResult self, IMP::String name)"""
        return _IMP_em2d.RegistrationResult_set_name(self, name)

    def add_in_plane_transformation(self, t):
        r"""add_in_plane_transformation(RegistrationResult self, Transformation2D t)"""
        return _IMP_em2d.RegistrationResult_add_in_plane_transformation(self, t)

    def show(self, *args):
        r"""show(RegistrationResult self, _ostream out=std::cout)"""
        return _IMP_em2d.RegistrationResult_show(self, *args)

    def write(self, *args):
        r"""write(RegistrationResult self, _ostream out=std::cout)"""
        return _IMP_em2d.RegistrationResult_write(self, *args)

    def write_comment_line(self, *args):
        r"""write_comment_line(RegistrationResult self, _ostream out=std::cout)"""
        return _IMP_em2d.RegistrationResult_write_comment_line(self, *args)

    def read(self, s):
        r"""read(RegistrationResult self, IMP::String const & s)"""
        return _IMP_em2d.RegistrationResult_read(self, s)

    def set_random_registration(self, index, maximum_shift):
        r"""set_random_registration(RegistrationResult self, unsigned int index, double maximum_shift)"""
        return _IMP_em2d.RegistrationResult_set_random_registration(self, index, maximum_shift)

    def get_rotation(self):
        r"""get_rotation(RegistrationResult self) -> Rotation3D"""
        return _IMP_em2d.RegistrationResult_get_rotation(self)

    def set_in_image(self, header):
        r"""set_in_image(RegistrationResult self, ImageHeader header)"""
        return _IMP_em2d.RegistrationResult_set_in_image(self, header)

    def read_from_image(self, header):
        r"""read_from_image(RegistrationResult self, ImageHeader header)"""
        return _IMP_em2d.RegistrationResult_read_from_image(self, header)

    def get_is_optimized_result(self):
        r"""get_is_optimized_result(RegistrationResult self) -> bool"""
        return _IMP_em2d.RegistrationResult_get_is_optimized_result(self)
    __swig_destroy__ = _IMP_em2d.delete_RegistrationResult

    def __str__(self):
        r"""__str__(RegistrationResult self) -> std::string"""
        return _IMP_em2d.RegistrationResult___str__(self)

    def __repr__(self):
        r"""__repr__(RegistrationResult self) -> std::string"""
        return _IMP_em2d.RegistrationResult___repr__(self)

# Register RegistrationResult in _IMP_em2d:
_IMP_em2d.RegistrationResult_swigregister(RegistrationResult)


def read_registration_results(filename):
    r"""read_registration_results(IMP::String const & filename) -> IMP::em2d::RegistrationResults"""
    return _IMP_em2d.read_registration_results(filename)

def write_registration_results(filename, results):
    r"""write_registration_results(IMP::String filename, IMP::em2d::RegistrationResults const & results)"""
    return _IMP_em2d.write_registration_results(filename, results)

def get_random_registration_results(n, maximum_shift=5.0):
    r"""get_random_registration_results(unsigned int n, double maximum_shift=5.0) -> IMP::em2d::RegistrationResults"""
    return _IMP_em2d.get_random_registration_results(n, maximum_shift)

def get_evenly_distributed_registration_results(n_projections):
    r"""get_evenly_distributed_registration_results(unsigned int n_projections) -> IMP::em2d::RegistrationResults"""
    return _IMP_em2d.get_evenly_distributed_registration_results(n_projections)
class SpiderImageReaderWriter(ImageReaderWriter):
    r"""Proxy of C++ IMP::em2d::SpiderImageReaderWriter class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    filename_ = property(_IMP_em2d.SpiderImageReaderWriter_filename__get, _IMP_em2d.SpiderImageReaderWriter_filename__set, doc=r"""filename_ : IMP::String""")
    skip_type_check_ = property(_IMP_em2d.SpiderImageReaderWriter_skip_type_check__get, _IMP_em2d.SpiderImageReaderWriter_skip_type_check__set, doc=r"""skip_type_check_ : bool""")
    force_reversed_ = property(_IMP_em2d.SpiderImageReaderWriter_force_reversed__get, _IMP_em2d.SpiderImageReaderWriter_force_reversed__set, doc=r"""force_reversed_ : bool""")
    skip_extra_checkings_ = property(_IMP_em2d.SpiderImageReaderWriter_skip_extra_checkings__get, _IMP_em2d.SpiderImageReaderWriter_skip_extra_checkings__set, doc=r"""skip_extra_checkings_ : bool""")

    def __init__(self, *args):
        r"""
        __init__(SpiderImageReaderWriter self) -> SpiderImageReaderWriter
        __init__(SpiderImageReaderWriter self, IMP::String const & filename, bool skip_type_check, bool force_reversed, bool skip_extra_checkings) -> SpiderImageReaderWriter
        """
        _IMP_em2d.SpiderImageReaderWriter_swiginit(self, _IMP_em2d.new_SpiderImageReaderWriter(*args))

    def __str__(self):
        r"""__str__(SpiderImageReaderWriter self) -> std::string"""
        return _IMP_em2d.SpiderImageReaderWriter___str__(self)

    def __repr__(self):
        r"""__repr__(SpiderImageReaderWriter self) -> std::string"""
        return _IMP_em2d.SpiderImageReaderWriter___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_SpiderImageReaderWriter(o)


# Register SpiderImageReaderWriter in _IMP_em2d:
_IMP_em2d.SpiderImageReaderWriter_swigregister(SpiderImageReaderWriter)

class JPGImageReaderWriter(ImageReaderWriter):
    r"""Proxy of C++ IMP::em2d::JPGImageReaderWriter class."""

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

    def __init__(self):
        r"""__init__(JPGImageReaderWriter self) -> JPGImageReaderWriter"""
        _IMP_em2d.JPGImageReaderWriter_swiginit(self, _IMP_em2d.new_JPGImageReaderWriter())

    def __str__(self):
        r"""__str__(JPGImageReaderWriter self) -> std::string"""
        return _IMP_em2d.JPGImageReaderWriter___str__(self)

    def __repr__(self):
        r"""__repr__(JPGImageReaderWriter self) -> std::string"""
        return _IMP_em2d.JPGImageReaderWriter___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_JPGImageReaderWriter(o)


# Register JPGImageReaderWriter in _IMP_em2d:
_IMP_em2d.JPGImageReaderWriter_swigregister(JPGImageReaderWriter)

class TIFFImageReaderWriter(ImageReaderWriter):
    r"""Proxy of C++ IMP::em2d::TIFFImageReaderWriter class."""

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

    def __init__(self):
        r"""__init__(TIFFImageReaderWriter self) -> TIFFImageReaderWriter"""
        _IMP_em2d.TIFFImageReaderWriter_swiginit(self, _IMP_em2d.new_TIFFImageReaderWriter())

    def __str__(self):
        r"""__str__(TIFFImageReaderWriter self) -> std::string"""
        return _IMP_em2d.TIFFImageReaderWriter___str__(self)

    def __repr__(self):
        r"""__repr__(TIFFImageReaderWriter self) -> std::string"""
        return _IMP_em2d.TIFFImageReaderWriter___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_TIFFImageReaderWriter(o)


# Register TIFFImageReaderWriter in _IMP_em2d:
_IMP_em2d.TIFFImageReaderWriter_swigregister(TIFFImageReaderWriter)


def do_matrix_to_image_flip(m):
    r"""do_matrix_to_image_flip(cv::Mat & m)"""
    return _IMP_em2d.do_matrix_to_image_flip(m)

def get_autocorrelation2d_no_preprocessing(M, corr):
    r"""get_autocorrelation2d_no_preprocessing(cv::Mat const & M, cv::Mat & corr)"""
    return _IMP_em2d.get_autocorrelation2d_no_preprocessing(M, corr)

def get_autocorrelation2d(*args):
    r"""
    get_autocorrelation2d(Image im1, Image im2)
    get_autocorrelation2d(cv::Mat const & m, cv::Mat & corr)
    """
    return _IMP_em2d.get_autocorrelation2d(*args)

def get_correlation2d(*args):
    r"""
    get_correlation2d(Image im1, Image im2, Image corr)
    get_correlation2d(cv::Mat const & A, cv::Mat const & B, cv::Mat & corr)
    """
    return _IMP_em2d.get_correlation2d(*args)

def get_correlation2d_no_preprocessing(M1, M2, corr):
    r"""get_correlation2d_no_preprocessing(cv::Mat const & M1, cv::Mat const & M2, cv::Mat & corr)"""
    return _IMP_em2d.get_correlation2d_no_preprocessing(M1, M2, corr)

def get_fft_using_optimal_size(m, M):
    r"""get_fft_using_optimal_size(cv::Mat const & m, cv::Mat & M)"""
    return _IMP_em2d.get_fft_using_optimal_size(m, M)

def get_spectrum(m, real, imag):
    r"""get_spectrum(cv::Mat const & m, cv::Mat & real, cv::Mat & imag)"""
    return _IMP_em2d.get_spectrum(m, real, imag)

def get_rotation_error(rr1, rr2):
    r"""get_rotation_error(RegistrationResult rr1, RegistrationResult rr2) -> double"""
    return _IMP_em2d.get_rotation_error(rr1, rr2)

def get_shift_error(rr1, rr2):
    r"""get_shift_error(RegistrationResult rr1, RegistrationResult rr2) -> double"""
    return _IMP_em2d.get_shift_error(rr1, rr2)

def get_average_rotation_error(correct_RRs, computed_RRs):
    r"""get_average_rotation_error(IMP::em2d::RegistrationResults const & correct_RRs, IMP::em2d::RegistrationResults const & computed_RRs) -> double"""
    return _IMP_em2d.get_average_rotation_error(correct_RRs, computed_RRs)

def get_average_shift_error(correct_RRs, computed_RRs):
    r"""get_average_shift_error(IMP::em2d::RegistrationResults const & correct_RRs, IMP::em2d::RegistrationResults const & computed_RRs) -> double"""
    return _IMP_em2d.get_average_shift_error(correct_RRs, computed_RRs)

def get_cross_correlation_coefficient(*args):
    r"""
    get_cross_correlation_coefficient(Image im1, Image im2) -> double
    get_cross_correlation_coefficient(cv::Mat const & m1, cv::Mat const & m2) -> double
    """
    return _IMP_em2d.get_cross_correlation_coefficient(*args)

def get_global_score(RRs):
    r"""get_global_score(IMP::em2d::RegistrationResults const & RRs) -> double"""
    return _IMP_em2d.get_global_score(RRs)
class ScoreFunction(IMP.Object):
    r"""Proxy of C++ IMP::em2d::ScoreFunction 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")

    def get_score(self, image, projection):
        r"""get_score(ScoreFunction self, Image image, Image projection) -> double"""
        return _IMP_em2d.ScoreFunction_get_score(self, image, projection)

    def set_variance_image(self, var):
        r"""set_variance_image(ScoreFunction self, Image var)"""
        return _IMP_em2d.ScoreFunction_set_variance_image(self, var)

    def get_version_info(self):
        r"""get_version_info(ScoreFunction self) -> VersionInfo"""
        return _IMP_em2d.ScoreFunction_get_version_info(self)

    def __str__(self):
        r"""__str__(ScoreFunction self) -> std::string"""
        return _IMP_em2d.ScoreFunction___str__(self)

    def __repr__(self):
        r"""__repr__(ScoreFunction self) -> std::string"""
        return _IMP_em2d.ScoreFunction___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_ScoreFunction(o)


# Register ScoreFunction in _IMP_em2d:
_IMP_em2d.ScoreFunction_swigregister(ScoreFunction)

class ChiSquaredScore(ScoreFunction):
    r"""Proxy of C++ IMP::em2d::ChiSquaredScore class."""

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

    def __init__(self):
        r"""__init__(ChiSquaredScore self) -> ChiSquaredScore"""
        _IMP_em2d.ChiSquaredScore_swiginit(self, _IMP_em2d.new_ChiSquaredScore())

    def __str__(self):
        r"""__str__(ChiSquaredScore self) -> std::string"""
        return _IMP_em2d.ChiSquaredScore___str__(self)

    def __repr__(self):
        r"""__repr__(ChiSquaredScore self) -> std::string"""
        return _IMP_em2d.ChiSquaredScore___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_ChiSquaredScore(o)

    __swig_destroy__ = _IMP_em2d.delete_ChiSquaredScore

# Register ChiSquaredScore in _IMP_em2d:
_IMP_em2d.ChiSquaredScore_swigregister(ChiSquaredScore)

class EM2DScore(ScoreFunction):
    r"""Proxy of C++ IMP::em2d::EM2DScore class."""

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

    def __init__(self):
        r"""__init__(EM2DScore self) -> EM2DScore"""
        _IMP_em2d.EM2DScore_swiginit(self, _IMP_em2d.new_EM2DScore())

    def __str__(self):
        r"""__str__(EM2DScore self) -> std::string"""
        return _IMP_em2d.EM2DScore___str__(self)

    def __repr__(self):
        r"""__repr__(EM2DScore self) -> std::string"""
        return _IMP_em2d.EM2DScore___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_EM2DScore(o)

    __swig_destroy__ = _IMP_em2d.delete_EM2DScore

# Register EM2DScore in _IMP_em2d:
_IMP_em2d.EM2DScore_swigregister(EM2DScore)

class MeanAbsoluteDifference(ScoreFunction):
    r"""Proxy of C++ IMP::em2d::MeanAbsoluteDifference class."""

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

    def __init__(self):
        r"""__init__(MeanAbsoluteDifference self) -> MeanAbsoluteDifference"""
        _IMP_em2d.MeanAbsoluteDifference_swiginit(self, _IMP_em2d.new_MeanAbsoluteDifference())

    def __str__(self):
        r"""__str__(MeanAbsoluteDifference self) -> std::string"""
        return _IMP_em2d.MeanAbsoluteDifference___str__(self)

    def __repr__(self):
        r"""__repr__(MeanAbsoluteDifference self) -> std::string"""
        return _IMP_em2d.MeanAbsoluteDifference___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_MeanAbsoluteDifference(o)

    __swig_destroy__ = _IMP_em2d.delete_MeanAbsoluteDifference

# Register MeanAbsoluteDifference in _IMP_em2d:
_IMP_em2d.MeanAbsoluteDifference_swigregister(MeanAbsoluteDifference)


def read_selection_file(fn):
    r"""read_selection_file(IMP::String fn) -> IMP::Strings"""
    return _IMP_em2d.read_selection_file(fn)

def create_filenames(number, basic_name, extension):
    r"""create_filenames(unsigned long number, IMP::String basic_name, IMP::String extension) -> IMP::Strings"""
    return _IMP_em2d.create_filenames(number, basic_name, extension)
class ProjectionParameters(IMP.Decorator):
    r"""Proxy of C++ IMP::em2d::ProjectionParameters class."""

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

    def __init__(self, *args):
        r"""
        __init__(ProjectionParameters self) -> ProjectionParameters
        __init__(ProjectionParameters self, Model m, ParticleIndex id) -> ProjectionParameters
        __init__(ProjectionParameters self, _ParticleAdaptor d) -> ProjectionParameters
        """
        _IMP_em2d.ProjectionParameters_swiginit(self, _IMP_em2d.new_ProjectionParameters(*args))

    def show(self, *args):
        r"""show(ProjectionParameters self, _ostream out=std::cout)"""
        return _IMP_em2d.ProjectionParameters_show(self, *args)

    @staticmethod
    def setup_particle(*args):
        r"""
        setup_particle(Model m, ParticleIndex pi) -> ProjectionParameters
        setup_particle(_ParticleAdaptor decorator) -> ProjectionParameters
        """
        return _IMP_em2d.ProjectionParameters_setup_particle(*args)
    __swig_destroy__ = _IMP_em2d.delete_ProjectionParameters

    @staticmethod
    def get_keys():
        r"""get_keys() -> IMP::FloatKeys const &"""
        return _IMP_em2d.ProjectionParameters_get_keys()

    def set_proper_ranges_for_keys(self, m, min_translation_values, max_translation_values):
        r"""set_proper_ranges_for_keys(ProjectionParameters self, Model m, Vector3D min_translation_values, Vector3D max_translation_values)"""
        return _IMP_em2d.ProjectionParameters_set_proper_ranges_for_keys(self, m, min_translation_values, max_translation_values)

    @staticmethod
    def get_is_setup(*args):
        r"""
        get_is_setup(_ParticleAdaptor p) -> bool
        get_is_setup(Model m, ParticleIndex pi) -> bool
        """
        return _IMP_em2d.ProjectionParameters_get_is_setup(*args)

    def get_parameters_optimized(self):
        r"""get_parameters_optimized(ProjectionParameters self) -> bool"""
        return _IMP_em2d.ProjectionParameters_get_parameters_optimized(self)

    def get_translation(self):
        r"""get_translation(ProjectionParameters self) -> Vector3D"""
        return _IMP_em2d.ProjectionParameters_get_translation(self)

    def set_translation(self, v):
        r"""set_translation(ProjectionParameters self, Vector3D v)"""
        return _IMP_em2d.ProjectionParameters_set_translation(self, v)

    def get_rotation(self):
        r"""get_rotation(ProjectionParameters self) -> Rotation3D"""
        return _IMP_em2d.ProjectionParameters_get_rotation(self)

    def set_rotation(self, R):
        r"""set_rotation(ProjectionParameters self, Rotation3D R)"""
        return _IMP_em2d.ProjectionParameters_set_rotation(self, R)

    def set_parameters_optimized(self, tf):
        r"""set_parameters_optimized(ProjectionParameters self, bool tf)"""
        return _IMP_em2d.ProjectionParameters_set_parameters_optimized(self, tf)

    def get_quaternion_1(self):
        r"""get_quaternion_1(ProjectionParameters self) -> double"""
        return _IMP_em2d.ProjectionParameters_get_quaternion_1(self)

    def set_quaternion_1(self, t):
        r"""set_quaternion_1(ProjectionParameters self, double t)"""
        return _IMP_em2d.ProjectionParameters_set_quaternion_1(self, t)

    def get_quaternion_2(self):
        r"""get_quaternion_2(ProjectionParameters self) -> double"""
        return _IMP_em2d.ProjectionParameters_get_quaternion_2(self)

    def set_quaternion_2(self, t):
        r"""set_quaternion_2(ProjectionParameters self, double t)"""
        return _IMP_em2d.ProjectionParameters_set_quaternion_2(self, t)

    def get_quaternion_3(self):
        r"""get_quaternion_3(ProjectionParameters self) -> double"""
        return _IMP_em2d.ProjectionParameters_get_quaternion_3(self)

    def set_quaternion_3(self, t):
        r"""set_quaternion_3(ProjectionParameters self, double t)"""
        return _IMP_em2d.ProjectionParameters_set_quaternion_3(self, t)

    def get_quaternion_4(self):
        r"""get_quaternion_4(ProjectionParameters self) -> double"""
        return _IMP_em2d.ProjectionParameters_get_quaternion_4(self)

    def set_quaternion_4(self, t):
        r"""set_quaternion_4(ProjectionParameters self, double t)"""
        return _IMP_em2d.ProjectionParameters_set_quaternion_4(self, t)

    def get_translation_x(self):
        r"""get_translation_x(ProjectionParameters self) -> double"""
        return _IMP_em2d.ProjectionParameters_get_translation_x(self)

    def set_translation_x(self, t):
        r"""set_translation_x(ProjectionParameters self, double t)"""
        return _IMP_em2d.ProjectionParameters_set_translation_x(self, t)

    def get_translation_y(self):
        r"""get_translation_y(ProjectionParameters self) -> double"""
        return _IMP_em2d.ProjectionParameters_get_translation_y(self)

    def set_translation_y(self, t):
        r"""set_translation_y(ProjectionParameters self, double t)"""
        return _IMP_em2d.ProjectionParameters_set_translation_y(self, t)

    def add_attribute(self, *args):
        r"""
        add_attribute(ProjectionParameters self, FloatKey k, IMP::Float v, bool opt)
        add_attribute(ProjectionParameters self, FloatKey a0, IMP::Float a1)
        add_attribute(ProjectionParameters self, IntKey a0, IMP::Int a1)
        add_attribute(ProjectionParameters self, FloatsKey a0, IMP::Floats a1)
        add_attribute(ProjectionParameters self, IntsKey a0, IMP::Ints a1)
        add_attribute(ProjectionParameters self, StringKey a0, IMP::String a1)
        add_attribute(ProjectionParameters self, ParticleIndexKey a0, Particle a1)
        add_attribute(ProjectionParameters self, ObjectKey a0, Object a1)
        """
        return _IMP_em2d.ProjectionParameters_add_attribute(self, *args)

    def get_value(self, *args):
        r"""
        get_value(ProjectionParameters self, FloatKey a0) -> IMP::Float
        get_value(ProjectionParameters self, IntKey a0) -> IMP::Int
        get_value(ProjectionParameters self, FloatsKey a0) -> IMP::Floats
        get_value(ProjectionParameters self, IntsKey a0) -> IMP::Ints
        get_value(ProjectionParameters self, StringKey a0) -> IMP::String
        get_value(ProjectionParameters self, ParticleIndexKey a0) -> Particle
        get_value(ProjectionParameters self, ObjectKey a0) -> Object
        """
        return _IMP_em2d.ProjectionParameters_get_value(self, *args)

    def set_value(self, *args):
        r"""
        set_value(ProjectionParameters self, FloatKey a0, IMP::Float a1)
        set_value(ProjectionParameters self, IntKey a0, IMP::Int a1)
        set_value(ProjectionParameters self, FloatsKey a0, IMP::Floats a1)
        set_value(ProjectionParameters self, IntsKey a0, IMP::Ints a1)
        set_value(ProjectionParameters self, StringKey a0, IMP::String a1)
        set_value(ProjectionParameters self, ParticleIndexKey a0, Particle a1)
        set_value(ProjectionParameters self, ObjectKey a0, Object a1)
        """
        return _IMP_em2d.ProjectionParameters_set_value(self, *args)

    def remove_attribute(self, *args):
        r"""
        remove_attribute(ProjectionParameters self, FloatKey a0)
        remove_attribute(ProjectionParameters self, IntKey a0)
        remove_attribute(ProjectionParameters self, FloatsKey a0)
        remove_attribute(ProjectionParameters self, IntsKey a0)
        remove_attribute(ProjectionParameters self, StringKey a0)
        remove_attribute(ProjectionParameters self, ParticleIndexKey a0)
        remove_attribute(ProjectionParameters self, ObjectKey a0)
        """
        return _IMP_em2d.ProjectionParameters_remove_attribute(self, *args)

    def has_attribute(self, *args):
        r"""
        has_attribute(ProjectionParameters self, FloatKey a0) -> bool
        has_attribute(ProjectionParameters self, IntKey a0) -> bool
        has_attribute(ProjectionParameters self, FloatsKey a0) -> bool
        has_attribute(ProjectionParameters self, IntsKey a0) -> bool
        has_attribute(ProjectionParameters self, StringKey a0) -> bool
        has_attribute(ProjectionParameters self, ParticleIndexKey a0) -> bool
        has_attribute(ProjectionParameters self, ObjectKey a0) -> bool
        """
        return _IMP_em2d.ProjectionParameters_has_attribute(self, *args)

    def get_derivative(self, a0):
        r"""get_derivative(ProjectionParameters self, FloatKey a0) -> double"""
        return _IMP_em2d.ProjectionParameters_get_derivative(self, a0)

    def get_name(self):
        r"""get_name(ProjectionParameters self) -> std::string"""
        return _IMP_em2d.ProjectionParameters_get_name(self)

    def clear_caches(self):
        r"""clear_caches(ProjectionParameters self)"""
        return _IMP_em2d.ProjectionParameters_clear_caches(self)

    def set_name(self, a0):
        r"""set_name(ProjectionParameters self, std::string a0)"""
        return _IMP_em2d.ProjectionParameters_set_name(self, a0)

    def set_check_level(self, a0):
        r"""set_check_level(ProjectionParameters self, IMP::CheckLevel a0)"""
        return _IMP_em2d.ProjectionParameters_set_check_level(self, a0)

    def add_to_derivative(self, a0, a1, a2):
        r"""add_to_derivative(ProjectionParameters self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
        return _IMP_em2d.ProjectionParameters_add_to_derivative(self, a0, a1, a2)

    def set_is_optimized(self, a0, a1):
        r"""set_is_optimized(ProjectionParameters self, FloatKey a0, bool a1)"""
        return _IMP_em2d.ProjectionParameters_set_is_optimized(self, a0, a1)

    def get_is_optimized(self, a0):
        r"""get_is_optimized(ProjectionParameters self, FloatKey a0) -> bool"""
        return _IMP_em2d.ProjectionParameters_get_is_optimized(self, a0)

    def get_check_level(self):
        r"""get_check_level(ProjectionParameters self) -> IMP::CheckLevel"""
        return _IMP_em2d.ProjectionParameters_get_check_level(self)

    def __eq__(self, *args):
        r"""
        __eq__(ProjectionParameters self, ProjectionParameters o) -> bool
        __eq__(ProjectionParameters self, Particle d) -> bool
        """
        return _IMP_em2d.ProjectionParameters___eq__(self, *args)

    def __ne__(self, *args):
        r"""
        __ne__(ProjectionParameters self, ProjectionParameters o) -> bool
        __ne__(ProjectionParameters self, Particle d) -> bool
        """
        return _IMP_em2d.ProjectionParameters___ne__(self, *args)

    def __le__(self, *args):
        r"""
        __le__(ProjectionParameters self, ProjectionParameters o) -> bool
        __le__(ProjectionParameters self, Particle d) -> bool
        """
        return _IMP_em2d.ProjectionParameters___le__(self, *args)

    def __lt__(self, *args):
        r"""
        __lt__(ProjectionParameters self, ProjectionParameters o) -> bool
        __lt__(ProjectionParameters self, Particle d) -> bool
        """
        return _IMP_em2d.ProjectionParameters___lt__(self, *args)

    def __ge__(self, *args):
        r"""
        __ge__(ProjectionParameters self, ProjectionParameters o) -> bool
        __ge__(ProjectionParameters self, Particle d) -> bool
        """
        return _IMP_em2d.ProjectionParameters___ge__(self, *args)

    def __gt__(self, *args):
        r"""
        __gt__(ProjectionParameters self, ProjectionParameters o) -> bool
        __gt__(ProjectionParameters self, Particle d) -> bool
        """
        return _IMP_em2d.ProjectionParameters___gt__(self, *args)

    def __hash__(self):
        r"""__hash__(ProjectionParameters self) -> std::size_t"""
        return _IMP_em2d.ProjectionParameters___hash__(self)

    def __str__(self):
        r"""__str__(ProjectionParameters self) -> std::string"""
        return _IMP_em2d.ProjectionParameters___str__(self)

    def __repr__(self):
        r"""__repr__(ProjectionParameters self) -> std::string"""
        return _IMP_em2d.ProjectionParameters___repr__(self)

# Register ProjectionParameters in _IMP_em2d:
_IMP_em2d.ProjectionParameters_swigregister(ProjectionParameters)

def ProjectionParameters_setup_particle(*args):
    r"""
    ProjectionParameters_setup_particle(Model m, ParticleIndex pi) -> ProjectionParameters
    ProjectionParameters_setup_particle(_ParticleAdaptor decorator) -> ProjectionParameters
    """
    return _IMP_em2d.ProjectionParameters_setup_particle(*args)

def ProjectionParameters_get_keys():
    r"""ProjectionParameters_get_keys() -> IMP::FloatKeys const &"""
    return _IMP_em2d.ProjectionParameters_get_keys()

def ProjectionParameters_get_is_setup(*args):
    r"""
    ProjectionParameters_get_is_setup(_ParticleAdaptor p) -> bool
    ProjectionParameters_get_is_setup(Model m, ParticleIndex pi) -> bool
    """
    return _IMP_em2d.ProjectionParameters_get_is_setup(*args)


def __lshift__(out, n):
    r"""__lshift__(_ostream out, ProjectionParameters n) -> _ostream"""
    return _IMP_em2d.__lshift__(out, n)
class ProjectionParametersScoreState(IMP.ScoreState):
    r"""Proxy of C++ IMP::em2d::ProjectionParametersScoreState class."""

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

    def __init__(self, p):
        r"""__init__(ProjectionParametersScoreState self, Particle p) -> ProjectionParametersScoreState"""
        _IMP_em2d.ProjectionParametersScoreState_swiginit(self, _IMP_em2d.new_ProjectionParametersScoreState(p))

    def do_before_evaluate(self):
        r"""do_before_evaluate(ProjectionParametersScoreState self)"""
        return _IMP_em2d.ProjectionParametersScoreState_do_before_evaluate(self)

    def do_after_evaluate(self, da):
        r"""do_after_evaluate(ProjectionParametersScoreState self, DerivativeAccumulator da)"""
        return _IMP_em2d.ProjectionParametersScoreState_do_after_evaluate(self, da)

    def do_get_inputs(self):
        r"""do_get_inputs(ProjectionParametersScoreState self) -> IMP::ModelObjectsTemp"""
        return _IMP_em2d.ProjectionParametersScoreState_do_get_inputs(self)

    def do_get_outputs(self):
        r"""do_get_outputs(ProjectionParametersScoreState self) -> IMP::ModelObjectsTemp"""
        return _IMP_em2d.ProjectionParametersScoreState_do_get_outputs(self)

    def get_version_info(self):
        r"""get_version_info(ProjectionParametersScoreState self) -> VersionInfo"""
        return _IMP_em2d.ProjectionParametersScoreState_get_version_info(self)

    def __str__(self):
        r"""__str__(ProjectionParametersScoreState self) -> std::string"""
        return _IMP_em2d.ProjectionParametersScoreState___str__(self)

    def __repr__(self):
        r"""__repr__(ProjectionParametersScoreState self) -> std::string"""
        return _IMP_em2d.ProjectionParametersScoreState___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_ProjectionParametersScoreState(o)


# Register ProjectionParametersScoreState in _IMP_em2d:
_IMP_em2d.ProjectionParametersScoreState_swigregister(ProjectionParametersScoreState)

class ProjectionMask(object):
    r"""Proxy of C++ IMP::em2d::ProjectionMask 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")

    def apply(self, m, v):
        r"""apply(ProjectionMask self, cv::Mat & m, Vector2D v)"""
        return _IMP_em2d.ProjectionMask_apply(self, m, v)

    def show(self, *args):
        r"""show(ProjectionMask self, _ostream out=std::cout)"""
        return _IMP_em2d.ProjectionMask_show(self, *args)
    __swig_destroy__ = _IMP_em2d.delete_ProjectionMask

    def __str__(self):
        r"""__str__(ProjectionMask self) -> std::string"""
        return _IMP_em2d.ProjectionMask___str__(self)

    def __repr__(self):
        r"""__repr__(ProjectionMask self) -> std::string"""
        return _IMP_em2d.ProjectionMask___repr__(self)

# Register ProjectionMask in _IMP_em2d:
_IMP_em2d.ProjectionMask_swigregister(ProjectionMask)


def do_place(mask, m, v):
    r"""do_place(cv::Mat & mask, cv::Mat & m, Vector2D v)"""
    return _IMP_em2d.do_place(mask, m, v)
class MasksManager(object):
    r"""Proxy of C++ IMP::em2d::MasksManager class."""

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

    def __init__(self, *args):
        r"""
        __init__(MasksManager self) -> MasksManager
        __init__(MasksManager self, double resolution, double pixelsize) -> MasksManager
        """
        _IMP_em2d.MasksManager_swiginit(self, _IMP_em2d.new_MasksManager(*args))

    def setup_kernel(self, resolution, pixelsize):
        r"""setup_kernel(MasksManager self, double resolution, double pixelsize)"""
        return _IMP_em2d.MasksManager_setup_kernel(self, resolution, pixelsize)

    def create_masks(self, ps):
        r"""create_masks(MasksManager self, IMP::ParticlesTemp const & ps)"""
        return _IMP_em2d.MasksManager_create_masks(self, ps)

    def create_mask(self, mass):
        r"""create_mask(MasksManager self, double mass)"""
        return _IMP_em2d.MasksManager_create_mask(self, mass)

    def find_mask(self, mass):
        r"""find_mask(MasksManager self, double mass) -> IMP::em2d::ProjectionMaskPtr"""
        return _IMP_em2d.MasksManager_find_mask(self, mass)

    def show(self, *args):
        r"""show(MasksManager self, _ostream out=std::cout)"""
        return _IMP_em2d.MasksManager_show(self, *args)

    def get_number_of_masks(self):
        r"""get_number_of_masks(MasksManager self) -> unsigned int"""
        return _IMP_em2d.MasksManager_get_number_of_masks(self)
    __swig_destroy__ = _IMP_em2d.delete_MasksManager

    def __str__(self):
        r"""__str__(MasksManager self) -> std::string"""
        return _IMP_em2d.MasksManager___str__(self)

    def __repr__(self):
        r"""__repr__(MasksManager self) -> std::string"""
        return _IMP_em2d.MasksManager___repr__(self)

# Register MasksManager in _IMP_em2d:
_IMP_em2d.MasksManager_swigregister(MasksManager)

class ProjectingParameters(object):
    r"""Proxy of C++ IMP::em2d::ProjectingParameters class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    pixel_size = property(_IMP_em2d.ProjectingParameters_pixel_size_get, _IMP_em2d.ProjectingParameters_pixel_size_set, doc=r"""pixel_size : double""")
    resolution = property(_IMP_em2d.ProjectingParameters_resolution_get, _IMP_em2d.ProjectingParameters_resolution_set, doc=r"""resolution : double""")

    def __init__(self, *args):
        r"""
        __init__(ProjectingParameters self) -> ProjectingParameters
        __init__(ProjectingParameters self, double ps, double res) -> ProjectingParameters
        """
        _IMP_em2d.ProjectingParameters_swiginit(self, _IMP_em2d.new_ProjectingParameters(*args))

    def show(self, *args):
        r"""show(ProjectingParameters self, _ostream out=std::cout)"""
        return _IMP_em2d.ProjectingParameters_show(self, *args)

    def __str__(self):
        r"""__str__(ProjectingParameters self) -> std::string"""
        return _IMP_em2d.ProjectingParameters___str__(self)

    def __repr__(self):
        r"""__repr__(ProjectingParameters self) -> std::string"""
        return _IMP_em2d.ProjectingParameters___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_ProjectingParameters

# Register ProjectingParameters in _IMP_em2d:
_IMP_em2d.ProjectingParameters_swigregister(ProjectingParameters)

class ProjectingOptions(ProjectingParameters):
    r"""Proxy of C++ IMP::em2d::ProjectingOptions class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    save_images = property(_IMP_em2d.ProjectingOptions_save_images_get, _IMP_em2d.ProjectingOptions_save_images_set, doc=r"""save_images : bool""")
    normalize = property(_IMP_em2d.ProjectingOptions_normalize_get, _IMP_em2d.ProjectingOptions_normalize_set, doc=r"""normalize : bool""")
    clear_matrix_before_projecting = property(_IMP_em2d.ProjectingOptions_clear_matrix_before_projecting_get, _IMP_em2d.ProjectingOptions_clear_matrix_before_projecting_set, doc=r"""clear_matrix_before_projecting : bool""")

    def __init__(self, *args):
        r"""
        __init__(ProjectingOptions self) -> ProjectingOptions
        __init__(ProjectingOptions self, double ps, double res) -> ProjectingOptions
        __init__(ProjectingOptions self, double ps, double res, ImageReaderWriter irw) -> ProjectingOptions
        """
        _IMP_em2d.ProjectingOptions_swiginit(self, _IMP_em2d.new_ProjectingOptions(*args))

    def show(self, *args):
        r"""show(ProjectingOptions self, _ostream out=std::cout)"""
        return _IMP_em2d.ProjectingOptions_show(self, *args)

    def __str__(self):
        r"""__str__(ProjectingOptions self) -> std::string"""
        return _IMP_em2d.ProjectingOptions___str__(self)

    def __repr__(self):
        r"""__repr__(ProjectingOptions self) -> std::string"""
        return _IMP_em2d.ProjectingOptions___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_ProjectingOptions

# Register ProjectingOptions in _IMP_em2d:
_IMP_em2d.ProjectingOptions_swigregister(ProjectingOptions)


def get_projections(*args):
    r"""
    get_projections(IMP::ParticlesTemp const & ps, IMP::algebra::SphericalVector3Ds const & vs, int rows, int cols, ProjectingOptions options, IMP::Strings names=IMP::Strings()) -> IMP::em2d::Images
    get_projections(IMP::ParticlesTemp const & ps, IMP::em2d::RegistrationResults const & registration_values, int rows, int cols, ProjectingOptions options, IMP::Strings names=IMP::Strings()) -> IMP::em2d::Images
    """
    return _IMP_em2d.get_projections(*args)

def get_projection(*args):
    r"""get_projection(Image img, IMP::ParticlesTemp const & ps, RegistrationResult reg, ProjectingOptions options, IMP::em2d::MasksManagerPtr masks=IMP::em2d::MasksManagerPtr(), IMP::String name="")"""
    return _IMP_em2d.get_projection(*args)

def do_project_particles(ps, m2, R, translation, options, masks):
    r"""do_project_particles(IMP::ParticlesTemp const & ps, cv::Mat & m2, Rotation3D R, Vector3D translation, ProjectingOptions options, IMP::em2d::MasksManagerPtr masks)"""
    return _IMP_em2d.do_project_particles(ps, m2, R, translation, options, masks)

def create_evenly_distributed_projections(ps, n, options):
    r"""create_evenly_distributed_projections(IMP::ParticlesTemp const & ps, unsigned int n, ProjectingOptions options) -> IMP::em2d::Images"""
    return _IMP_em2d.create_evenly_distributed_projections(ps, n, options)

def do_project_vectors(*args):
    r"""
    do_project_vectors(IMP::algebra::Vector3Ds const & ps, Rotation3D R, Vector3D translation) -> IMP::algebra::Vector2Ds
    do_project_vectors(IMP::algebra::Vector3Ds const & ps, Rotation3D R, Vector3D translation, Vector3D center) -> IMP::algebra::Vector2Ds
    """
    return _IMP_em2d.do_project_vectors(*args)

def get_enclosing_image_size(ps, pixel_size, slack):
    r"""get_enclosing_image_size(IMP::ParticlesTemp const & ps, double pixel_size, unsigned int slack) -> unsigned int"""
    return _IMP_em2d.get_enclosing_image_size(ps, pixel_size, slack)

def get_complete_alignment(input, m_to_align, apply=False):
    r"""get_complete_alignment(cv::Mat const & input, cv::Mat & m_to_align, bool apply=False) -> ResultAlign2D"""
    return _IMP_em2d.get_complete_alignment(input, m_to_align, apply)

def get_rotational_alignment(input, m_to_align, apply=False):
    r"""get_rotational_alignment(cv::Mat const & input, cv::Mat & m_to_align, bool apply=False) -> ResultAlign2D"""
    return _IMP_em2d.get_rotational_alignment(input, m_to_align, apply)

def get_translational_alignment(input, m_to_align, apply=False):
    r"""get_translational_alignment(cv::Mat const & input, cv::Mat & m_to_align, bool apply=False) -> ResultAlign2D"""
    return _IMP_em2d.get_translational_alignment(input, m_to_align, apply)

def get_complete_alignment_no_preprocessing(input, INPUT, POLAR1, m_to_align, POLAR2, apply=False):
    r"""get_complete_alignment_no_preprocessing(cv::Mat const & input, cv::Mat const & INPUT, cv::Mat const & POLAR1, cv::Mat & m_to_align, cv::Mat const & POLAR2, bool apply=False) -> ResultAlign2D"""
    return _IMP_em2d.get_complete_alignment_no_preprocessing(input, INPUT, POLAR1, m_to_align, POLAR2, apply)

def get_rotational_alignment_no_preprocessing(POLAR1, POLAR2):
    r"""get_rotational_alignment_no_preprocessing(cv::Mat const & POLAR1, cv::Mat const & POLAR2) -> ResultAlign2D"""
    return _IMP_em2d.get_rotational_alignment_no_preprocessing(POLAR1, POLAR2)

def get_translational_alignment_no_preprocessing(M1, M2):
    r"""get_translational_alignment_no_preprocessing(cv::Mat const & M1, cv::Mat const & M2) -> ResultAlign2D"""
    return _IMP_em2d.get_translational_alignment_no_preprocessing(M1, M2)

def get_complete_alignment_with_centers_no_preprocessing(center1, center2, AUTOC_POLAR1, AUTOC_POLAR2):
    r"""get_complete_alignment_with_centers_no_preprocessing(Vector2D center1, Vector2D center2, cv::Mat const & AUTOC_POLAR1, cv::Mat const & AUTOC_POLAR2) -> ResultAlign2D"""
    return _IMP_em2d.get_complete_alignment_with_centers_no_preprocessing(center1, center2, AUTOC_POLAR1, AUTOC_POLAR2)

def write_vectors_as_pdb(*args):
    r"""
    write_vectors_as_pdb(IMP::algebra::Vector2Ds const vs, IMP::String const filename)
    write_vectors_as_pdb(IMP::algebra::Vector3Ds const vs, IMP::String const filename)
    """
    return _IMP_em2d.write_vectors_as_pdb(*args)
class Em2DRestraintParameters(ProjectingParameters):
    r"""Proxy of C++ IMP::em2d::Em2DRestraintParameters class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    n_projections = property(_IMP_em2d.Em2DRestraintParameters_n_projections_get, _IMP_em2d.Em2DRestraintParameters_n_projections_set, doc=r"""n_projections : unsigned int""")
    coarse_registration_method = property(_IMP_em2d.Em2DRestraintParameters_coarse_registration_method_get, _IMP_em2d.Em2DRestraintParameters_coarse_registration_method_set, doc=r"""coarse_registration_method : unsigned int""")
    save_match_images = property(_IMP_em2d.Em2DRestraintParameters_save_match_images_get, _IMP_em2d.Em2DRestraintParameters_save_match_images_set, doc=r"""save_match_images : bool""")
    optimization_steps = property(_IMP_em2d.Em2DRestraintParameters_optimization_steps_get, _IMP_em2d.Em2DRestraintParameters_optimization_steps_set, doc=r"""optimization_steps : unsigned int""")
    simplex_initial_length = property(_IMP_em2d.Em2DRestraintParameters_simplex_initial_length_get, _IMP_em2d.Em2DRestraintParameters_simplex_initial_length_set, doc=r"""simplex_initial_length : double""")
    simplex_minimum_size = property(_IMP_em2d.Em2DRestraintParameters_simplex_minimum_size_get, _IMP_em2d.Em2DRestraintParameters_simplex_minimum_size_set, doc=r"""simplex_minimum_size : double""")

    def __init__(self, *args):
        r"""
        __init__(Em2DRestraintParameters self) -> Em2DRestraintParameters
        __init__(Em2DRestraintParameters self, double ps, double res, unsigned int n_proj=20) -> Em2DRestraintParameters
        """
        _IMP_em2d.Em2DRestraintParameters_swiginit(self, _IMP_em2d.new_Em2DRestraintParameters(*args))

    def show(self, *args):
        r"""show(Em2DRestraintParameters self, _ostream out=std::cout)"""
        return _IMP_em2d.Em2DRestraintParameters_show(self, *args)

    def __str__(self):
        r"""__str__(Em2DRestraintParameters self) -> std::string"""
        return _IMP_em2d.Em2DRestraintParameters___str__(self)

    def __repr__(self):
        r"""__repr__(Em2DRestraintParameters self) -> std::string"""
        return _IMP_em2d.Em2DRestraintParameters___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_Em2DRestraintParameters

# Register Em2DRestraintParameters in _IMP_em2d:
_IMP_em2d.Em2DRestraintParameters_swigregister(Em2DRestraintParameters)
cvar = _IMP_em2d.cvar
ALIGN2D_NO_PREPROCESSING = cvar.ALIGN2D_NO_PREPROCESSING
ALIGN2D_PREPROCESSING = cvar.ALIGN2D_PREPROCESSING
ALIGN2D_WITH_CENTERS = cvar.ALIGN2D_WITH_CENTERS

class ProjectionFinder(IMP.Object):
    r"""Proxy of C++ IMP::em2d::ProjectionFinder class."""

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

    def __init__(self):
        r"""__init__(ProjectionFinder self) -> ProjectionFinder"""
        _IMP_em2d.ProjectionFinder_swiginit(self, _IMP_em2d.new_ProjectionFinder())

    def setup(self, score_function, params):
        r"""setup(ProjectionFinder self, ScoreFunction score_function, Em2DRestraintParameters params)"""
        return _IMP_em2d.ProjectionFinder_setup(self, score_function, params)

    def set_subjects(self, subjects):
        r"""set_subjects(ProjectionFinder self, IMP::em2d::Images const & subjects)"""
        return _IMP_em2d.ProjectionFinder_set_subjects(self, subjects)

    def set_projections(self, projections):
        r"""set_projections(ProjectionFinder self, IMP::em2d::Images const & projections)"""
        return _IMP_em2d.ProjectionFinder_set_projections(self, projections)

    def set_variance_images(self, variances):
        r"""set_variance_images(ProjectionFinder self, IMP::em2d::Images const & variances)"""
        return _IMP_em2d.ProjectionFinder_set_variance_images(self, variances)

    def set_model_particles(self, ps):
        r"""set_model_particles(ProjectionFinder self, IMP::ParticlesTemp const & ps)"""
        return _IMP_em2d.ProjectionFinder_set_model_particles(self, ps)

    def set_save_match_images(self, x):
        r"""set_save_match_images(ProjectionFinder self, bool x)"""
        return _IMP_em2d.ProjectionFinder_set_save_match_images(self, x)

    def get_save_match_images(self):
        r"""get_save_match_images(ProjectionFinder self) -> bool"""
        return _IMP_em2d.ProjectionFinder_get_save_match_images(self)

    def set_fast_mode(self, n):
        r"""set_fast_mode(ProjectionFinder self, unsigned int n)"""
        return _IMP_em2d.ProjectionFinder_set_fast_mode(self, n)

    def get_registration_results(self):
        r"""get_registration_results(ProjectionFinder self) -> IMP::em2d::RegistrationResults"""
        return _IMP_em2d.ProjectionFinder_get_registration_results(self)

    def get_coarse_registration(self):
        r"""get_coarse_registration(ProjectionFinder self)"""
        return _IMP_em2d.ProjectionFinder_get_coarse_registration(self)

    def get_complete_registration(self):
        r"""get_complete_registration(ProjectionFinder self)"""
        return _IMP_em2d.ProjectionFinder_get_complete_registration(self)

    def get_global_score(self):
        r"""get_global_score(ProjectionFinder self) -> double"""
        return _IMP_em2d.ProjectionFinder_get_global_score(self)

    def show(self, out):
        r"""show(ProjectionFinder self, _ostream out)"""
        return _IMP_em2d.ProjectionFinder_show(self, out)

    def get_preprocessing_time(self):
        r"""get_preprocessing_time(ProjectionFinder self) -> double"""
        return _IMP_em2d.ProjectionFinder_get_preprocessing_time(self)

    def get_coarse_registration_time(self):
        r"""get_coarse_registration_time(ProjectionFinder self) -> double"""
        return _IMP_em2d.ProjectionFinder_get_coarse_registration_time(self)

    def get_fine_registration_time(self):
        r"""get_fine_registration_time(ProjectionFinder self) -> double"""
        return _IMP_em2d.ProjectionFinder_get_fine_registration_time(self)

    def get_number_of_subjects(self):
        r"""get_number_of_subjects(ProjectionFinder self) -> unsigned int"""
        return _IMP_em2d.ProjectionFinder_get_number_of_subjects(self)

    def set_number_of_class_averages_members(self, n_members):
        r"""set_number_of_class_averages_members(ProjectionFinder self, IMP::Ints n_members)"""
        return _IMP_em2d.ProjectionFinder_set_number_of_class_averages_members(self, n_members)

    def get_number_of_projections(self):
        r"""get_number_of_projections(ProjectionFinder self) -> unsigned int"""
        return _IMP_em2d.ProjectionFinder_get_number_of_projections(self)

    def get_version_info(self):
        r"""get_version_info(ProjectionFinder self) -> VersionInfo"""
        return _IMP_em2d.ProjectionFinder_get_version_info(self)

    def __str__(self):
        r"""__str__(ProjectionFinder self) -> std::string"""
        return _IMP_em2d.ProjectionFinder___str__(self)

    def __repr__(self):
        r"""__repr__(ProjectionFinder self) -> std::string"""
        return _IMP_em2d.ProjectionFinder___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_ProjectionFinder(o)


# Register ProjectionFinder in _IMP_em2d:
_IMP_em2d.ProjectionFinder_swigregister(ProjectionFinder)

class Em2DRestraint(IMP.Restraint):
    r"""Proxy of C++ IMP::em2d::Em2DRestraint class."""

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

    def __init__(self, m):
        r"""__init__(Em2DRestraint self, Model m) -> Em2DRestraint"""
        _IMP_em2d.Em2DRestraint_swiginit(self, _IMP_em2d.new_Em2DRestraint(m))

    def setup(self, score_function, params):
        r"""setup(Em2DRestraint self, ScoreFunction score_function, Em2DRestraintParameters params)"""
        return _IMP_em2d.Em2DRestraint_setup(self, score_function, params)

    def set_particles(self, particles_container):
        r"""set_particles(Em2DRestraint self, SingletonContainer particles_container)"""
        return _IMP_em2d.Em2DRestraint_set_particles(self, particles_container)

    def set_images(self, em_images):
        r"""set_images(Em2DRestraint self, IMP::em2d::Images const em_images)"""
        return _IMP_em2d.Em2DRestraint_set_images(self, em_images)

    def set_variance_images(self, variance_images):
        r"""set_variance_images(Em2DRestraint self, IMP::em2d::Images const variance_images)"""
        return _IMP_em2d.Em2DRestraint_set_variance_images(self, variance_images)

    def set_fast_mode(self, n):
        r"""set_fast_mode(Em2DRestraint self, unsigned int n)"""
        return _IMP_em2d.Em2DRestraint_set_fast_mode(self, n)

    def set_coarse_registration_mode(self, opt):
        r"""set_coarse_registration_mode(Em2DRestraint self, bool opt)"""
        return _IMP_em2d.Em2DRestraint_set_coarse_registration_mode(self, opt)

    def get_registration_results(self):
        r"""get_registration_results(Em2DRestraint self) -> IMP::em2d::RegistrationResults"""
        return _IMP_em2d.Em2DRestraint_get_registration_results(self)

    def do_get_inputs(self):
        r"""do_get_inputs(Em2DRestraint self) -> IMP::ModelObjectsTemp"""
        return _IMP_em2d.Em2DRestraint_do_get_inputs(self)

    def get_version_info(self):
        r"""get_version_info(Em2DRestraint self) -> VersionInfo"""
        return _IMP_em2d.Em2DRestraint_get_version_info(self)

    def __str__(self):
        r"""__str__(Em2DRestraint self) -> std::string"""
        return _IMP_em2d.Em2DRestraint___str__(self)

    def __repr__(self):
        r"""__repr__(Em2DRestraint self) -> std::string"""
        return _IMP_em2d.Em2DRestraint___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_Em2DRestraint(o)


# Register Em2DRestraint in _IMP_em2d:
_IMP_em2d.Em2DRestraint_swigregister(Em2DRestraint)

class ClusterSet(object):
    r"""Proxy of C++ IMP::em2d::ClusterSet class."""

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

    def __init__(self, N):
        r"""__init__(ClusterSet self, unsigned int N) -> ClusterSet"""
        _IMP_em2d.ClusterSet_swiginit(self, _IMP_em2d.new_ClusterSet(N))

    def do_join_clusters(self, cluster_id1, cluster_id2, distance_between_clusters):
        r"""do_join_clusters(ClusterSet self, unsigned int cluster_id1, unsigned int cluster_id2, double distance_between_clusters)"""
        return _IMP_em2d.ClusterSet_do_join_clusters(self, cluster_id1, cluster_id2, distance_between_clusters)

    def get_cluster_elements(self, id):
        r"""get_cluster_elements(ClusterSet self, unsigned int id) -> IMP::Ints"""
        return _IMP_em2d.ClusterSet_get_cluster_elements(self, id)

    def get_clusters_below_cutoff(self, cutoff):
        r"""get_clusters_below_cutoff(ClusterSet self, double cutoff) -> IMP::Ints"""
        return _IMP_em2d.ClusterSet_get_clusters_below_cutoff(self, cutoff)

    def get_cluster_formed_at_step(self, step):
        r"""get_cluster_formed_at_step(ClusterSet self, unsigned int step) -> IMP::Ints"""
        return _IMP_em2d.ClusterSet_get_cluster_formed_at_step(self, step)

    def get_distance_at_step(self, step):
        r"""get_distance_at_step(ClusterSet self, unsigned int step) -> double"""
        return _IMP_em2d.ClusterSet_get_distance_at_step(self, step)

    def get_id_for_cluster_at_step(self, step):
        r"""get_id_for_cluster_at_step(ClusterSet self, unsigned int step) -> unsigned int"""
        return _IMP_em2d.ClusterSet_get_id_for_cluster_at_step(self, step)

    def get_linkage_matrix(self):
        r"""get_linkage_matrix(ClusterSet self) -> IMP::FloatsList"""
        return _IMP_em2d.ClusterSet_get_linkage_matrix(self)

    def get_linkage_matrix_in_matlab_format(self):
        r"""get_linkage_matrix_in_matlab_format(ClusterSet self) -> IMP::FloatsList"""
        return _IMP_em2d.ClusterSet_get_linkage_matrix_in_matlab_format(self)

    def get_number_of_steps(self):
        r"""get_number_of_steps(ClusterSet self) -> unsigned int"""
        return _IMP_em2d.ClusterSet_get_number_of_steps(self)

    def show(self, out):
        r"""show(ClusterSet self, _ostream out)"""
        return _IMP_em2d.ClusterSet_show(self, out)

    def __str__(self):
        r"""__str__(ClusterSet self) -> std::string"""
        return _IMP_em2d.ClusterSet___str__(self)

    def __repr__(self):
        r"""__repr__(ClusterSet self) -> std::string"""
        return _IMP_em2d.ClusterSet___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_ClusterSet

# Register ClusterSet in _IMP_em2d:
_IMP_em2d.ClusterSet_swigregister(ClusterSet)

class SingleLinkage(object):
    r"""Proxy of C++ IMP::em2d::SingleLinkage class."""

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

    def __init__(self):
        r"""__init__(SingleLinkage self) -> SingleLinkage"""
        _IMP_em2d.SingleLinkage_swiginit(self, _IMP_em2d.new_SingleLinkage())

    def __call__(self, id1, id2, cluster_set, distances):
        r"""__call__(SingleLinkage self, unsigned int id1, unsigned int id2, ClusterSet cluster_set, IMP::FloatsList const & distances) -> double"""
        return _IMP_em2d.SingleLinkage___call__(self, id1, id2, cluster_set, distances)

    def show(self, out):
        r"""show(SingleLinkage self, _ostream out)"""
        return _IMP_em2d.SingleLinkage_show(self, out)

    def __str__(self):
        r"""__str__(SingleLinkage self) -> std::string"""
        return _IMP_em2d.SingleLinkage___str__(self)

    def __repr__(self):
        r"""__repr__(SingleLinkage self) -> std::string"""
        return _IMP_em2d.SingleLinkage___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_SingleLinkage

# Register SingleLinkage in _IMP_em2d:
_IMP_em2d.SingleLinkage_swigregister(SingleLinkage)

class CompleteLinkage(object):
    r"""Proxy of C++ IMP::em2d::CompleteLinkage class."""

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

    def __init__(self):
        r"""__init__(CompleteLinkage self) -> CompleteLinkage"""
        _IMP_em2d.CompleteLinkage_swiginit(self, _IMP_em2d.new_CompleteLinkage())

    def __call__(self, id1, id2, cluster_set, distances):
        r"""__call__(CompleteLinkage self, unsigned int id1, unsigned int id2, ClusterSet cluster_set, IMP::FloatsList const & distances) -> double"""
        return _IMP_em2d.CompleteLinkage___call__(self, id1, id2, cluster_set, distances)

    def show(self, out):
        r"""show(CompleteLinkage self, _ostream out)"""
        return _IMP_em2d.CompleteLinkage_show(self, out)

    def __str__(self):
        r"""__str__(CompleteLinkage self) -> std::string"""
        return _IMP_em2d.CompleteLinkage___str__(self)

    def __repr__(self):
        r"""__repr__(CompleteLinkage self) -> std::string"""
        return _IMP_em2d.CompleteLinkage___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_CompleteLinkage

# Register CompleteLinkage in _IMP_em2d:
_IMP_em2d.CompleteLinkage_swigregister(CompleteLinkage)

class AverageDistanceLinkage(object):
    r"""Proxy of C++ IMP::em2d::AverageDistanceLinkage class."""

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

    def __init__(self):
        r"""__init__(AverageDistanceLinkage self) -> AverageDistanceLinkage"""
        _IMP_em2d.AverageDistanceLinkage_swiginit(self, _IMP_em2d.new_AverageDistanceLinkage())

    def __call__(self, id1, id2, cluster_set, distances):
        r"""__call__(AverageDistanceLinkage self, unsigned int id1, unsigned int id2, ClusterSet cluster_set, IMP::FloatsList const & distances) -> double"""
        return _IMP_em2d.AverageDistanceLinkage___call__(self, id1, id2, cluster_set, distances)

    def show(self, out):
        r"""show(AverageDistanceLinkage self, _ostream out)"""
        return _IMP_em2d.AverageDistanceLinkage_show(self, out)

    def __str__(self):
        r"""__str__(AverageDistanceLinkage self) -> std::string"""
        return _IMP_em2d.AverageDistanceLinkage___str__(self)

    def __repr__(self):
        r"""__repr__(AverageDistanceLinkage self) -> std::string"""
        return _IMP_em2d.AverageDistanceLinkage___repr__(self)
    __swig_destroy__ = _IMP_em2d.delete_AverageDistanceLinkage

# Register AverageDistanceLinkage in _IMP_em2d:
_IMP_em2d.AverageDistanceLinkage_swigregister(AverageDistanceLinkage)

class CollisionCrossSection(IMP.Object):
    r"""Proxy of C++ IMP::em2d::CollisionCrossSection class."""

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

    def __init__(self, n_projections, resolution, pixel_size, projection_image_size):
        r"""__init__(CollisionCrossSection self, unsigned int n_projections, double resolution, double pixel_size, double projection_image_size) -> CollisionCrossSection"""
        _IMP_em2d.CollisionCrossSection_swiginit(self, _IMP_em2d.new_CollisionCrossSection(n_projections, resolution, pixel_size, projection_image_size))

    def set_model_particles(self, ps):
        r"""set_model_particles(CollisionCrossSection self, IMP::ParticlesTemp const & ps)"""
        return _IMP_em2d.CollisionCrossSection_set_model_particles(self, ps)

    def get_ccs(self):
        r"""get_ccs(CollisionCrossSection self) -> double"""
        return _IMP_em2d.CollisionCrossSection_get_ccs(self)

    def show(self, out):
        r"""show(CollisionCrossSection self, _ostream out)"""
        return _IMP_em2d.CollisionCrossSection_show(self, out)

    def get_version_info(self):
        r"""get_version_info(CollisionCrossSection self) -> VersionInfo"""
        return _IMP_em2d.CollisionCrossSection_get_version_info(self)

    def __str__(self):
        r"""__str__(CollisionCrossSection self) -> std::string"""
        return _IMP_em2d.CollisionCrossSection___str__(self)

    def __repr__(self):
        r"""__repr__(CollisionCrossSection self) -> std::string"""
        return _IMP_em2d.CollisionCrossSection___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_CollisionCrossSection(o)


# Register CollisionCrossSection in _IMP_em2d:
_IMP_em2d.CollisionCrossSection_swigregister(CollisionCrossSection)

class GridStates(IMP.domino.ParticleStates):
    r"""Proxy of C++ IMP::em2d::GridStates class."""

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

    def __init__(self, *args):
        r"""__init__(GridStates self, IMP::algebra::Vector3Ds const & positions, IMP::algebra::Rotation3Ds const & orientations, IMP::String const & name="GridStates") -> GridStates"""
        _IMP_em2d.GridStates_swiginit(self, _IMP_em2d.new_GridStates(*args))

    def get_position(self, i):
        r"""get_position(GridStates self, unsigned int i) -> Vector3D"""
        return _IMP_em2d.GridStates_get_position(self, i)

    def get_orientation(self, i):
        r"""get_orientation(GridStates self, unsigned int i) -> Rotation3D"""
        return _IMP_em2d.GridStates_get_orientation(self, i)

    def get_version_info(self):
        r"""get_version_info(GridStates self) -> VersionInfo"""
        return _IMP_em2d.GridStates_get_version_info(self)

    def __str__(self):
        r"""__str__(GridStates self) -> std::string"""
        return _IMP_em2d.GridStates___str__(self)

    def __repr__(self):
        r"""__repr__(GridStates self) -> std::string"""
        return _IMP_em2d.GridStates___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_GridStates(o)


# Register GridStates in _IMP_em2d:
_IMP_em2d.GridStates_swigregister(GridStates)

class ProjectionStates(GridStates):
    r"""Proxy of C++ IMP::em2d::ProjectionStates class."""

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

    def __init__(self, *args):
        r"""__init__(ProjectionStates self, IMP::algebra::Vector3Ds const & positions, IMP::algebra::Rotation3Ds const & orientations, IMP::em2d::Images const & projections, IMP::String const & name="ProjectionStates") -> ProjectionStates"""
        _IMP_em2d.ProjectionStates_swiginit(self, _IMP_em2d.new_ProjectionStates(*args))

    def get_projection(self, i):
        r"""get_projection(ProjectionStates self, unsigned int i) -> Image"""
        return _IMP_em2d.ProjectionStates_get_projection(self, i)

    def __str__(self):
        r"""__str__(ProjectionStates self) -> std::string"""
        return _IMP_em2d.ProjectionStates___str__(self)

    def __repr__(self):
        r"""__repr__(ProjectionStates self) -> std::string"""
        return _IMP_em2d.ProjectionStates___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_ProjectionStates(o)


# Register ProjectionStates in _IMP_em2d:
_IMP_em2d.ProjectionStates_swigregister(ProjectionStates)

class DistanceFilter(IMP.domino.SubsetFilter):
    r"""Proxy of C++ IMP::em2d::DistanceFilter class."""

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

    def __init__(self, subset_to_act_on, subset_to_restrain, ps_table, max_distance):
        r"""__init__(DistanceFilter self, Subset subset_to_act_on, Subset subset_to_restrain, ParticleStatesTable ps_table, double max_distance) -> DistanceFilter"""
        _IMP_em2d.DistanceFilter_swiginit(self, _IMP_em2d.new_DistanceFilter(subset_to_act_on, subset_to_restrain, ps_table, max_distance))

    def show(self, *args):
        r"""show(DistanceFilter self, _ostream out=std::cout)"""
        return _IMP_em2d.DistanceFilter_show(self, *args)

    def get_version_info(self):
        r"""get_version_info(DistanceFilter self) -> VersionInfo"""
        return _IMP_em2d.DistanceFilter_get_version_info(self)

    def __str__(self):
        r"""__str__(DistanceFilter self) -> std::string"""
        return _IMP_em2d.DistanceFilter___str__(self)

    def __repr__(self):
        r"""__repr__(DistanceFilter self) -> std::string"""
        return _IMP_em2d.DistanceFilter___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_DistanceFilter(o)


# Register DistanceFilter in _IMP_em2d:
_IMP_em2d.DistanceFilter_swigregister(DistanceFilter)

class DistanceFilterTable(IMP.domino.SubsetFilterTable):
    r"""Proxy of C++ IMP::em2d::DistanceFilterTable class."""

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

    def __init__(self, subset_to_act_on, ps_table, max_distance):
        r"""__init__(DistanceFilterTable self, Subset subset_to_act_on, ParticleStatesTable ps_table, double max_distance) -> DistanceFilterTable"""
        _IMP_em2d.DistanceFilterTable_swiginit(self, _IMP_em2d.new_DistanceFilterTable(subset_to_act_on, ps_table, max_distance))

    def show(self, *args):
        r"""show(DistanceFilterTable self, _ostream out=std::cout)"""
        return _IMP_em2d.DistanceFilterTable_show(self, *args)

    def get_version_info(self):
        r"""get_version_info(DistanceFilterTable self) -> VersionInfo"""
        return _IMP_em2d.DistanceFilterTable_get_version_info(self)

    def __str__(self):
        r"""__str__(DistanceFilterTable self) -> std::string"""
        return _IMP_em2d.DistanceFilterTable___str__(self)

    def __repr__(self):
        r"""__repr__(DistanceFilterTable self) -> std::string"""
        return _IMP_em2d.DistanceFilterTable___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_DistanceFilterTable(o)


# Register DistanceFilterTable in _IMP_em2d:
_IMP_em2d.DistanceFilterTable_swigregister(DistanceFilterTable)

class IntsOrder(object):
    r"""Proxy of C++ IMP::em2d::IntsOrder class."""

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

    def __call__(self, a, b):
        r"""__call__(IntsOrder self, IMP::Ints const & a, IMP::Ints const & b) -> bool"""
        return _IMP_em2d.IntsOrder___call__(self, a, b)

    def __init__(self):
        r"""__init__(IntsOrder self) -> IntsOrder"""
        _IMP_em2d.IntsOrder_swiginit(self, _IMP_em2d.new_IntsOrder())
    __swig_destroy__ = _IMP_em2d.delete_IntsOrder

# Register IntsOrder in _IMP_em2d:
_IMP_em2d.IntsOrder_swigregister(IntsOrder)

class RigidBodiesImageFitRestraint(IMP.Restraint):
    r"""Proxy of C++ IMP::em2d::RigidBodiesImageFitRestraint class."""

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

    def get_version_info(self):
        r"""get_version_info(RigidBodiesImageFitRestraint self) -> VersionInfo"""
        return _IMP_em2d.RigidBodiesImageFitRestraint_get_version_info(self)

    def __init__(self, scf, rbs, img):
        r"""__init__(RigidBodiesImageFitRestraint self, ScoreFunction scf, IMP::core::RigidBodies const & rbs, Image img) -> RigidBodiesImageFitRestraint"""
        _IMP_em2d.RigidBodiesImageFitRestraint_swiginit(self, _IMP_em2d.new_RigidBodiesImageFitRestraint(scf, rbs, img))

    def set_projecting_parameters(self, p):
        r"""set_projecting_parameters(RigidBodiesImageFitRestraint self, ProjectingParameters p)"""
        return _IMP_em2d.RigidBodiesImageFitRestraint_set_projecting_parameters(self, p)

    def set_orientations(self, rb, rots):
        r"""set_orientations(RigidBodiesImageFitRestraint self, RigidBody rb, IMP::algebra::Rotation3Ds const & rots)"""
        return _IMP_em2d.RigidBodiesImageFitRestraint_set_orientations(self, rb, rots)

    def get_number_of_masks(self, rb):
        r"""get_number_of_masks(RigidBodiesImageFitRestraint self, RigidBody rb) -> unsigned int"""
        return _IMP_em2d.RigidBodiesImageFitRestraint_get_number_of_masks(self, rb)

    def __str__(self):
        r"""__str__(RigidBodiesImageFitRestraint self) -> std::string"""
        return _IMP_em2d.RigidBodiesImageFitRestraint___str__(self)

    def __repr__(self):
        r"""__repr__(RigidBodiesImageFitRestraint self) -> std::string"""
        return _IMP_em2d.RigidBodiesImageFitRestraint___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_RigidBodiesImageFitRestraint(o)


# Register RigidBodiesImageFitRestraint in _IMP_em2d:
_IMP_em2d.RigidBodiesImageFitRestraint_swigregister(RigidBodiesImageFitRestraint)


def get_unique_index(rot):
    r"""get_unique_index(Rotation3D rot) -> IMP::Ints"""
    return _IMP_em2d.get_unique_index(rot)
class RelativePositionMover(IMP.core.RigidBodyMover):
    r"""Proxy of C++ IMP::em2d::RelativePositionMover class."""

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

    def __init__(self, d, max_translation, max_rotation):
        r"""__init__(RelativePositionMover self, RigidBody d, IMP::Float max_translation, IMP::Float max_rotation) -> RelativePositionMover"""
        _IMP_em2d.RelativePositionMover_swiginit(self, _IMP_em2d.new_RelativePositionMover(d, max_translation, max_rotation))

    def add_internal_transformations(self, d, transforms):
        r"""add_internal_transformations(RelativePositionMover self, RigidBody d, IMP::algebra::Transformation3Ds transforms)"""
        return _IMP_em2d.RelativePositionMover_add_internal_transformations(self, d, transforms)

    def set_random_move_probability(self, p):
        r"""set_random_move_probability(RelativePositionMover self, IMP::Float p)"""
        return _IMP_em2d.RelativePositionMover_set_random_move_probability(self, p)

    def __str__(self):
        r"""__str__(RelativePositionMover self) -> std::string"""
        return _IMP_em2d.RelativePositionMover___str__(self)

    def __repr__(self):
        r"""__repr__(RelativePositionMover self) -> std::string"""
        return _IMP_em2d.RelativePositionMover___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_RelativePositionMover(o)


# Register RelativePositionMover in _IMP_em2d:
_IMP_em2d.RelativePositionMover_swigregister(RelativePositionMover)

class DummyRestraint(IMP.Restraint):
    r"""Proxy of C++ IMP::em2d::DummyRestraint class."""

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

    def __init__(self, p, q):
        r"""__init__(DummyRestraint self, Particle p, Particle q) -> DummyRestraint"""
        _IMP_em2d.DummyRestraint_swiginit(self, _IMP_em2d.new_DummyRestraint(p, q))

    def show(self, *args):
        r"""show(DummyRestraint self, _ostream out=std::cout)"""
        return _IMP_em2d.DummyRestraint_show(self, *args)

    def do_get_inputs(self):
        r"""do_get_inputs(DummyRestraint self) -> IMP::ModelObjectsTemp"""
        return _IMP_em2d.DummyRestraint_do_get_inputs(self)

    def get_version_info(self):
        r"""get_version_info(DummyRestraint self) -> VersionInfo"""
        return _IMP_em2d.DummyRestraint_get_version_info(self)

    def __str__(self):
        r"""__str__(DummyRestraint self) -> std::string"""
        return _IMP_em2d.DummyRestraint___str__(self)

    def __repr__(self):
        r"""__repr__(DummyRestraint self) -> std::string"""
        return _IMP_em2d.DummyRestraint___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_DummyRestraint(o)


# Register DummyRestraint in _IMP_em2d:
_IMP_em2d.DummyRestraint_swigregister(DummyRestraint)

class ParticlesDummyRestraint(IMP.Restraint):
    r"""Proxy of C++ IMP::em2d::ParticlesDummyRestraint class."""

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

    def __init__(self, sc):
        r"""__init__(ParticlesDummyRestraint self, SingletonContainer sc) -> ParticlesDummyRestraint"""
        _IMP_em2d.ParticlesDummyRestraint_swiginit(self, _IMP_em2d.new_ParticlesDummyRestraint(sc))

    def show(self, *args):
        r"""show(ParticlesDummyRestraint self, _ostream out=std::cout)"""
        return _IMP_em2d.ParticlesDummyRestraint_show(self, *args)

    def do_get_inputs(self):
        r"""do_get_inputs(ParticlesDummyRestraint self) -> IMP::ModelObjectsTemp"""
        return _IMP_em2d.ParticlesDummyRestraint_do_get_inputs(self)

    def get_version_info(self):
        r"""get_version_info(ParticlesDummyRestraint self) -> VersionInfo"""
        return _IMP_em2d.ParticlesDummyRestraint_get_version_info(self)

    def __str__(self):
        r"""__str__(ParticlesDummyRestraint self) -> std::string"""
        return _IMP_em2d.ParticlesDummyRestraint___str__(self)

    def __repr__(self):
        r"""__repr__(ParticlesDummyRestraint self) -> std::string"""
        return _IMP_em2d.ParticlesDummyRestraint___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_ParticlesDummyRestraint(o)


# Register ParticlesDummyRestraint in _IMP_em2d:
_IMP_em2d.ParticlesDummyRestraint_swigregister(ParticlesDummyRestraint)

class PCAFitRestraint(IMP.Restraint):
    r"""Proxy of C++ IMP::em2d::PCAFitRestraint class."""

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

    def __init__(self, particles, image_files, pixel_size, resolution=10.0, projection_number=100, reuse_direction=False, n_components=1):
        r"""__init__(PCAFitRestraint self, IMP::Particles particles, Strings image_files, double pixel_size, double resolution=10.0, unsigned int projection_number=100, bool reuse_direction=False, unsigned int n_components=1) -> PCAFitRestraint"""
        _IMP_em2d.PCAFitRestraint_swiginit(self, _IMP_em2d.new_PCAFitRestraint(particles, image_files, pixel_size, resolution, projection_number, reuse_direction, n_components))

    def get_projection_number(self):
        r"""get_projection_number(PCAFitRestraint self) -> unsigned int"""
        return _IMP_em2d.PCAFitRestraint_get_projection_number(self)

    def set_projection_number(self, n):
        r"""set_projection_number(PCAFitRestraint self, unsigned int n)"""
        return _IMP_em2d.PCAFitRestraint_set_projection_number(self, n)

    def get_transformation(self, image_number):
        r"""get_transformation(PCAFitRestraint self, unsigned int image_number) -> Transformation3D"""
        return _IMP_em2d.PCAFitRestraint_get_transformation(self, image_number)

    def get_cross_correlation_coefficient(self, image_number):
        r"""get_cross_correlation_coefficient(PCAFitRestraint self, unsigned int image_number) -> double"""
        return _IMP_em2d.PCAFitRestraint_get_cross_correlation_coefficient(self, image_number)

    def write_best_projections(self, file_name, evaluate=False):
        r"""write_best_projections(PCAFitRestraint self, std::string file_name, bool evaluate=False)"""
        return _IMP_em2d.PCAFitRestraint_write_best_projections(self, file_name, evaluate)

    def do_get_inputs(self):
        r"""do_get_inputs(PCAFitRestraint self) -> IMP::ModelObjectsTemp"""
        return _IMP_em2d.PCAFitRestraint_do_get_inputs(self)

    def get_version_info(self):
        r"""get_version_info(PCAFitRestraint self) -> VersionInfo"""
        return _IMP_em2d.PCAFitRestraint_get_version_info(self)

    def __str__(self):
        r"""__str__(PCAFitRestraint self) -> std::string"""
        return _IMP_em2d.PCAFitRestraint___str__(self)

    def __repr__(self):
        r"""__repr__(PCAFitRestraint self) -> std::string"""
        return _IMP_em2d.PCAFitRestraint___repr__(self)

    @staticmethod
    def get_from(o):
       return _object_cast_to_em2dPCAFitRestraint(o)


# Register PCAFitRestraint in _IMP_em2d:
_IMP_em2d.PCAFitRestraint_swigregister(PCAFitRestraint)

class ResultAlign2D(object):
    r"""Proxy of C++ std::pair< IMP::algebra::Transformation2D,double > class."""

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

    def __init__(self, *args):
        r"""
        __init__(ResultAlign2D self) -> ResultAlign2D
        __init__(ResultAlign2D self, Transformation2D first, double second) -> ResultAlign2D
        __init__(ResultAlign2D self, ResultAlign2D other) -> ResultAlign2D
        """
        _IMP_em2d.ResultAlign2D_swiginit(self, _IMP_em2d.new_ResultAlign2D(*args))
    first = property(_IMP_em2d.ResultAlign2D_first_get, _IMP_em2d.ResultAlign2D_first_set, doc=r"""first : IMP::algebra::Transformation2D""")
    second = property(_IMP_em2d.ResultAlign2D_second_get, _IMP_em2d.ResultAlign2D_second_set, doc=r"""second : double""")
    def __len__(self):
        return 2
    def __repr__(self):
        return str((self.first, self.second))
    def __getitem__(self, index): 
        if not (index % 2):
            return self.first
        else:
            return self.second
    def __setitem__(self, index, val):
        if not (index % 2):
            self.first = val
        else:
            self.second = val
    __swig_destroy__ = _IMP_em2d.delete_ResultAlign2D

# Register ResultAlign2D in _IMP_em2d:
_IMP_em2d.ResultAlign2D_swigregister(ResultAlign2D)


def _do_hierarchical_clustering_single_linkage(distances):
    r"""_do_hierarchical_clustering_single_linkage(IMP::FloatsList const & distances) -> ClusterSet"""
    return _IMP_em2d._do_hierarchical_clustering_single_linkage(distances)

def _do_hierarchical_clustering_complete_linkage(distances):
    r"""_do_hierarchical_clustering_complete_linkage(IMP::FloatsList const & distances) -> ClusterSet"""
    return _IMP_em2d._do_hierarchical_clustering_complete_linkage(distances)

def _do_hierarchical_clustering_average_distance_linkage(distances):
    r"""_do_hierarchical_clustering_average_distance_linkage(IMP::FloatsList const & distances) -> ClusterSet"""
    return _IMP_em2d._do_hierarchical_clustering_average_distance_linkage(distances)

do_hierarchical_clustering_single_linkage = _do_hierarchical_clustering_single_linkage
do_hierarchical_clustering_complete_linkage = _do_hierarchical_clustering_complete_linkage
do_hierarchical_clustering_average_distance_linkage = _do_hierarchical_clustering_average_distance_linkage


def get_module_version():
    r"""get_module_version() -> std::string const"""
    return _IMP_em2d.get_module_version()

def get_example_path(fname):
    r"""get_example_path(std::string fname) -> std::string"""
    return _IMP_em2d.get_example_path(fname)

def get_data_path(fname):
    r"""get_data_path(std::string fname) -> std::string"""
    return _IMP_em2d.get_data_path(fname)

from . import _version_check
_version_check.check_version(get_module_version())
__version__ = get_module_version()



