IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
em2d/__init__.py
1 # This file was automatically generated by SWIG (https://www.swig.org).
2 # Version 4.3.0
3 #
4 # Do not make changes to this file unless you know what you are doing - modify
5 # the SWIG interface file instead.
6 
7 
8 # This wrapper is part of IMP,
9 # Copyright 2007-2024 IMP Inventors. All rights reserved.
10 
11 
12 
13 
14 from sys import version_info as _swig_python_version_info
15 import _IMP_em2d
16 
17 try:
18  import builtins as __builtin__
19 except ImportError:
20  import __builtin__
21 
22 def _swig_repr(self):
23  try:
24  strthis = "proxy of " + self.this.__repr__()
25  except __builtin__.Exception:
26  strthis = ""
27  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
28 
29 
30 def _swig_setattr_nondynamic_instance_variable(set):
31  def set_instance_attr(self, name, value):
32  if name == "this":
33  set(self, name, value)
34  elif name == "thisown":
35  self.this.own(value)
36  elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
37  set(self, name, value)
38  else:
39  raise AttributeError("You cannot add instance attributes to %s" % self)
40  return set_instance_attr
41 
42 
43 def _swig_setattr_nondynamic_class_variable(set):
44  def set_class_attr(cls, name, value):
45  if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
46  set(cls, name, value)
47  else:
48  raise AttributeError("You cannot add class attributes to %s" % cls)
49  return set_class_attr
50 
51 
52 def _swig_add_metaclass(metaclass):
53  """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
54  def wrapper(cls):
55  return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
56  return wrapper
57 
58 
59 class _SwigNonDynamicMeta(type):
60  """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
61  __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
62 
63 
64 import weakref
65 
66 class IMP_EM2D_SwigPyIterator(object):
67  r"""Proxy of C++ swig::IMP_EM2D_SwigPyIterator class."""
68 
69  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
70 
71  def __init__(self, *args, **kwargs):
72  raise AttributeError("No constructor defined - class is abstract")
73  __repr__ = _swig_repr
74  __swig_destroy__ = _IMP_em2d.delete_IMP_EM2D_SwigPyIterator
75 
76  def value(self):
77  r"""value(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
78  return _IMP_em2d.IMP_EM2D_SwigPyIterator_value(self)
79 
80  def incr(self, n=1):
81  r"""incr(IMP_EM2D_SwigPyIterator self, size_t n=1) -> IMP_EM2D_SwigPyIterator"""
82  return _IMP_em2d.IMP_EM2D_SwigPyIterator_incr(self, n)
83 
84  def decr(self, n=1):
85  r"""decr(IMP_EM2D_SwigPyIterator self, size_t n=1) -> IMP_EM2D_SwigPyIterator"""
86  return _IMP_em2d.IMP_EM2D_SwigPyIterator_decr(self, n)
87 
88  def distance(self, x):
89  r"""distance(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> ptrdiff_t"""
90  return _IMP_em2d.IMP_EM2D_SwigPyIterator_distance(self, x)
91 
92  def equal(self, x):
93  r"""equal(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> bool"""
94  return _IMP_em2d.IMP_EM2D_SwigPyIterator_equal(self, x)
95 
96  def copy(self):
97  r"""copy(IMP_EM2D_SwigPyIterator self) -> IMP_EM2D_SwigPyIterator"""
98  return _IMP_em2d.IMP_EM2D_SwigPyIterator_copy(self)
99 
100  def next(self):
101  r"""next(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
102  return _IMP_em2d.IMP_EM2D_SwigPyIterator_next(self)
103 
104  def __next__(self):
105  r"""__next__(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
106  return _IMP_em2d.IMP_EM2D_SwigPyIterator___next__(self)
107 
108  def previous(self):
109  r"""previous(IMP_EM2D_SwigPyIterator self) -> PyObject *"""
110  return _IMP_em2d.IMP_EM2D_SwigPyIterator_previous(self)
111 
112  def advance(self, n):
113  r"""advance(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
114  return _IMP_em2d.IMP_EM2D_SwigPyIterator_advance(self, n)
115 
116  def __eq__(self, x):
117  r"""__eq__(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> bool"""
118  return _IMP_em2d.IMP_EM2D_SwigPyIterator___eq__(self, x)
119 
120  def __ne__(self, x):
121  r"""__ne__(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> bool"""
122  return _IMP_em2d.IMP_EM2D_SwigPyIterator___ne__(self, x)
123 
124  def __iadd__(self, n):
125  r"""__iadd__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
126  return _IMP_em2d.IMP_EM2D_SwigPyIterator___iadd__(self, n)
127 
128  def __isub__(self, n):
129  r"""__isub__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
130  return _IMP_em2d.IMP_EM2D_SwigPyIterator___isub__(self, n)
131 
132  def __add__(self, n):
133  r"""__add__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator"""
134  return _IMP_em2d.IMP_EM2D_SwigPyIterator___add__(self, n)
135 
136  def __sub__(self, *args):
137  r"""
138  __sub__(IMP_EM2D_SwigPyIterator self, ptrdiff_t n) -> IMP_EM2D_SwigPyIterator
139  __sub__(IMP_EM2D_SwigPyIterator self, IMP_EM2D_SwigPyIterator x) -> ptrdiff_t
140  """
141  return _IMP_em2d.IMP_EM2D_SwigPyIterator___sub__(self, *args)
142  def __iter__(self):
143  return self
144 
145 # Register IMP_EM2D_SwigPyIterator in _IMP_em2d:
146 _IMP_em2d.IMP_EM2D_SwigPyIterator_swigregister(IMP_EM2D_SwigPyIterator)
147 
148 _value_types=[]
149 _object_types=[]
150 _raii_types=[]
151 _plural_types=[]
152 
153 IMP_DEBUG = _IMP_em2d.IMP_DEBUG
154 
155 IMP_RELEASE = _IMP_em2d.IMP_RELEASE
156 
157 IMP_SILENT = _IMP_em2d.IMP_SILENT
158 
159 IMP_PROGRESS = _IMP_em2d.IMP_PROGRESS
160 
161 IMP_TERSE = _IMP_em2d.IMP_TERSE
162 
163 IMP_VERBOSE = _IMP_em2d.IMP_VERBOSE
164 
165 IMP_MEMORY = _IMP_em2d.IMP_MEMORY
166 
167 IMP_NONE = _IMP_em2d.IMP_NONE
168 
169 IMP_USAGE = _IMP_em2d.IMP_USAGE
170 
171 IMP_INTERNAL = _IMP_em2d.IMP_INTERNAL
172 
173 IMP_KERNEL_HAS_LOG4CXX = _IMP_em2d.IMP_KERNEL_HAS_LOG4CXX
174 
175 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_em2d.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
176 
177 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_em2d.IMP_COMPILER_HAS_DEBUG_VECTOR
178 
179 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_em2d.IMP_COMPILER_HAS_RANDOM_SHUFFLE
180 
181 IMP_COMPILER_HAS_THREE_WAY = _IMP_em2d.IMP_COMPILER_HAS_THREE_WAY
182 
183 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_em2d.IMP_KERNEL_HAS_BOOST_RANDOM
184 
185 IMP_KERNEL_HAS_NUMPY = _IMP_em2d.IMP_KERNEL_HAS_NUMPY
186 
187 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_em2d.IMP_KERNEL_HAS_GPERFTOOLS
188 
189 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_em2d.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
190 
191 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_em2d.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
192 
193 IMPKERNEL_SHOW_WARNINGS = _IMP_em2d.IMPKERNEL_SHOW_WARNINGS
194 
195 
196 import sys
197 class _DirectorObjects:
198  """@internal Simple class to keep references to director objects
199  to prevent premature deletion."""
200  def __init__(self):
201  self._objects = []
202  def register(self, obj):
203  """Take a reference to a director object; will only work for
204  refcounted C++ classes"""
205  if hasattr(obj, 'get_ref_count'):
206  self._objects.append(obj)
207  def cleanup(self):
208  """Only drop our reference and allow cleanup by Python if no other
209  Python references exist (we hold 3 references: one in self._objects,
210  one in x, and one in the argument list for getrefcount) *and* no
211  other C++ references exist (the Python object always holds one)"""
212  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
213  or x.get_ref_count() > 1]
214 # Do in two steps so the references are kept until the end of the
215 # function (deleting references may trigger a fresh call to this method)
216  self._objects = objs
217  def get_object_count(self):
218  """Get number of director objects (useful for testing only)"""
219  return len(self._objects)
220 _director_objects = _DirectorObjects()
221 
222 class _ostream(object):
223  r"""Proxy of C++ std::ostream class."""
224 
225  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
226 
227  def __init__(self, *args, **kwargs):
228  raise AttributeError("No constructor defined")
229  __repr__ = _swig_repr
230 
231  def write(self, osa_buf):
232  r"""write(_ostream self, char const * osa_buf)"""
233  return _IMP_em2d._ostream_write(self, osa_buf)
234 
235 # Register _ostream in _IMP_em2d:
236 _IMP_em2d._ostream_swigregister(_ostream)
237 IMP_C_OPEN_BINARY = _IMP_em2d.IMP_C_OPEN_BINARY
238 
239 import IMP
240 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_CGAL_HAS_BOOST_FILESYSTEM
241 
242 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
243 
244 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_em2d.IMP_CGAL_HAS_BOOST_RANDOM
245 
246 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_CGAL_HAS_BOOST_SYSTEM
247 
248 IMP_CGAL_HAS_NUMPY = _IMP_em2d.IMP_CGAL_HAS_NUMPY
249 
250 IMPCGAL_SHOW_WARNINGS = _IMP_em2d.IMPCGAL_SHOW_WARNINGS
251 
252 import IMP.cgal
253 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_em2d.IMP_ALGEBRA_HAS_IMP_CGAL
254 
255 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
256 
257 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
258 
259 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_RANDOM
260 
261 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_ALGEBRA_HAS_BOOST_SYSTEM
262 
263 IMP_ALGEBRA_HAS_CGAL = _IMP_em2d.IMP_ALGEBRA_HAS_CGAL
264 
265 IMP_ALGEBRA_HAS_NUMPY = _IMP_em2d.IMP_ALGEBRA_HAS_NUMPY
266 
267 IMP_ALGEBRA_HAS_ANN = _IMP_em2d.IMP_ALGEBRA_HAS_ANN
268 
269 IMPALGEBRA_SHOW_WARNINGS = _IMP_em2d.IMPALGEBRA_SHOW_WARNINGS
270 
271 import IMP.algebra
272 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_em2d.IMP_DISPLAY_HAS_IMP_CGAL
273 
274 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
275 
276 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
277 
278 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_RANDOM
279 
280 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_DISPLAY_HAS_BOOST_SYSTEM
281 
282 IMP_DISPLAY_HAS_CGAL = _IMP_em2d.IMP_DISPLAY_HAS_CGAL
283 
284 IMP_DISPLAY_HAS_NUMPY = _IMP_em2d.IMP_DISPLAY_HAS_NUMPY
285 
286 IMPDISPLAY_SHOW_WARNINGS = _IMP_em2d.IMPDISPLAY_SHOW_WARNINGS
287 
288 import IMP.display
289 IMP_GSL_HAS_IMP_CGAL = _IMP_em2d.IMP_GSL_HAS_IMP_CGAL
290 
291 IMP_GSL_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_GSL_HAS_BOOST_FILESYSTEM
292 
293 IMP_GSL_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_GSL_HAS_BOOST_PROGRAMOPTIONS
294 
295 IMP_GSL_HAS_BOOST_RANDOM = _IMP_em2d.IMP_GSL_HAS_BOOST_RANDOM
296 
297 IMP_GSL_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_GSL_HAS_BOOST_SYSTEM
298 
299 IMP_GSL_HAS_CGAL = _IMP_em2d.IMP_GSL_HAS_CGAL
300 
301 IMP_GSL_HAS_NUMPY = _IMP_em2d.IMP_GSL_HAS_NUMPY
302 
303 IMPGSL_SHOW_WARNINGS = _IMP_em2d.IMPGSL_SHOW_WARNINGS
304 
305 import IMP.gsl
306 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
307 
308 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
309 
310 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
311 
312 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
313 
314 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
315 
316 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_CGAL
317 
318 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_HDF5
319 
320 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_em2d.IMP_SCORE_FUNCTOR_HAS_NUMPY
321 
322 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_em2d.IMPSCOREFUNCTOR_SHOW_WARNINGS
323 
324 import IMP.score_functor
325 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_em2d.IMP_STATISTICS_HAS_IMP_CGAL
326 
327 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
328 
329 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
330 
331 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_RANDOM
332 
333 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_STATISTICS_HAS_BOOST_SYSTEM
334 
335 IMP_STATISTICS_HAS_CGAL = _IMP_em2d.IMP_STATISTICS_HAS_CGAL
336 
337 IMP_STATISTICS_HAS_NUMPY = _IMP_em2d.IMP_STATISTICS_HAS_NUMPY
338 
339 IMPSTATISTICS_SHOW_WARNINGS = _IMP_em2d.IMPSTATISTICS_SHOW_WARNINGS
340 
341 import IMP.statistics
342 IMP_CORE_HAS_IMP_CGAL = _IMP_em2d.IMP_CORE_HAS_IMP_CGAL
343 
344 IMP_CORE_HAS_IMP_KERNEL = _IMP_em2d.IMP_CORE_HAS_IMP_KERNEL
345 
346 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_CORE_HAS_BOOST_FILESYSTEM
347 
348 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
349 
350 IMP_CORE_HAS_BOOST_RANDOM = _IMP_em2d.IMP_CORE_HAS_BOOST_RANDOM
351 
352 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_CORE_HAS_BOOST_SYSTEM
353 
354 IMP_CORE_HAS_CGAL = _IMP_em2d.IMP_CORE_HAS_CGAL
355 
356 IMP_CORE_HAS_HDF5 = _IMP_em2d.IMP_CORE_HAS_HDF5
357 
358 IMP_CORE_HAS_NUMPY = _IMP_em2d.IMP_CORE_HAS_NUMPY
359 
360 IMPCORE_SHOW_WARNINGS = _IMP_em2d.IMPCORE_SHOW_WARNINGS
361 
362 import IMP.core
363 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_em2d.IMP_CONTAINER_HAS_IMP_ALGEBRA
364 
365 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_em2d.IMP_CONTAINER_HAS_IMP_CGAL
366 
367 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_em2d.IMP_CONTAINER_HAS_IMP_DISPLAY
368 
369 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_em2d.IMP_CONTAINER_HAS_IMP_KERNEL
370 
371 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
372 
373 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
374 
375 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
376 
377 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_RANDOM
378 
379 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_CONTAINER_HAS_BOOST_SYSTEM
380 
381 IMP_CONTAINER_HAS_CGAL = _IMP_em2d.IMP_CONTAINER_HAS_CGAL
382 
383 IMP_CONTAINER_HAS_HDF5 = _IMP_em2d.IMP_CONTAINER_HAS_HDF5
384 
385 IMP_CONTAINER_HAS_NUMPY = _IMP_em2d.IMP_CONTAINER_HAS_NUMPY
386 
387 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_em2d.IMP_CONTAINER_HAS_PYTHON_IHM
388 
389 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_em2d.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
390 
391 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_em2d.IMP_CONTAINER_HAS_ROBIN_MAP
392 
393 IMPCONTAINER_SHOW_WARNINGS = _IMP_em2d.IMPCONTAINER_SHOW_WARNINGS
394 
395 import IMP.container
396 IMP_ATOM_HAS_IMP_CGAL = _IMP_em2d.IMP_ATOM_HAS_IMP_CGAL
397 
398 IMP_ATOM_HAS_IMP_KERNEL = _IMP_em2d.IMP_ATOM_HAS_IMP_KERNEL
399 
400 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
401 
402 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
403 
404 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_em2d.IMP_ATOM_HAS_BOOST_RANDOM
405 
406 IMP_ATOM_HAS_BOOST_REGEX = _IMP_em2d.IMP_ATOM_HAS_BOOST_REGEX
407 
408 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_ATOM_HAS_BOOST_SYSTEM
409 
410 IMP_ATOM_HAS_CGAL = _IMP_em2d.IMP_ATOM_HAS_CGAL
411 
412 IMP_ATOM_HAS_HDF5 = _IMP_em2d.IMP_ATOM_HAS_HDF5
413 
414 IMP_ATOM_HAS_NUMPY = _IMP_em2d.IMP_ATOM_HAS_NUMPY
415 
416 IMP_ATOM_HAS_PYTHON_IHM = _IMP_em2d.IMP_ATOM_HAS_PYTHON_IHM
417 
418 IMPATOM_SHOW_WARNINGS = _IMP_em2d.IMPATOM_SHOW_WARNINGS
419 
420 IMP_ATOM_TYPE_INDEX = _IMP_em2d.IMP_ATOM_TYPE_INDEX
421 
422 IMP_RESIDUE_TYPE_INDEX = _IMP_em2d.IMP_RESIDUE_TYPE_INDEX
423 
424 IMP_HIERARCHY_TYPE_INDEX = _IMP_em2d.IMP_HIERARCHY_TYPE_INDEX
425 
426 IMP_CHAIN_TYPE_INDEX = _IMP_em2d.IMP_CHAIN_TYPE_INDEX
427 
428 import IMP.atom
429 IMP_EM_HAS_IMP_CGAL = _IMP_em2d.IMP_EM_HAS_IMP_CGAL
430 
431 IMP_EM_HAS_IMP_CONTAINER = _IMP_em2d.IMP_EM_HAS_IMP_CONTAINER
432 
433 IMP_EM_HAS_IMP_DISPLAY = _IMP_em2d.IMP_EM_HAS_IMP_DISPLAY
434 
435 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_EM_HAS_IMP_SCORE_FUNCTOR
436 
437 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_EM_HAS_BOOST_FILESYSTEM
438 
439 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
440 
441 IMP_EM_HAS_BOOST_RANDOM = _IMP_em2d.IMP_EM_HAS_BOOST_RANDOM
442 
443 IMP_EM_HAS_BOOST_REGEX = _IMP_em2d.IMP_EM_HAS_BOOST_REGEX
444 
445 IMP_EM_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_EM_HAS_BOOST_SYSTEM
446 
447 IMP_EM_HAS_CGAL = _IMP_em2d.IMP_EM_HAS_CGAL
448 
449 IMP_EM_HAS_HDF5 = _IMP_em2d.IMP_EM_HAS_HDF5
450 
451 IMP_EM_HAS_NUMPY = _IMP_em2d.IMP_EM_HAS_NUMPY
452 
453 IMP_EM_HAS_PYTHON_IHM = _IMP_em2d.IMP_EM_HAS_PYTHON_IHM
454 
455 IMPEM_SHOW_WARNINGS = _IMP_em2d.IMPEM_SHOW_WARNINGS
456 
457 import IMP.em
458 IMP_SAXS_HAS_IMP_CGAL = _IMP_em2d.IMP_SAXS_HAS_IMP_CGAL
459 
460 IMP_SAXS_HAS_IMP_CONTAINER = _IMP_em2d.IMP_SAXS_HAS_IMP_CONTAINER
461 
462 IMP_SAXS_HAS_IMP_DISPLAY = _IMP_em2d.IMP_SAXS_HAS_IMP_DISPLAY
463 
464 IMP_SAXS_HAS_IMP_KERNEL = _IMP_em2d.IMP_SAXS_HAS_IMP_KERNEL
465 
466 IMP_SAXS_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_SAXS_HAS_IMP_SCORE_FUNCTOR
467 
468 IMP_SAXS_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_SAXS_HAS_BOOST_FILESYSTEM
469 
470 IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS
471 
472 IMP_SAXS_HAS_BOOST_RANDOM = _IMP_em2d.IMP_SAXS_HAS_BOOST_RANDOM
473 
474 IMP_SAXS_HAS_BOOST_REGEX = _IMP_em2d.IMP_SAXS_HAS_BOOST_REGEX
475 
476 IMP_SAXS_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_SAXS_HAS_BOOST_SYSTEM
477 
478 IMP_SAXS_HAS_CGAL = _IMP_em2d.IMP_SAXS_HAS_CGAL
479 
480 IMP_SAXS_HAS_HDF5 = _IMP_em2d.IMP_SAXS_HAS_HDF5
481 
482 IMP_SAXS_HAS_NUMPY = _IMP_em2d.IMP_SAXS_HAS_NUMPY
483 
484 IMP_SAXS_HAS_PYTHON_IHM = _IMP_em2d.IMP_SAXS_HAS_PYTHON_IHM
485 
486 IMPSAXS_SHOW_WARNINGS = _IMP_em2d.IMPSAXS_SHOW_WARNINGS
487 
488 import IMP.saxs
489 IMP_ISD_HAS_IMP_CGAL = _IMP_em2d.IMP_ISD_HAS_IMP_CGAL
490 
491 IMP_ISD_HAS_IMP_DISPLAY = _IMP_em2d.IMP_ISD_HAS_IMP_DISPLAY
492 
493 IMP_ISD_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_ISD_HAS_IMP_SCORE_FUNCTOR
494 
495 IMP_ISD_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_ISD_HAS_BOOST_FILESYSTEM
496 
497 IMP_ISD_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_ISD_HAS_BOOST_PROGRAMOPTIONS
498 
499 IMP_ISD_HAS_BOOST_RANDOM = _IMP_em2d.IMP_ISD_HAS_BOOST_RANDOM
500 
501 IMP_ISD_HAS_BOOST_REGEX = _IMP_em2d.IMP_ISD_HAS_BOOST_REGEX
502 
503 IMP_ISD_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_ISD_HAS_BOOST_SYSTEM
504 
505 IMP_ISD_HAS_CGAL = _IMP_em2d.IMP_ISD_HAS_CGAL
506 
507 IMP_ISD_HAS_HDF5 = _IMP_em2d.IMP_ISD_HAS_HDF5
508 
509 IMP_ISD_HAS_NUMPY = _IMP_em2d.IMP_ISD_HAS_NUMPY
510 
511 IMP_ISD_HAS_PYTHON_IHM = _IMP_em2d.IMP_ISD_HAS_PYTHON_IHM
512 
513 IMPISD_SHOW_WARNINGS = _IMP_em2d.IMPISD_SHOW_WARNINGS
514 
515 import IMP.isd
516 IMP_RMF_HAS_IMP_CGAL = _IMP_em2d.IMP_RMF_HAS_IMP_CGAL
517 
518 IMP_RMF_HAS_IMP_EM = _IMP_em2d.IMP_RMF_HAS_IMP_EM
519 
520 IMP_RMF_HAS_IMP_SAXS = _IMP_em2d.IMP_RMF_HAS_IMP_SAXS
521 
522 IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_RMF_HAS_IMP_SCORE_FUNCTOR
523 
524 IMP_RMF_HAS_IMP_STATISTICS = _IMP_em2d.IMP_RMF_HAS_IMP_STATISTICS
525 
526 IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_RMF_HAS_BOOST_FILESYSTEM
527 
528 IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS
529 
530 IMP_RMF_HAS_BOOST_RANDOM = _IMP_em2d.IMP_RMF_HAS_BOOST_RANDOM
531 
532 IMP_RMF_HAS_BOOST_REGEX = _IMP_em2d.IMP_RMF_HAS_BOOST_REGEX
533 
534 IMP_RMF_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_RMF_HAS_BOOST_SYSTEM
535 
536 IMP_RMF_HAS_CGAL = _IMP_em2d.IMP_RMF_HAS_CGAL
537 
538 IMP_RMF_HAS_HDF5 = _IMP_em2d.IMP_RMF_HAS_HDF5
539 
540 IMP_RMF_HAS_NUMPY = _IMP_em2d.IMP_RMF_HAS_NUMPY
541 
542 IMP_RMF_HAS_PYTHON_IHM = _IMP_em2d.IMP_RMF_HAS_PYTHON_IHM
543 
544 IMPRMF_SHOW_WARNINGS = _IMP_em2d.IMPRMF_SHOW_WARNINGS
545 
546 import IMP.rmf
547 import RMF
548 IMP_DOMINO_HAS_IMP_ATOM = _IMP_em2d.IMP_DOMINO_HAS_IMP_ATOM
549 
550 IMP_DOMINO_HAS_IMP_CGAL = _IMP_em2d.IMP_DOMINO_HAS_IMP_CGAL
551 
552 IMP_DOMINO_HAS_IMP_EM = _IMP_em2d.IMP_DOMINO_HAS_IMP_EM
553 
554 IMP_DOMINO_HAS_IMP_ISD = _IMP_em2d.IMP_DOMINO_HAS_IMP_ISD
555 
556 IMP_DOMINO_HAS_IMP_KERNEL = _IMP_em2d.IMP_DOMINO_HAS_IMP_KERNEL
557 
558 IMP_DOMINO_HAS_IMP_RMF = _IMP_em2d.IMP_DOMINO_HAS_IMP_RMF
559 
560 IMP_DOMINO_HAS_IMP_SAXS = _IMP_em2d.IMP_DOMINO_HAS_IMP_SAXS
561 
562 IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR
563 
564 IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_em2d.IMP_DOMINO_HAS_BOOST_FILESYSTEM
565 
566 IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_em2d.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS
567 
568 IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_em2d.IMP_DOMINO_HAS_BOOST_RANDOM
569 
570 IMP_DOMINO_HAS_BOOST_REGEX = _IMP_em2d.IMP_DOMINO_HAS_BOOST_REGEX
571 
572 IMP_DOMINO_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_DOMINO_HAS_BOOST_SYSTEM
573 
574 IMP_DOMINO_HAS_CGAL = _IMP_em2d.IMP_DOMINO_HAS_CGAL
575 
576 IMP_DOMINO_HAS_HDF5 = _IMP_em2d.IMP_DOMINO_HAS_HDF5
577 
578 IMP_DOMINO_HAS_NUMPY = _IMP_em2d.IMP_DOMINO_HAS_NUMPY
579 
580 IMP_DOMINO_HAS_RMF = _IMP_em2d.IMP_DOMINO_HAS_RMF
581 
582 IMP_DOMINO_HAS_PYTHON_IHM = _IMP_em2d.IMP_DOMINO_HAS_PYTHON_IHM
583 
584 IMPDOMINO_SHOW_WARNINGS = _IMP_em2d.IMPDOMINO_SHOW_WARNINGS
585 
586 import RMF_HDF5
587 import IMP.domino
588 IMP_EM2D_HAS_IMP_CGAL = _IMP_em2d.IMP_EM2D_HAS_IMP_CGAL
589 
590 IMP_EM2D_HAS_IMP_ISD = _IMP_em2d.IMP_EM2D_HAS_IMP_ISD
591 
592 IMP_EM2D_HAS_IMP_KERNEL = _IMP_em2d.IMP_EM2D_HAS_IMP_KERNEL
593 
594 IMP_EM2D_HAS_IMP_RMF = _IMP_em2d.IMP_EM2D_HAS_IMP_RMF
595 
596 IMP_EM2D_HAS_IMP_SAXS = _IMP_em2d.IMP_EM2D_HAS_IMP_SAXS
597 
598 IMP_EM2D_HAS_IMP_SCORE_FUNCTOR = _IMP_em2d.IMP_EM2D_HAS_IMP_SCORE_FUNCTOR
599 
600 IMP_EM2D_HAS_IMP_STATISTICS = _IMP_em2d.IMP_EM2D_HAS_IMP_STATISTICS
601 
602 IMP_EM2D_HAS_BOOST_GRAPH = _IMP_em2d.IMP_EM2D_HAS_BOOST_GRAPH
603 
604 IMP_EM2D_HAS_BOOST_RANDOM = _IMP_em2d.IMP_EM2D_HAS_BOOST_RANDOM
605 
606 IMP_EM2D_HAS_BOOST_REGEX = _IMP_em2d.IMP_EM2D_HAS_BOOST_REGEX
607 
608 IMP_EM2D_HAS_BOOST_SYSTEM = _IMP_em2d.IMP_EM2D_HAS_BOOST_SYSTEM
609 
610 IMP_EM2D_HAS_CGAL = _IMP_em2d.IMP_EM2D_HAS_CGAL
611 
612 IMP_EM2D_HAS_GSL = _IMP_em2d.IMP_EM2D_HAS_GSL
613 
614 IMP_EM2D_HAS_HDF5 = _IMP_em2d.IMP_EM2D_HAS_HDF5
615 
616 IMP_EM2D_HAS_NUMPY = _IMP_em2d.IMP_EM2D_HAS_NUMPY
617 
618 IMP_EM2D_HAS_OPENCV3 = _IMP_em2d.IMP_EM2D_HAS_OPENCV3
619 
620 IMP_EM2D_HAS_RMF = _IMP_em2d.IMP_EM2D_HAS_RMF
621 
622 IMP_EM2D_HAS_PYTHON_IHM = _IMP_em2d.IMP_EM2D_HAS_PYTHON_IHM
623 
624 IMP_EM2D_HAS_OPENCV21 = _IMP_em2d.IMP_EM2D_HAS_OPENCV21
625 
626 IMP_EM2D_HAS_OPENCV22 = _IMP_em2d.IMP_EM2D_HAS_OPENCV22
627 
628 IMPEM2D_SHOW_WARNINGS = _IMP_em2d.IMPEM2D_SHOW_WARNINGS
629 
630 
631 PolarResamplingParametersList=list
632 _plural_types.append("PolarResamplingParametersList")
633 _value_types.append("PolarResamplingParameters")
634 
635 
636 ProjectionMasks=list
637 _plural_types.append("ProjectionMasks")
638 _value_types.append("ProjectionMask")
639 
640 
641 MasksManagers=list
642 _plural_types.append("MasksManagers")
643 _value_types.append("MasksManager")
644 
645 
646 RegistrationResults=list
647 _plural_types.append("RegistrationResults")
648 _value_types.append("RegistrationResult")
649 
650 
651 ClusterSets=list
652 _plural_types.append("ClusterSets")
653 _value_types.append("ClusterSet")
654 
655 
656 SingleLinkages=list
657 _plural_types.append("SingleLinkages")
658 _value_types.append("SingleLinkage")
659 
660 
661 CompleteLinkages=list
662 _plural_types.append("CompleteLinkages")
663 _value_types.append("CompleteLinkage")
664 
665 
666 AverageDistanceLinkages=list
667 _plural_types.append("AverageDistanceLinkages")
668 _value_types.append("AverageDistanceLinkage")
669 
670 
671 SegmentationParametersList=list
672 _plural_types.append("SegmentationParametersList")
673 _value_types.append("SegmentationParameters")
674 
675 
676 MatchTemplateResults=list
677 _plural_types.append("MatchTemplateResults")
678 _value_types.append("MatchTemplateResult")
679 
680 
681 ProjectingParametersList=list
682 _plural_types.append("ProjectingParametersList")
683 _value_types.append("ProjectingParameters")
684 
685 
686 ProjectingOptionsList=list
687 _plural_types.append("ProjectingOptionsList")
688 _value_types.append("ProjectingOptions")
689 
690 
691 Em2DRestraintParametersList=list
692 _plural_types.append("Em2DRestraintParametersList")
693 _value_types.append("Em2DRestraintParameters")
694 
695 
696 _object_types.append("ProjectionFinder")
697 
698 
699 def _object_cast_to_ProjectionFinder(o):
700  r"""_object_cast_to_ProjectionFinder(Object o) -> ProjectionFinder"""
701  return _IMP_em2d._object_cast_to_ProjectionFinder(o)
702 
703 _object_types.append("ScoreFunction")
704 
705 
706 def _object_cast_to_ScoreFunction(o):
707  r"""_object_cast_to_ScoreFunction(Object o) -> ScoreFunction"""
708  return _IMP_em2d._object_cast_to_ScoreFunction(o)
709 
710 _object_types.append("ChiSquaredScore")
711 
712 
713 def _object_cast_to_ChiSquaredScore(o):
714  r"""_object_cast_to_ChiSquaredScore(Object o) -> ChiSquaredScore"""
715  return _IMP_em2d._object_cast_to_ChiSquaredScore(o)
716 
717 _object_types.append("EM2DScore")
718 
719 
720 def _object_cast_to_EM2DScore(o):
721  r"""_object_cast_to_EM2DScore(Object o) -> EM2DScore"""
722  return _IMP_em2d._object_cast_to_EM2DScore(o)
723 
724 _object_types.append("MeanAbsoluteDifference")
725 
726 
727 def _object_cast_to_MeanAbsoluteDifference(o):
728  r"""_object_cast_to_MeanAbsoluteDifference(Object o) -> MeanAbsoluteDifference"""
729  return _IMP_em2d._object_cast_to_MeanAbsoluteDifference(o)
730 
731 _object_types.append("ProjectionParametersScoreState")
732 
733 
734 def _object_cast_to_ProjectionParametersScoreState(o):
735  r"""_object_cast_to_ProjectionParametersScoreState(Object o) -> ProjectionParametersScoreState"""
736  return _IMP_em2d._object_cast_to_ProjectionParametersScoreState(o)
737 
738 _object_types.append("Em2DRestraint")
739 
740 
741 def _object_cast_to_Em2DRestraint(o):
742  r"""_object_cast_to_Em2DRestraint(Object o) -> Em2DRestraint"""
743  return _IMP_em2d._object_cast_to_Em2DRestraint(o)
744 
745 _object_types.append("Image")
746 
747 
748 def _object_cast_to_Image(o):
749  r"""_object_cast_to_Image(Object o) -> Image"""
750  return _IMP_em2d._object_cast_to_Image(o)
751 
752 _object_types.append("ImageReaderWriter")
753 
754 
755 def _object_cast_to_ImageReaderWriter(o):
756  r"""_object_cast_to_ImageReaderWriter(Object o) -> ImageReaderWriter"""
757  return _IMP_em2d._object_cast_to_ImageReaderWriter(o)
758 
759 _object_types.append("JPGImageReaderWriter")
760 
761 
762 def _object_cast_to_JPGImageReaderWriter(o):
763  r"""_object_cast_to_JPGImageReaderWriter(Object o) -> JPGImageReaderWriter"""
764  return _IMP_em2d._object_cast_to_JPGImageReaderWriter(o)
765 
766 _object_types.append("TIFFImageReaderWriter")
767 
768 
769 def _object_cast_to_TIFFImageReaderWriter(o):
770  r"""_object_cast_to_TIFFImageReaderWriter(Object o) -> TIFFImageReaderWriter"""
771  return _IMP_em2d._object_cast_to_TIFFImageReaderWriter(o)
772 
773 _object_types.append("SpiderImageReaderWriter")
774 
775 
776 def _object_cast_to_SpiderImageReaderWriter(o):
777  r"""_object_cast_to_SpiderImageReaderWriter(Object o) -> SpiderImageReaderWriter"""
778  return _IMP_em2d._object_cast_to_SpiderImageReaderWriter(o)
779 
780 _object_types.append("CollisionCrossSection")
781 
782 
783 def _object_cast_to_CollisionCrossSection(o):
784  r"""_object_cast_to_CollisionCrossSection(Object o) -> CollisionCrossSection"""
785  return _IMP_em2d._object_cast_to_CollisionCrossSection(o)
786 
787 _object_types.append("GridStates")
788 
789 
790 def _object_cast_to_GridStates(o):
791  r"""_object_cast_to_GridStates(Object o) -> GridStates"""
792  return _IMP_em2d._object_cast_to_GridStates(o)
793 
794 _object_types.append("ProjectionStates")
795 
796 
797 def _object_cast_to_ProjectionStates(o):
798  r"""_object_cast_to_ProjectionStates(Object o) -> ProjectionStates"""
799  return _IMP_em2d._object_cast_to_ProjectionStates(o)
800 
801 _object_types.append("DistanceFilter")
802 
803 
804 def _object_cast_to_DistanceFilter(o):
805  r"""_object_cast_to_DistanceFilter(Object o) -> DistanceFilter"""
806  return _IMP_em2d._object_cast_to_DistanceFilter(o)
807 
808 _object_types.append("DistanceFilterTable")
809 
810 
811 def _object_cast_to_DistanceFilterTable(o):
812  r"""_object_cast_to_DistanceFilterTable(Object o) -> DistanceFilterTable"""
813  return _IMP_em2d._object_cast_to_DistanceFilterTable(o)
814 
815 _object_types.append("RigidBodiesImageFitRestraint")
816 
817 
818 def _object_cast_to_RigidBodiesImageFitRestraint(o):
819  r"""_object_cast_to_RigidBodiesImageFitRestraint(Object o) -> RigidBodiesImageFitRestraint"""
820  return _IMP_em2d._object_cast_to_RigidBodiesImageFitRestraint(o)
821 
822 _object_types.append("DummyRestraint")
823 
824 
825 def _object_cast_to_DummyRestraint(o):
826  r"""_object_cast_to_DummyRestraint(Object o) -> DummyRestraint"""
827  return _IMP_em2d._object_cast_to_DummyRestraint(o)
828 
829 _object_types.append("ParticlesDummyRestraint")
830 
831 
832 def _object_cast_to_ParticlesDummyRestraint(o):
833  r"""_object_cast_to_ParticlesDummyRestraint(Object o) -> ParticlesDummyRestraint"""
834  return _IMP_em2d._object_cast_to_ParticlesDummyRestraint(o)
835 
836 _object_types.append("RelativePositionMover")
837 
838 
839 def _object_cast_to_RelativePositionMover(o):
840  r"""_object_cast_to_RelativePositionMover(Object o) -> RelativePositionMover"""
841  return _IMP_em2d._object_cast_to_RelativePositionMover(o)
842 
843 _object_types.append("PCAFitRestraint")
844 
845 
846 def _object_cast_to_em2dPCAFitRestraint(o):
847  r"""_object_cast_to_em2dPCAFitRestraint(Object o) -> PCAFitRestraint"""
848  return _IMP_em2d._object_cast_to_em2dPCAFitRestraint(o)
849 
850 def ProjectionParametersList(l=[]):
851  return [ProjectionParameters(x) for x in l]
852 _plural_types.append("ProjectionParametersList")
853 
854 
855 _value_types.append("ProjectionParameters")
856 
857 
858 def show(*args):
859  r"""show(cv::Mat const & m, _ostream out=std::cout)"""
860  return _IMP_em2d.show(*args)
861 
862 def write_matrix(m, name):
863  r"""write_matrix(cv::Mat & m, std::string name)"""
864  return _IMP_em2d.write_matrix(m, name)
865 class ImageReaderWriter(IMP.Object):
866  r"""Proxy of C++ IMP::em2d::ImageReaderWriter class."""
867 
868  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
869 
870  def __init__(self, *args, **kwargs):
871  raise AttributeError("No constructor defined - class is abstract")
872 
873  def read(self, filename, header, data):
874  r"""read(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat & data)"""
875  return _IMP_em2d.ImageReaderWriter_read(self, filename, header, data)
876 
877  def read_from_floats(self, filename, header, data):
878  r"""read_from_floats(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat & data)"""
879  return _IMP_em2d.ImageReaderWriter_read_from_floats(self, filename, header, data)
880 
881  def read_from_ints(self, filename, header, data):
882  r"""read_from_ints(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat & data)"""
883  return _IMP_em2d.ImageReaderWriter_read_from_ints(self, filename, header, data)
884 
885  def write(self, filename, header, data):
886  r"""write(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat const & data)"""
887  return _IMP_em2d.ImageReaderWriter_write(self, filename, header, data)
888 
889  def write_to_floats(self, filename, header, data):
890  r"""write_to_floats(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat const & data)"""
891  return _IMP_em2d.ImageReaderWriter_write_to_floats(self, filename, header, data)
892 
893  def write_to_ints(self, filename, header, data):
894  r"""write_to_ints(ImageReaderWriter self, IMP::String const & filename, ImageHeader header, cv::Mat const & data)"""
895  return _IMP_em2d.ImageReaderWriter_write_to_ints(self, filename, header, data)
896 
897  def get_version_info(self):
898  r"""get_version_info(ImageReaderWriter self) -> VersionInfo"""
899  return _IMP_em2d.ImageReaderWriter_get_version_info(self)
900  __swig_destroy__ = _IMP_em2d.delete_ImageReaderWriter
901 
902  def __str__(self):
903  r"""__str__(ImageReaderWriter self) -> std::string"""
904  return _IMP_em2d.ImageReaderWriter___str__(self)
905 
906  def __repr__(self):
907  r"""__repr__(ImageReaderWriter self) -> std::string"""
908  return _IMP_em2d.ImageReaderWriter___repr__(self)
909 
910  @staticmethod
911  def get_from(o):
912  return _object_cast_to_ImageReaderWriter(o)
913 
914 
915 # Register ImageReaderWriter in _IMP_em2d:
916 _IMP_em2d.ImageReaderWriter_swigregister(ImageReaderWriter)
917 class PolarResamplingParameters(object):
918  r"""Proxy of C++ IMP::em2d::PolarResamplingParameters class."""
919 
920  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
921 
922  def __init__(self, *args):
923  r"""
924  __init__(PolarResamplingParameters self) -> PolarResamplingParameters
925  __init__(PolarResamplingParameters self, unsigned int rows, unsigned int cols) -> PolarResamplingParameters
926  __init__(PolarResamplingParameters self, cv::Mat const & m) -> PolarResamplingParameters
927  """
928  _IMP_em2d.PolarResamplingParameters_swiginit(self, _IMP_em2d.new_PolarResamplingParameters(*args))
929  __swig_destroy__ = _IMP_em2d.delete_PolarResamplingParameters
930 
931  def setup(self, rows, cols):
932  r"""setup(PolarResamplingParameters self, unsigned int rows, unsigned int cols)"""
933  return _IMP_em2d.PolarResamplingParameters_setup(self, rows, cols)
934 
935  def get_starting_radius(self):
936  r"""get_starting_radius(PolarResamplingParameters self) -> double"""
937  return _IMP_em2d.PolarResamplingParameters_get_starting_radius(self)
938 
939  def get_ending_radius(self):
940  r"""get_ending_radius(PolarResamplingParameters self) -> double"""
941  return _IMP_em2d.PolarResamplingParameters_get_ending_radius(self)
942 
943  def get_radius(self, n_ring):
944  r"""get_radius(PolarResamplingParameters self, unsigned int n_ring) -> double"""
945  return _IMP_em2d.PolarResamplingParameters_get_radius(self, n_ring)
946 
947  def get_number_of_rings(self):
948  r"""get_number_of_rings(PolarResamplingParameters self) -> unsigned int"""
949  return _IMP_em2d.PolarResamplingParameters_get_number_of_rings(self)
950 
951  def set_estimated_number_of_angles(self, aprox_value):
952  r"""set_estimated_number_of_angles(PolarResamplingParameters self, unsigned int aprox_value)"""
953  return _IMP_em2d.PolarResamplingParameters_set_estimated_number_of_angles(self, aprox_value)
954 
955  def get_number_of_angles(self):
956  r"""get_number_of_angles(PolarResamplingParameters self) -> unsigned int"""
957  return _IMP_em2d.PolarResamplingParameters_get_number_of_angles(self)
958 
959  def get_angle_step(self):
960  r"""get_angle_step(PolarResamplingParameters self) -> double"""
961  return _IMP_em2d.PolarResamplingParameters_get_angle_step(self)
962 
963  def get_radius_step(self):
964  r"""get_radius_step(PolarResamplingParameters self) -> double"""
965  return _IMP_em2d.PolarResamplingParameters_get_radius_step(self)
966 
967  def create_maps_for_resampling(self):
968  r"""create_maps_for_resampling(PolarResamplingParameters self)"""
969  return _IMP_em2d.PolarResamplingParameters_create_maps_for_resampling(self)
970 
971  def get_resampling_maps(self, m1, m2):
972  r"""get_resampling_maps(PolarResamplingParameters self, cv::Mat & m1, cv::Mat & m2)"""
973  return _IMP_em2d.PolarResamplingParameters_get_resampling_maps(self, m1, m2)
974 
975  def get_resampling_map(self, m1):
976  r"""get_resampling_map(PolarResamplingParameters self, cv::Mat & m1)"""
977  return _IMP_em2d.PolarResamplingParameters_get_resampling_map(self, m1)
978 
979  def show(self, out):
980  r"""show(PolarResamplingParameters self, _ostream out)"""
981  return _IMP_em2d.PolarResamplingParameters_show(self, out)
982 
983  def get_is_setup(self):
984  r"""get_is_setup(PolarResamplingParameters self) -> bool"""
985  return _IMP_em2d.PolarResamplingParameters_get_is_setup(self)
986 
987  def __str__(self):
988  r"""__str__(PolarResamplingParameters self) -> std::string"""
989  return _IMP_em2d.PolarResamplingParameters___str__(self)
990 
991  def __repr__(self):
992  r"""__repr__(PolarResamplingParameters self) -> std::string"""
993  return _IMP_em2d.PolarResamplingParameters___repr__(self)
994 
995  def _get_as_binary(self):
996  r"""_get_as_binary(PolarResamplingParameters self) -> PyObject *"""
997  return _IMP_em2d.PolarResamplingParameters__get_as_binary(self)
998 
999  def _set_from_binary(self, p):
1000  r"""_set_from_binary(PolarResamplingParameters self, PyObject * p)"""
1001  return _IMP_em2d.PolarResamplingParameters__set_from_binary(self, p)
1002 
1003  def __getstate__(self):
1004  p = self._get_as_binary()
1005  if len(self.__dict__) > 1:
1006  d = self.__dict__.copy()
1007  del d['this']
1008  p = (d, p)
1009  return p
1010 
1011  def __setstate__(self, p):
1012  if not hasattr(self, 'this'):
1013  self.__init__()
1014  if isinstance(p, tuple):
1015  d, p = p
1016  self.__dict__.update(d)
1017  return self._set_from_binary(p)
1018 
1019 
1020 # Register PolarResamplingParameters in _IMP_em2d:
1021 _IMP_em2d.PolarResamplingParameters_swigregister(PolarResamplingParameters)
1022 class SegmentationParameters(object):
1023  r"""Proxy of C++ IMP::em2d::SegmentationParameters class."""
1024 
1025  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1026  image_pixel_size = property(_IMP_em2d.SegmentationParameters_image_pixel_size_get, _IMP_em2d.SegmentationParameters_image_pixel_size_set, doc=r"""image_pixel_size : double""")
1027  diffusion_beta = property(_IMP_em2d.SegmentationParameters_diffusion_beta_get, _IMP_em2d.SegmentationParameters_diffusion_beta_set, doc=r"""diffusion_beta : double""")
1028  diffusion_timesteps = property(_IMP_em2d.SegmentationParameters_diffusion_timesteps_get, _IMP_em2d.SegmentationParameters_diffusion_timesteps_set, doc=r"""diffusion_timesteps : double""")
1029  fill_holes_stddevs = property(_IMP_em2d.SegmentationParameters_fill_holes_stddevs_get, _IMP_em2d.SegmentationParameters_fill_holes_stddevs_set, doc=r"""fill_holes_stddevs : double""")
1030  opening_kernel = property(_IMP_em2d.SegmentationParameters_opening_kernel_get, _IMP_em2d.SegmentationParameters_opening_kernel_set, doc=r"""opening_kernel : cv::Mat""")
1031  remove_sizing_percentage = property(_IMP_em2d.SegmentationParameters_remove_sizing_percentage_get, _IMP_em2d.SegmentationParameters_remove_sizing_percentage_set, doc=r"""remove_sizing_percentage : double""")
1032  binary_background = property(_IMP_em2d.SegmentationParameters_binary_background_get, _IMP_em2d.SegmentationParameters_binary_background_set, doc=r"""binary_background : int""")
1033  binary_foreground = property(_IMP_em2d.SegmentationParameters_binary_foreground_get, _IMP_em2d.SegmentationParameters_binary_foreground_set, doc=r"""binary_foreground : int""")
1034  threshold = property(_IMP_em2d.SegmentationParameters_threshold_get, _IMP_em2d.SegmentationParameters_threshold_set, doc=r"""threshold : double""")
1035 
1036  def __init__(self, *args):
1037  r"""
1038  __init__(SegmentationParameters self) -> SegmentationParameters
1039  __init__(SegmentationParameters self, double apix, double diff_beta, unsigned int diff_timesteps, double fh_stddevs, cv::Mat const & kr, int background, int foreground) -> SegmentationParameters
1040  """
1041  _IMP_em2d.SegmentationParameters_swiginit(self, _IMP_em2d.new_SegmentationParameters(*args))
1042 
1043  def show(self, *args):
1044  r"""show(SegmentationParameters self, _ostream out=std::cout)"""
1045  return _IMP_em2d.SegmentationParameters_show(self, *args)
1046 
1047  def __str__(self):
1048  r"""__str__(SegmentationParameters self) -> std::string"""
1049  return _IMP_em2d.SegmentationParameters___str__(self)
1050 
1051  def __repr__(self):
1052  r"""__repr__(SegmentationParameters self) -> std::string"""
1053  return _IMP_em2d.SegmentationParameters___repr__(self)
1054 
1055  def _get_as_binary(self):
1056  r"""_get_as_binary(SegmentationParameters self) -> PyObject *"""
1057  return _IMP_em2d.SegmentationParameters__get_as_binary(self)
1058 
1059  def _set_from_binary(self, p):
1060  r"""_set_from_binary(SegmentationParameters self, PyObject * p)"""
1061  return _IMP_em2d.SegmentationParameters__set_from_binary(self, p)
1062 
1063  def __getstate__(self):
1064  p = self._get_as_binary()
1065  if len(self.__dict__) > 1:
1066  d = self.__dict__.copy()
1067  del d['this']
1068  p = (d, p)
1069  return p
1070 
1071  def __setstate__(self, p):
1072  if not hasattr(self, 'this'):
1073  self.__init__()
1074  if isinstance(p, tuple):
1075  d, p = p
1076  self.__dict__.update(d)
1077  return self._set_from_binary(p)
1078 
1079  __swig_destroy__ = _IMP_em2d.delete_SegmentationParameters
1080 
1081 # Register SegmentationParameters in _IMP_em2d:
1082 _IMP_em2d.SegmentationParameters_swigregister(SegmentationParameters)
1083 class MatchTemplateResult(object):
1084  r"""Proxy of C++ IMP::em2d::MatchTemplateResult class."""
1085 
1086  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1087  pair = property(_IMP_em2d.MatchTemplateResult_pair_get, _IMP_em2d.MatchTemplateResult_pair_set, doc=r"""pair : IMP::IntPair""")
1088  cross_correlation = property(_IMP_em2d.MatchTemplateResult_cross_correlation_get, _IMP_em2d.MatchTemplateResult_cross_correlation_set, doc=r"""cross_correlation : double""")
1089 
1090  def __init__(self, *args):
1091  r"""
1092  __init__(MatchTemplateResult self, IMP::IntPair p, double cc) -> MatchTemplateResult
1093  __init__(MatchTemplateResult self) -> MatchTemplateResult
1094  """
1095  _IMP_em2d.MatchTemplateResult_swiginit(self, _IMP_em2d.new_MatchTemplateResult(*args))
1096 
1097  def show(self, *args):
1098  r"""show(MatchTemplateResult self, _ostream out=std::cout)"""
1099  return _IMP_em2d.MatchTemplateResult_show(self, *args)
1100 
1101  def __str__(self):
1102  r"""__str__(MatchTemplateResult self) -> std::string"""
1103  return _IMP_em2d.MatchTemplateResult___str__(self)
1104 
1105  def __repr__(self):
1106  r"""__repr__(MatchTemplateResult self) -> std::string"""
1107  return _IMP_em2d.MatchTemplateResult___repr__(self)
1108 
1109  def _get_as_binary(self):
1110  r"""_get_as_binary(MatchTemplateResult self) -> PyObject *"""
1111  return _IMP_em2d.MatchTemplateResult__get_as_binary(self)
1112 
1113  def _set_from_binary(self, p):
1114  r"""_set_from_binary(MatchTemplateResult self, PyObject * p)"""
1115  return _IMP_em2d.MatchTemplateResult__set_from_binary(self, p)
1116 
1117  def __getstate__(self):
1118  p = self._get_as_binary()
1119  if len(self.__dict__) > 1:
1120  d = self.__dict__.copy()
1121  del d['this']
1122  p = (d, p)
1123  return p
1124 
1125  def __setstate__(self, p):
1126  if not hasattr(self, 'this'):
1127  self.__init__()
1128  if isinstance(p, tuple):
1129  d, p = p
1130  self.__dict__.update(d)
1131  return self._set_from_binary(p)
1132 
1133  __swig_destroy__ = _IMP_em2d.delete_MatchTemplateResult
1134 
1135 # Register MatchTemplateResult in _IMP_em2d:
1136 _IMP_em2d.MatchTemplateResult_swigregister(MatchTemplateResult)
1137 
1138 def apply_mask(m, result, mask, val):
1139  r"""apply_mask(cv::Mat const & m, cv::Mat & result, IMP::em2d::cvIntMat const & mask, double val)"""
1140  return _IMP_em2d.apply_mask(m, result, mask, val)
1141 
1142 def apply_circular_mask(mat, result, radius, value=0.0):
1143  r"""apply_circular_mask(cv::Mat const & mat, cv::Mat & result, int radius, double value=0.0)"""
1144  return _IMP_em2d.apply_circular_mask(mat, result, radius, value)
1145 
1146 def get_mean(mat, mask):
1147  r"""get_mean(cv::Mat const & mat, IMP::em2d::cvIntMat const & mask) -> double"""
1148  return _IMP_em2d.get_mean(mat, mask)
1149 
1150 def create_circular_mask(rows, cols, radius):
1151  r"""create_circular_mask(int rows, int cols, int radius) -> IMP::em2d::cvIntMat"""
1152  return _IMP_em2d.create_circular_mask(rows, cols, radius)
1153 
1154 def do_histogram_stretching(m, boxes, offset):
1155  r"""do_histogram_stretching(cv::Mat & m, int boxes, int offset)"""
1156  return _IMP_em2d.do_histogram_stretching(m, boxes, offset)
1157 
1158 def do_dilate_and_shrink_warp(m, grayscale, kernel):
1159  r"""do_dilate_and_shrink_warp(cv::Mat & m, cv::Mat const & grayscale, cv::Mat & kernel)"""
1160  return _IMP_em2d.do_dilate_and_shrink_warp(m, grayscale, kernel)
1161 
1162 def do_morphologic_reconstruction(mask, marker, neighbors_mode=4):
1163  r"""do_morphologic_reconstruction(cv::Mat const & mask, cv::Mat & marker, int neighbors_mode=4)"""
1164  return _IMP_em2d.do_morphologic_reconstruction(mask, marker, neighbors_mode)
1165 
1166 def do_labeling(m, mat_to_label):
1167  r"""do_labeling(IMP::em2d::cvIntMat const & m, IMP::em2d::cvIntMat & mat_to_label) -> int"""
1168  return _IMP_em2d.do_labeling(m, mat_to_label)
1169 
1170 def get_diffusion_filtering_partial_derivative(m, der, dx, dy, ang):
1171  r"""get_diffusion_filtering_partial_derivative(cv::Mat const & m, cv::Mat & der, double dx, double dy, double ang)"""
1172  return _IMP_em2d.get_diffusion_filtering_partial_derivative(m, der, dx, dy, ang)
1173 
1174 def get_domes(m, result, h):
1175  r"""get_domes(cv::Mat & m, cv::Mat & result, double h)"""
1176  return _IMP_em2d.get_domes(m, result, h)
1177 
1178 def get_transformed(input, transformed, T):
1179  r"""get_transformed(cv::Mat const & input, cv::Mat & transformed, Transformation2D T)"""
1180  return _IMP_em2d.get_transformed(input, transformed, T)
1181 
1182 def apply_threshold(m, result, threshold=0.0):
1183  r"""apply_threshold(cv::Mat & m, cv::Mat & result, double threshold=0.0)"""
1184  return _IMP_em2d.apply_threshold(m, result, threshold)
1185 
1186 def do_morphologic_contrast_enhancement(m, result, kernel, iterations):
1187  r"""do_morphologic_contrast_enhancement(cv::Mat const & m, cv::Mat & result, cv::Mat const & kernel, unsigned int iterations)"""
1188  return _IMP_em2d.do_morphologic_contrast_enhancement(m, result, kernel, iterations)
1189 
1190 def get_morphologic_gradient(m, result, kernel):
1191  r"""get_morphologic_gradient(cv::Mat const & m, cv::Mat & result, cv::Mat const & kernel)"""
1192  return _IMP_em2d.get_morphologic_gradient(m, result, kernel)
1193 
1194 def get_overlap_percentage(m1, m2, center):
1195  r"""get_overlap_percentage(cv::Mat & m1, cv::Mat & m2, IMP::IntPair const & center) -> double"""
1196  return _IMP_em2d.get_overlap_percentage(m1, m2, center)
1197 
1198 def get_best_template_matches(m, templ, n):
1199  r"""get_best_template_matches(cv::Mat const & m, cv::Mat const & templ, unsigned int n) -> IMP::em2d::MatchTemplateResults"""
1200  return _IMP_em2d.get_best_template_matches(m, templ, n)
1201 class Image(IMP.Object):
1202  r"""Proxy of C++ IMP::em2d::Image class."""
1203 
1204  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1205 
1206  def __init__(self, *args):
1207  r"""
1208  __init__(Image self) -> Image
1209  __init__(Image self, int rows, int cols) -> Image
1210  __init__(Image self, IMP::String filename, ImageReaderWriter reader) -> Image
1211  """
1212  _IMP_em2d.Image_swiginit(self, _IMP_em2d.new_Image(*args))
1213 
1214  def get_data(self):
1215  r"""get_data(Image self) -> cv::Mat &"""
1216  return _IMP_em2d.Image_get_data(self)
1217 
1218  def set_data(self, mat):
1219  r"""set_data(Image self, cv::Mat const & mat)"""
1220  return _IMP_em2d.Image_set_data(self, mat)
1221 
1222  def set_zeros(self):
1223  r"""set_zeros(Image self)"""
1224  return _IMP_em2d.Image_set_zeros(self)
1225 
1226  def set_value(self, *args):
1227  r"""
1228  set_value(Image self, double val)
1229  set_value(Image self, int i, int j, double val)
1230  """
1231  return _IMP_em2d.Image_set_value(self, *args)
1232 
1233  def __call__(self, i, j):
1234  r"""__call__(Image self, int i, int j) -> double"""
1235  return _IMP_em2d.Image___call__(self, i, j)
1236 
1237  def get_header(self):
1238  r"""get_header(Image self) -> ImageHeader"""
1239  return _IMP_em2d.Image_get_header(self)
1240 
1241  def set_size(self, *args):
1242  r"""
1243  set_size(Image self, int rows, int cols)
1244  set_size(Image self, Image img)
1245  """
1246  return _IMP_em2d.Image_set_size(self, *args)
1247 
1248  def update_header(self):
1249  r"""update_header(Image self)"""
1250  return _IMP_em2d.Image_update_header(self)
1251 
1252  def read(self, filename, reader):
1253  r"""read(Image self, IMP::String filename, ImageReaderWriter reader)"""
1254  return _IMP_em2d.Image_read(self, filename, reader)
1255 
1256  def write(self, filename, writer):
1257  r"""write(Image self, IMP::String const & filename, ImageReaderWriter writer)"""
1258  return _IMP_em2d.Image_write(self, filename, writer)
1259 
1260  def show(self, out):
1261  r"""show(Image self, _ostream out)"""
1262  return _IMP_em2d.Image_show(self, out)
1263 
1264  def get_version_info(self):
1265  r"""get_version_info(Image self) -> VersionInfo"""
1266  return _IMP_em2d.Image_get_version_info(self)
1267  __swig_destroy__ = _IMP_em2d.delete_Image
1268 
1269  def set_name(self, name):
1270  r"""set_name(Image self, IMP::String const & name)"""
1271  return _IMP_em2d.Image_set_name(self, name)
1272 
1273  def get_name(self):
1274  r"""get_name(Image self) -> IMP::String"""
1275  return _IMP_em2d.Image_get_name(self)
1276 
1277  def get_min_and_max_values(self):
1278  r"""get_min_and_max_values(Image self) -> IMP::FloatRange"""
1279  return _IMP_em2d.Image_get_min_and_max_values(self)
1280 
1281  def __str__(self):
1282  r"""__str__(Image self) -> std::string"""
1283  return _IMP_em2d.Image___str__(self)
1284 
1285  def __repr__(self):
1286  r"""__repr__(Image self) -> std::string"""
1287  return _IMP_em2d.Image___repr__(self)
1288 
1289  @staticmethod
1290  def get_from(o):
1291  return _object_cast_to_Image(o)
1292 
1293 
1294 # Register Image in _IMP_em2d:
1295 _IMP_em2d.Image_swigregister(Image)
1296 
1297 def read_images(names, rw):
1298  r"""read_images(IMP::Strings const & names, ImageReaderWriter rw) -> IMP::em2d::Images"""
1299  return _IMP_em2d.read_images(names, rw)
1300 
1301 def save_images(images, names, rw):
1302  r"""save_images(IMP::em2d::Images images, IMP::Strings const & names, ImageReaderWriter rw)"""
1303  return _IMP_em2d.save_images(images, names, rw)
1304 
1305 def do_normalize(*args):
1306  r"""
1307  do_normalize(cv::Mat & m)
1308  do_normalize(Image im, bool force=False)
1309  """
1310  return _IMP_em2d.do_normalize(*args)
1311 
1312 def get_histogram(*args):
1313  r"""
1314  get_histogram(cv::Mat const & m, int bins) -> IMP::Floats
1315  get_histogram(Image img, int bins) -> IMP::Floats
1316  """
1317  return _IMP_em2d.get_histogram(*args)
1318 
1319 def apply_variance_filter(*args):
1320  r"""
1321  apply_variance_filter(cv::Mat const & input, cv::Mat & filtered, int kernelsize)
1322  apply_variance_filter(Image input, Image filtered, int kernelsize)
1323  """
1324  return _IMP_em2d.apply_variance_filter(*args)
1325 
1326 def apply_diffusion_filter(*args):
1327  r"""
1328  apply_diffusion_filter(cv::Mat const & m, cv::Mat & result, double beta, double pixelsize, unsigned int time_steps)
1329  apply_diffusion_filter(Image input, Image filtered, double beta, double pixelsize, int time_steps)
1330  """
1331  return _IMP_em2d.apply_diffusion_filter(*args)
1332 
1333 def do_fill_holes(*args):
1334  r"""
1335  do_fill_holes(cv::Mat const & m, cv::Mat & result, double h)
1336  do_fill_holes(Image input, Image result, double n_stddevs)
1337  """
1338  return _IMP_em2d.do_fill_holes(*args)
1339 
1340 def do_combined_fill_holes_and_threshold(*args):
1341  r"""
1342  do_combined_fill_holes_and_threshold(cv::Mat & m, cv::Mat & result, double n_stddevs, double threshold=0.0)
1343  do_combined_fill_holes_and_threshold(Image input, Image result, double n_stddevs)
1344  """
1345  return _IMP_em2d.do_combined_fill_holes_and_threshold(*args)
1346 
1347 def do_extend_borders(*args):
1348  r"""
1349  do_extend_borders(cv::Mat & orig, cv::Mat & dst, unsigned int pix)
1350  do_extend_borders(Image im1, Image im2, unsigned int pix)
1351  """
1352  return _IMP_em2d.do_extend_borders(*args)
1353 
1354 def do_segmentation(*args):
1355  r"""
1356  do_segmentation(cv::Mat const & m, cv::Mat & result, SegmentationParameters params)
1357  do_segmentation(Image input, Image result, SegmentationParameters params)
1358  """
1359  return _IMP_em2d.do_segmentation(*args)
1360 
1361 def do_remove_small_objects(*args):
1362  r"""
1363  do_remove_small_objects(IMP::em2d::cvIntMat & m, double percentage, int background=0, int foreground=1)
1364  do_remove_small_objects(Image input, double percentage, int background=0, int foreground=1)
1365  """
1366  return _IMP_em2d.do_remove_small_objects(*args)
1367 
1368 def do_subtract_images(first, second, result):
1369  r"""do_subtract_images(Image first, Image second, Image result)"""
1370  return _IMP_em2d.do_subtract_images(first, second, result)
1371 
1372 def add_noise(*args):
1373  r"""
1374  add_noise(cv::Mat & v, double op1, double op2, IMP::String const & mode="uniform", double df=3)
1375  add_noise(Image im1, double op1, double op2, IMP::String const & mode="uniform", double df=3)
1376  """
1377  return _IMP_em2d.add_noise(*args)
1378 
1379 def do_resample_polar(*args):
1380  r"""
1381  do_resample_polar(cv::Mat const & input, cv::Mat & resampled, PolarResamplingParameters polar_params)
1382  do_resample_polar(Image im1, Image im2, PolarResamplingParameters polar_params)
1383  """
1384  return _IMP_em2d.do_resample_polar(*args)
1385 
1386 def crop(*args):
1387  r"""
1388  crop(cv::Mat const & m, IMP::IntPair const & center, int size) -> cv::Mat
1389  crop(Image img, IMP::IntPair const & center, int size)
1390  """
1391  return _IMP_em2d.crop(*args)
1392 
1393 def apply_mean_outside_mask(img, radius):
1394  r"""apply_mean_outside_mask(Image img, double radius)"""
1395  return _IMP_em2d.apply_mean_outside_mask(img, radius)
1396 class RegistrationResult(object):
1397  r"""Proxy of C++ IMP::em2d::RegistrationResult class."""
1398 
1399  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1400 
1401  def __init__(self, *args):
1402  r"""
1403  __init__(RegistrationResult self) -> RegistrationResult
1404  __init__(RegistrationResult self, double phi, double theta, double psi, Vector2D shift, int projection_index=0, int image_index=0, IMP::String name="") -> RegistrationResult
1405  __init__(RegistrationResult self, Rotation3D R, Vector2D shift=IMP::algebra::Vector2D(0., 0.), int projection_index=0, int image_index=0, IMP::String name="") -> RegistrationResult
1406  """
1407  _IMP_em2d.RegistrationResult_swiginit(self, _IMP_em2d.new_RegistrationResult(*args))
1408 
1409  def get_phi(self):
1410  r"""get_phi(RegistrationResult self) -> double"""
1411  return _IMP_em2d.RegistrationResult_get_phi(self)
1412 
1413  def get_theta(self):
1414  r"""get_theta(RegistrationResult self) -> double"""
1415  return _IMP_em2d.RegistrationResult_get_theta(self)
1416 
1417  def get_psi(self):
1418  r"""get_psi(RegistrationResult self) -> double"""
1419  return _IMP_em2d.RegistrationResult_get_psi(self)
1420 
1421  def get_shift(self):
1422  r"""get_shift(RegistrationResult self) -> Vector2D"""
1423  return _IMP_em2d.RegistrationResult_get_shift(self)
1424 
1425  def get_shift_3d(self):
1426  r"""get_shift_3d(RegistrationResult self) -> Vector3D"""
1427  return _IMP_em2d.RegistrationResult_get_shift_3d(self)
1428 
1429  def get_projection_index(self):
1430  r"""get_projection_index(RegistrationResult self) -> int"""
1431  return _IMP_em2d.RegistrationResult_get_projection_index(self)
1432 
1433  def set_projection_index(self, index):
1434  r"""set_projection_index(RegistrationResult self, int index)"""
1435  return _IMP_em2d.RegistrationResult_set_projection_index(self, index)
1436 
1437  def get_image_index(self):
1438  r"""get_image_index(RegistrationResult self) -> int"""
1439  return _IMP_em2d.RegistrationResult_get_image_index(self)
1440 
1441  def set_image_index(self, index):
1442  r"""set_image_index(RegistrationResult self, int index)"""
1443  return _IMP_em2d.RegistrationResult_set_image_index(self, index)
1444 
1445  def get_name(self):
1446  r"""get_name(RegistrationResult self) -> IMP::String"""
1447  return _IMP_em2d.RegistrationResult_get_name(self)
1448 
1449  def get_ccc(self):
1450  r"""get_ccc(RegistrationResult self) -> double"""
1451  return _IMP_em2d.RegistrationResult_get_ccc(self)
1452 
1453  def set_ccc(self, ccc):
1454  r"""set_ccc(RegistrationResult self, double ccc)"""
1455  return _IMP_em2d.RegistrationResult_set_ccc(self, ccc)
1456 
1457  def get_score(self):
1458  r"""get_score(RegistrationResult self) -> double"""
1459  return _IMP_em2d.RegistrationResult_get_score(self)
1460 
1461  def set_score(self, Score):
1462  r"""set_score(RegistrationResult self, double Score)"""
1463  return _IMP_em2d.RegistrationResult_set_score(self, Score)
1464 
1465  def set_rotation(self, *args):
1466  r"""
1467  set_rotation(RegistrationResult self, double phi, double theta, double psi)
1468  set_rotation(RegistrationResult self, Rotation3D R)
1469  """
1470  return _IMP_em2d.RegistrationResult_set_rotation(self, *args)
1471 
1472  def set_shift(self, shift):
1473  r"""set_shift(RegistrationResult self, Vector2D shift)"""
1474  return _IMP_em2d.RegistrationResult_set_shift(self, shift)
1475 
1476  def set_name(self, name):
1477  r"""set_name(RegistrationResult self, IMP::String name)"""
1478  return _IMP_em2d.RegistrationResult_set_name(self, name)
1479 
1480  def add_in_plane_transformation(self, t):
1481  r"""add_in_plane_transformation(RegistrationResult self, Transformation2D t)"""
1482  return _IMP_em2d.RegistrationResult_add_in_plane_transformation(self, t)
1483 
1484  def show(self, *args):
1485  r"""show(RegistrationResult self, _ostream out=std::cout)"""
1486  return _IMP_em2d.RegistrationResult_show(self, *args)
1487 
1488  def write(self, *args):
1489  r"""write(RegistrationResult self, _ostream out=std::cout)"""
1490  return _IMP_em2d.RegistrationResult_write(self, *args)
1491 
1492  def write_comment_line(self, *args):
1493  r"""write_comment_line(RegistrationResult self, _ostream out=std::cout)"""
1494  return _IMP_em2d.RegistrationResult_write_comment_line(self, *args)
1495 
1496  def read(self, s):
1497  r"""read(RegistrationResult self, IMP::String const & s)"""
1498  return _IMP_em2d.RegistrationResult_read(self, s)
1499 
1500  def set_random_registration(self, index, maximum_shift):
1501  r"""set_random_registration(RegistrationResult self, unsigned int index, double maximum_shift)"""
1502  return _IMP_em2d.RegistrationResult_set_random_registration(self, index, maximum_shift)
1503 
1504  def get_rotation(self):
1505  r"""get_rotation(RegistrationResult self) -> Rotation3D"""
1506  return _IMP_em2d.RegistrationResult_get_rotation(self)
1507 
1508  def set_in_image(self, header):
1509  r"""set_in_image(RegistrationResult self, ImageHeader header)"""
1510  return _IMP_em2d.RegistrationResult_set_in_image(self, header)
1511 
1512  def read_from_image(self, header):
1513  r"""read_from_image(RegistrationResult self, ImageHeader header)"""
1514  return _IMP_em2d.RegistrationResult_read_from_image(self, header)
1515 
1516  def get_is_optimized_result(self):
1517  r"""get_is_optimized_result(RegistrationResult self) -> bool"""
1518  return _IMP_em2d.RegistrationResult_get_is_optimized_result(self)
1519  __swig_destroy__ = _IMP_em2d.delete_RegistrationResult
1520 
1521  def __str__(self):
1522  r"""__str__(RegistrationResult self) -> std::string"""
1523  return _IMP_em2d.RegistrationResult___str__(self)
1524 
1525  def __repr__(self):
1526  r"""__repr__(RegistrationResult self) -> std::string"""
1527  return _IMP_em2d.RegistrationResult___repr__(self)
1528 
1529  def _get_as_binary(self):
1530  r"""_get_as_binary(RegistrationResult self) -> PyObject *"""
1531  return _IMP_em2d.RegistrationResult__get_as_binary(self)
1532 
1533  def _set_from_binary(self, p):
1534  r"""_set_from_binary(RegistrationResult self, PyObject * p)"""
1535  return _IMP_em2d.RegistrationResult__set_from_binary(self, p)
1536 
1537  def __getstate__(self):
1538  p = self._get_as_binary()
1539  if len(self.__dict__) > 1:
1540  d = self.__dict__.copy()
1541  del d['this']
1542  p = (d, p)
1543  return p
1544 
1545  def __setstate__(self, p):
1546  if not hasattr(self, 'this'):
1547  self.__init__()
1548  if isinstance(p, tuple):
1549  d, p = p
1550  self.__dict__.update(d)
1551  return self._set_from_binary(p)
1552 
1553 
1554 # Register RegistrationResult in _IMP_em2d:
1555 _IMP_em2d.RegistrationResult_swigregister(RegistrationResult)
1556 
1557 def read_registration_results(filename):
1558  r"""read_registration_results(IMP::String const & filename) -> IMP::em2d::RegistrationResults"""
1559  return _IMP_em2d.read_registration_results(filename)
1560 
1561 def write_registration_results(filename, results):
1562  r"""write_registration_results(IMP::String filename, IMP::em2d::RegistrationResults const & results)"""
1563  return _IMP_em2d.write_registration_results(filename, results)
1564 
1565 def get_random_registration_results(n, maximum_shift=5.0):
1566  r"""get_random_registration_results(unsigned int n, double maximum_shift=5.0) -> IMP::em2d::RegistrationResults"""
1567  return _IMP_em2d.get_random_registration_results(n, maximum_shift)
1568 
1570  r"""get_evenly_distributed_registration_results(unsigned int n_projections) -> IMP::em2d::RegistrationResults"""
1571  return _IMP_em2d.get_evenly_distributed_registration_results(n_projections)
1572 class SpiderImageReaderWriter(ImageReaderWriter):
1573  r"""Proxy of C++ IMP::em2d::SpiderImageReaderWriter class."""
1574 
1575  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1576  filename_ = property(_IMP_em2d.SpiderImageReaderWriter_filename__get, _IMP_em2d.SpiderImageReaderWriter_filename__set, doc=r"""filename_ : IMP::String""")
1577  skip_type_check_ = property(_IMP_em2d.SpiderImageReaderWriter_skip_type_check__get, _IMP_em2d.SpiderImageReaderWriter_skip_type_check__set, doc=r"""skip_type_check_ : bool""")
1578  force_reversed_ = property(_IMP_em2d.SpiderImageReaderWriter_force_reversed__get, _IMP_em2d.SpiderImageReaderWriter_force_reversed__set, doc=r"""force_reversed_ : bool""")
1579  skip_extra_checkings_ = property(_IMP_em2d.SpiderImageReaderWriter_skip_extra_checkings__get, _IMP_em2d.SpiderImageReaderWriter_skip_extra_checkings__set, doc=r"""skip_extra_checkings_ : bool""")
1580 
1581  def __init__(self, *args):
1582  r"""
1583  __init__(SpiderImageReaderWriter self) -> SpiderImageReaderWriter
1584  __init__(SpiderImageReaderWriter self, IMP::String const & filename, bool skip_type_check, bool force_reversed, bool skip_extra_checkings) -> SpiderImageReaderWriter
1585  """
1586  _IMP_em2d.SpiderImageReaderWriter_swiginit(self, _IMP_em2d.new_SpiderImageReaderWriter(*args))
1587  __swig_destroy__ = _IMP_em2d.delete_SpiderImageReaderWriter
1588 
1589  def __str__(self):
1590  r"""__str__(SpiderImageReaderWriter self) -> std::string"""
1591  return _IMP_em2d.SpiderImageReaderWriter___str__(self)
1592 
1593  def __repr__(self):
1594  r"""__repr__(SpiderImageReaderWriter self) -> std::string"""
1595  return _IMP_em2d.SpiderImageReaderWriter___repr__(self)
1596 
1597  @staticmethod
1598  def get_from(o):
1599  return _object_cast_to_SpiderImageReaderWriter(o)
1600 
1601 
1602 # Register SpiderImageReaderWriter in _IMP_em2d:
1603 _IMP_em2d.SpiderImageReaderWriter_swigregister(SpiderImageReaderWriter)
1604 class JPGImageReaderWriter(ImageReaderWriter):
1605  r"""Proxy of C++ IMP::em2d::JPGImageReaderWriter class."""
1606 
1607  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1608 
1609  def __init__(self):
1610  r"""__init__(JPGImageReaderWriter self) -> JPGImageReaderWriter"""
1611  _IMP_em2d.JPGImageReaderWriter_swiginit(self, _IMP_em2d.new_JPGImageReaderWriter())
1612  __swig_destroy__ = _IMP_em2d.delete_JPGImageReaderWriter
1613 
1614  def __str__(self):
1615  r"""__str__(JPGImageReaderWriter self) -> std::string"""
1616  return _IMP_em2d.JPGImageReaderWriter___str__(self)
1617 
1618  def __repr__(self):
1619  r"""__repr__(JPGImageReaderWriter self) -> std::string"""
1620  return _IMP_em2d.JPGImageReaderWriter___repr__(self)
1621 
1622  @staticmethod
1623  def get_from(o):
1624  return _object_cast_to_JPGImageReaderWriter(o)
1625 
1626 
1627 # Register JPGImageReaderWriter in _IMP_em2d:
1628 _IMP_em2d.JPGImageReaderWriter_swigregister(JPGImageReaderWriter)
1629 class TIFFImageReaderWriter(ImageReaderWriter):
1630  r"""Proxy of C++ IMP::em2d::TIFFImageReaderWriter class."""
1631 
1632  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1633 
1634  def __init__(self):
1635  r"""__init__(TIFFImageReaderWriter self) -> TIFFImageReaderWriter"""
1636  _IMP_em2d.TIFFImageReaderWriter_swiginit(self, _IMP_em2d.new_TIFFImageReaderWriter())
1637  __swig_destroy__ = _IMP_em2d.delete_TIFFImageReaderWriter
1638 
1639  def __str__(self):
1640  r"""__str__(TIFFImageReaderWriter self) -> std::string"""
1641  return _IMP_em2d.TIFFImageReaderWriter___str__(self)
1642 
1643  def __repr__(self):
1644  r"""__repr__(TIFFImageReaderWriter self) -> std::string"""
1645  return _IMP_em2d.TIFFImageReaderWriter___repr__(self)
1646 
1647  @staticmethod
1648  def get_from(o):
1649  return _object_cast_to_TIFFImageReaderWriter(o)
1650 
1651 
1652 # Register TIFFImageReaderWriter in _IMP_em2d:
1653 _IMP_em2d.TIFFImageReaderWriter_swigregister(TIFFImageReaderWriter)
1654 
1656  r"""do_matrix_to_image_flip(cv::Mat & m)"""
1657  return _IMP_em2d.do_matrix_to_image_flip(m)
1658 
1660  r"""get_autocorrelation2d_no_preprocessing(cv::Mat const & M, cv::Mat & corr)"""
1661  return _IMP_em2d.get_autocorrelation2d_no_preprocessing(M, corr)
1662 
1663 def get_autocorrelation2d(*args):
1664  r"""
1665  get_autocorrelation2d(Image im1, Image im2)
1666  get_autocorrelation2d(cv::Mat const & m, cv::Mat & corr)
1667  """
1668  return _IMP_em2d.get_autocorrelation2d(*args)
1669 
1670 def get_correlation2d(*args):
1671  r"""
1672  get_correlation2d(Image im1, Image im2, Image corr)
1673  get_correlation2d(cv::Mat const & A, cv::Mat const & B, cv::Mat & corr)
1674  """
1675  return _IMP_em2d.get_correlation2d(*args)
1676 
1677 def get_correlation2d_no_preprocessing(M1, M2, corr):
1678  r"""get_correlation2d_no_preprocessing(cv::Mat const & M1, cv::Mat const & M2, cv::Mat & corr)"""
1679  return _IMP_em2d.get_correlation2d_no_preprocessing(M1, M2, corr)
1680 
1681 def get_fft_using_optimal_size(m, M):
1682  r"""get_fft_using_optimal_size(cv::Mat const & m, cv::Mat & M)"""
1683  return _IMP_em2d.get_fft_using_optimal_size(m, M)
1684 
1685 def get_spectrum(m, real, imag):
1686  r"""get_spectrum(cv::Mat const & m, cv::Mat & real, cv::Mat & imag)"""
1687  return _IMP_em2d.get_spectrum(m, real, imag)
1688 
1689 def get_rotation_error(rr1, rr2):
1690  r"""get_rotation_error(RegistrationResult rr1, RegistrationResult rr2) -> double"""
1691  return _IMP_em2d.get_rotation_error(rr1, rr2)
1692 
1693 def get_shift_error(rr1, rr2):
1694  r"""get_shift_error(RegistrationResult rr1, RegistrationResult rr2) -> double"""
1695  return _IMP_em2d.get_shift_error(rr1, rr2)
1696 
1697 def get_average_rotation_error(correct_RRs, computed_RRs):
1698  r"""get_average_rotation_error(IMP::em2d::RegistrationResults const & correct_RRs, IMP::em2d::RegistrationResults const & computed_RRs) -> double"""
1699  return _IMP_em2d.get_average_rotation_error(correct_RRs, computed_RRs)
1700 
1701 def get_average_shift_error(correct_RRs, computed_RRs):
1702  r"""get_average_shift_error(IMP::em2d::RegistrationResults const & correct_RRs, IMP::em2d::RegistrationResults const & computed_RRs) -> double"""
1703  return _IMP_em2d.get_average_shift_error(correct_RRs, computed_RRs)
1704 
1706  r"""
1707  get_cross_correlation_coefficient(Image im1, Image im2) -> double
1708  get_cross_correlation_coefficient(cv::Mat const & m1, cv::Mat const & m2) -> double
1709  """
1710  return _IMP_em2d.get_cross_correlation_coefficient(*args)
1711 
1712 def get_global_score(RRs):
1713  r"""get_global_score(IMP::em2d::RegistrationResults const & RRs) -> double"""
1714  return _IMP_em2d.get_global_score(RRs)
1715 class ScoreFunction(IMP.Object):
1716  r"""Proxy of C++ IMP::em2d::ScoreFunction class."""
1717 
1718  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1719 
1720  def __init__(self, *args, **kwargs):
1721  raise AttributeError("No constructor defined - class is abstract")
1722 
1723  def get_score(self, image, projection):
1724  r"""get_score(ScoreFunction self, Image image, Image projection) -> double"""
1725  return _IMP_em2d.ScoreFunction_get_score(self, image, projection)
1726 
1727  def set_variance_image(self, var):
1728  r"""set_variance_image(ScoreFunction self, Image var)"""
1729  return _IMP_em2d.ScoreFunction_set_variance_image(self, var)
1730 
1731  def get_version_info(self):
1732  r"""get_version_info(ScoreFunction self) -> VersionInfo"""
1733  return _IMP_em2d.ScoreFunction_get_version_info(self)
1734  __swig_destroy__ = _IMP_em2d.delete_ScoreFunction
1735 
1736  def __str__(self):
1737  r"""__str__(ScoreFunction self) -> std::string"""
1738  return _IMP_em2d.ScoreFunction___str__(self)
1739 
1740  def __repr__(self):
1741  r"""__repr__(ScoreFunction self) -> std::string"""
1742  return _IMP_em2d.ScoreFunction___repr__(self)
1743 
1744  @staticmethod
1745  def get_from(o):
1746  return _object_cast_to_ScoreFunction(o)
1747 
1748 
1749 # Register ScoreFunction in _IMP_em2d:
1750 _IMP_em2d.ScoreFunction_swigregister(ScoreFunction)
1751 class ChiSquaredScore(ScoreFunction):
1752  r"""Proxy of C++ IMP::em2d::ChiSquaredScore class."""
1753 
1754  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1755 
1756  def __init__(self):
1757  r"""__init__(ChiSquaredScore self) -> ChiSquaredScore"""
1758  _IMP_em2d.ChiSquaredScore_swiginit(self, _IMP_em2d.new_ChiSquaredScore())
1759 
1760  def __str__(self):
1761  r"""__str__(ChiSquaredScore self) -> std::string"""
1762  return _IMP_em2d.ChiSquaredScore___str__(self)
1763 
1764  def __repr__(self):
1765  r"""__repr__(ChiSquaredScore self) -> std::string"""
1766  return _IMP_em2d.ChiSquaredScore___repr__(self)
1767 
1768  @staticmethod
1769  def get_from(o):
1770  return _object_cast_to_ChiSquaredScore(o)
1771 
1772  __swig_destroy__ = _IMP_em2d.delete_ChiSquaredScore
1773 
1774 # Register ChiSquaredScore in _IMP_em2d:
1775 _IMP_em2d.ChiSquaredScore_swigregister(ChiSquaredScore)
1776 class EM2DScore(ScoreFunction):
1777  r"""Proxy of C++ IMP::em2d::EM2DScore class."""
1778 
1779  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1780 
1781  def __init__(self):
1782  r"""__init__(EM2DScore self) -> EM2DScore"""
1783  _IMP_em2d.EM2DScore_swiginit(self, _IMP_em2d.new_EM2DScore())
1784 
1785  def __str__(self):
1786  r"""__str__(EM2DScore self) -> std::string"""
1787  return _IMP_em2d.EM2DScore___str__(self)
1788 
1789  def __repr__(self):
1790  r"""__repr__(EM2DScore self) -> std::string"""
1791  return _IMP_em2d.EM2DScore___repr__(self)
1792 
1793  @staticmethod
1794  def get_from(o):
1795  return _object_cast_to_EM2DScore(o)
1796 
1797  __swig_destroy__ = _IMP_em2d.delete_EM2DScore
1798 
1799 # Register EM2DScore in _IMP_em2d:
1800 _IMP_em2d.EM2DScore_swigregister(EM2DScore)
1801 class MeanAbsoluteDifference(ScoreFunction):
1802  r"""Proxy of C++ IMP::em2d::MeanAbsoluteDifference class."""
1803 
1804  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1805 
1806  def __init__(self):
1807  r"""__init__(MeanAbsoluteDifference self) -> MeanAbsoluteDifference"""
1808  _IMP_em2d.MeanAbsoluteDifference_swiginit(self, _IMP_em2d.new_MeanAbsoluteDifference())
1809 
1810  def __str__(self):
1811  r"""__str__(MeanAbsoluteDifference self) -> std::string"""
1812  return _IMP_em2d.MeanAbsoluteDifference___str__(self)
1813 
1814  def __repr__(self):
1815  r"""__repr__(MeanAbsoluteDifference self) -> std::string"""
1816  return _IMP_em2d.MeanAbsoluteDifference___repr__(self)
1817 
1818  @staticmethod
1819  def get_from(o):
1820  return _object_cast_to_MeanAbsoluteDifference(o)
1821 
1822  __swig_destroy__ = _IMP_em2d.delete_MeanAbsoluteDifference
1823 
1824 # Register MeanAbsoluteDifference in _IMP_em2d:
1825 _IMP_em2d.MeanAbsoluteDifference_swigregister(MeanAbsoluteDifference)
1826 
1827 def read_selection_file(fn):
1828  r"""read_selection_file(IMP::String fn) -> IMP::Strings"""
1829  return _IMP_em2d.read_selection_file(fn)
1830 
1831 def create_filenames(number, basic_name, extension):
1832  r"""create_filenames(unsigned long number, IMP::String basic_name, IMP::String extension) -> IMP::Strings"""
1833  return _IMP_em2d.create_filenames(number, basic_name, extension)
1834 class ProjectionParameters(IMP.Decorator):
1835  r"""Proxy of C++ IMP::em2d::ProjectionParameters class."""
1836 
1837  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1838 
1839  def __init__(self, *args):
1840  r"""
1841  __init__(ProjectionParameters self) -> ProjectionParameters
1842  __init__(ProjectionParameters self, Model m, ParticleIndex id) -> ProjectionParameters
1843  __init__(ProjectionParameters self, _ParticleAdaptor d) -> ProjectionParameters
1844  """
1845  _IMP_em2d.ProjectionParameters_swiginit(self, _IMP_em2d.new_ProjectionParameters(*args))
1846 
1847  def show(self, *args):
1848  r"""show(ProjectionParameters self, _ostream out=std::cout)"""
1849  return _IMP_em2d.ProjectionParameters_show(self, *args)
1850 
1851  @staticmethod
1852  def setup_particle(*args):
1853  r"""
1854  setup_particle(Model m, ParticleIndex pi) -> ProjectionParameters
1855  setup_particle(_ParticleAdaptor pa) -> ProjectionParameters
1856  """
1857  return _IMP_em2d.ProjectionParameters_setup_particle(*args)
1858  __swig_destroy__ = _IMP_em2d.delete_ProjectionParameters
1859 
1860  @staticmethod
1861  def get_keys():
1862  r"""get_keys() -> IMP::FloatKeys const &"""
1863  return _IMP_em2d.ProjectionParameters_get_keys()
1864 
1865  def set_proper_ranges_for_keys(self, m, min_translation_values, max_translation_values):
1866  r"""set_proper_ranges_for_keys(ProjectionParameters self, Model m, Vector3D min_translation_values, Vector3D max_translation_values)"""
1867  return _IMP_em2d.ProjectionParameters_set_proper_ranges_for_keys(self, m, min_translation_values, max_translation_values)
1868 
1869  @staticmethod
1870  def get_is_setup(*args):
1871  r"""
1872  get_is_setup(_ParticleAdaptor p) -> bool
1873  get_is_setup(Model m, ParticleIndex pi) -> bool
1874  """
1875  return _IMP_em2d.ProjectionParameters_get_is_setup(*args)
1876 
1877  def get_parameters_optimized(self):
1878  r"""get_parameters_optimized(ProjectionParameters self) -> bool"""
1879  return _IMP_em2d.ProjectionParameters_get_parameters_optimized(self)
1880 
1881  def get_translation(self):
1882  r"""get_translation(ProjectionParameters self) -> Vector3D"""
1883  return _IMP_em2d.ProjectionParameters_get_translation(self)
1884 
1885  def set_translation(self, v):
1886  r"""set_translation(ProjectionParameters self, Vector3D v)"""
1887  return _IMP_em2d.ProjectionParameters_set_translation(self, v)
1888 
1889  def get_rotation(self):
1890  r"""get_rotation(ProjectionParameters self) -> Rotation3D"""
1891  return _IMP_em2d.ProjectionParameters_get_rotation(self)
1892 
1893  def set_rotation(self, R):
1894  r"""set_rotation(ProjectionParameters self, Rotation3D R)"""
1895  return _IMP_em2d.ProjectionParameters_set_rotation(self, R)
1896 
1897  def set_parameters_optimized(self, tf):
1898  r"""set_parameters_optimized(ProjectionParameters self, bool tf)"""
1899  return _IMP_em2d.ProjectionParameters_set_parameters_optimized(self, tf)
1900 
1901  def get_quaternion_1(self):
1902  r"""get_quaternion_1(ProjectionParameters self) -> double"""
1903  return _IMP_em2d.ProjectionParameters_get_quaternion_1(self)
1904 
1905  def set_quaternion_1(self, t):
1906  r"""set_quaternion_1(ProjectionParameters self, double t)"""
1907  return _IMP_em2d.ProjectionParameters_set_quaternion_1(self, t)
1908 
1909  def get_quaternion_2(self):
1910  r"""get_quaternion_2(ProjectionParameters self) -> double"""
1911  return _IMP_em2d.ProjectionParameters_get_quaternion_2(self)
1912 
1913  def set_quaternion_2(self, t):
1914  r"""set_quaternion_2(ProjectionParameters self, double t)"""
1915  return _IMP_em2d.ProjectionParameters_set_quaternion_2(self, t)
1916 
1917  def get_quaternion_3(self):
1918  r"""get_quaternion_3(ProjectionParameters self) -> double"""
1919  return _IMP_em2d.ProjectionParameters_get_quaternion_3(self)
1920 
1921  def set_quaternion_3(self, t):
1922  r"""set_quaternion_3(ProjectionParameters self, double t)"""
1923  return _IMP_em2d.ProjectionParameters_set_quaternion_3(self, t)
1924 
1925  def get_quaternion_4(self):
1926  r"""get_quaternion_4(ProjectionParameters self) -> double"""
1927  return _IMP_em2d.ProjectionParameters_get_quaternion_4(self)
1928 
1929  def set_quaternion_4(self, t):
1930  r"""set_quaternion_4(ProjectionParameters self, double t)"""
1931  return _IMP_em2d.ProjectionParameters_set_quaternion_4(self, t)
1932 
1933  def get_translation_x(self):
1934  r"""get_translation_x(ProjectionParameters self) -> double"""
1935  return _IMP_em2d.ProjectionParameters_get_translation_x(self)
1936 
1937  def set_translation_x(self, t):
1938  r"""set_translation_x(ProjectionParameters self, double t)"""
1939  return _IMP_em2d.ProjectionParameters_set_translation_x(self, t)
1940 
1941  def get_translation_y(self):
1942  r"""get_translation_y(ProjectionParameters self) -> double"""
1943  return _IMP_em2d.ProjectionParameters_get_translation_y(self)
1944 
1945  def set_translation_y(self, t):
1946  r"""set_translation_y(ProjectionParameters self, double t)"""
1947  return _IMP_em2d.ProjectionParameters_set_translation_y(self, t)
1948 
1949  def add_attribute(self, *args):
1950  r"""
1951  add_attribute(ProjectionParameters self, FloatKey k, IMP::Float v, bool opt)
1952  add_attribute(ProjectionParameters self, FloatKey a0, IMP::Float a1)
1953  add_attribute(ProjectionParameters self, IntKey a0, IMP::Int a1)
1954  add_attribute(ProjectionParameters self, FloatsKey a0, IMP::Floats a1)
1955  add_attribute(ProjectionParameters self, IntsKey a0, IMP::Ints a1)
1956  add_attribute(ProjectionParameters self, StringKey a0, IMP::String a1)
1957  add_attribute(ProjectionParameters self, ParticleIndexKey a0, Particle a1)
1958  add_attribute(ProjectionParameters self, ObjectKey a0, Object a1)
1959  add_attribute(ProjectionParameters self, SparseFloatKey a0, IMP::Float a1)
1960  add_attribute(ProjectionParameters self, SparseIntKey a0, IMP::Int a1)
1961  add_attribute(ProjectionParameters self, SparseStringKey a0, IMP::String a1)
1962  add_attribute(ProjectionParameters self, SparseParticleIndexKey a0, ParticleIndex a1)
1963  """
1964  return _IMP_em2d.ProjectionParameters_add_attribute(self, *args)
1965 
1966  def get_value(self, *args):
1967  r"""
1968  get_value(ProjectionParameters self, FloatKey a0) -> IMP::Float
1969  get_value(ProjectionParameters self, IntKey a0) -> IMP::Int
1970  get_value(ProjectionParameters self, FloatsKey a0) -> IMP::Floats
1971  get_value(ProjectionParameters self, IntsKey a0) -> IMP::Ints
1972  get_value(ProjectionParameters self, StringKey a0) -> IMP::String
1973  get_value(ProjectionParameters self, ParticleIndexKey a0) -> Particle
1974  get_value(ProjectionParameters self, ObjectKey a0) -> Object
1975  get_value(ProjectionParameters self, SparseFloatKey a0) -> IMP::Float
1976  get_value(ProjectionParameters self, SparseIntKey a0) -> IMP::Int
1977  get_value(ProjectionParameters self, SparseStringKey a0) -> IMP::String
1978  get_value(ProjectionParameters self, SparseParticleIndexKey a0) -> ParticleIndex
1979  """
1980  return _IMP_em2d.ProjectionParameters_get_value(self, *args)
1981 
1982  def set_value(self, *args):
1983  r"""
1984  set_value(ProjectionParameters self, FloatKey a0, IMP::Float a1)
1985  set_value(ProjectionParameters self, IntKey a0, IMP::Int a1)
1986  set_value(ProjectionParameters self, FloatsKey a0, IMP::Floats a1)
1987  set_value(ProjectionParameters self, IntsKey a0, IMP::Ints a1)
1988  set_value(ProjectionParameters self, StringKey a0, IMP::String a1)
1989  set_value(ProjectionParameters self, ParticleIndexKey a0, Particle a1)
1990  set_value(ProjectionParameters self, ObjectKey a0, Object a1)
1991  set_value(ProjectionParameters self, SparseFloatKey a0, IMP::Float a1)
1992  set_value(ProjectionParameters self, SparseIntKey a0, IMP::Int a1)
1993  set_value(ProjectionParameters self, SparseStringKey a0, IMP::String a1)
1994  set_value(ProjectionParameters self, SparseParticleIndexKey a0, ParticleIndex a1)
1995  """
1996  return _IMP_em2d.ProjectionParameters_set_value(self, *args)
1997 
1998  def remove_attribute(self, *args):
1999  r"""
2000  remove_attribute(ProjectionParameters self, FloatKey a0)
2001  remove_attribute(ProjectionParameters self, IntKey a0)
2002  remove_attribute(ProjectionParameters self, FloatsKey a0)
2003  remove_attribute(ProjectionParameters self, IntsKey a0)
2004  remove_attribute(ProjectionParameters self, StringKey a0)
2005  remove_attribute(ProjectionParameters self, ParticleIndexKey a0)
2006  remove_attribute(ProjectionParameters self, ObjectKey a0)
2007  remove_attribute(ProjectionParameters self, SparseFloatKey a0)
2008  remove_attribute(ProjectionParameters self, SparseIntKey a0)
2009  remove_attribute(ProjectionParameters self, SparseStringKey a0)
2010  remove_attribute(ProjectionParameters self, SparseParticleIndexKey a0)
2011  """
2012  return _IMP_em2d.ProjectionParameters_remove_attribute(self, *args)
2013 
2014  def has_attribute(self, *args):
2015  r"""
2016  has_attribute(ProjectionParameters self, FloatKey a0) -> bool
2017  has_attribute(ProjectionParameters self, IntKey a0) -> bool
2018  has_attribute(ProjectionParameters self, FloatsKey a0) -> bool
2019  has_attribute(ProjectionParameters self, IntsKey a0) -> bool
2020  has_attribute(ProjectionParameters self, StringKey a0) -> bool
2021  has_attribute(ProjectionParameters self, ParticleIndexKey a0) -> bool
2022  has_attribute(ProjectionParameters self, ObjectKey a0) -> bool
2023  has_attribute(ProjectionParameters self, SparseFloatKey a0) -> bool
2024  has_attribute(ProjectionParameters self, SparseIntKey a0) -> bool
2025  has_attribute(ProjectionParameters self, SparseStringKey a0) -> bool
2026  has_attribute(ProjectionParameters self, SparseParticleIndexKey a0) -> bool
2027  """
2028  return _IMP_em2d.ProjectionParameters_has_attribute(self, *args)
2029 
2030  def get_derivative(self, a0):
2031  r"""get_derivative(ProjectionParameters self, FloatKey a0) -> double"""
2032  return _IMP_em2d.ProjectionParameters_get_derivative(self, a0)
2033 
2034  def get_name(self):
2035  r"""get_name(ProjectionParameters self) -> std::string"""
2036  return _IMP_em2d.ProjectionParameters_get_name(self)
2037 
2038  def clear_caches(self):
2039  r"""clear_caches(ProjectionParameters self)"""
2040  return _IMP_em2d.ProjectionParameters_clear_caches(self)
2041 
2042  def set_name(self, a0):
2043  r"""set_name(ProjectionParameters self, std::string a0)"""
2044  return _IMP_em2d.ProjectionParameters_set_name(self, a0)
2045 
2046  def set_check_level(self, a0):
2047  r"""set_check_level(ProjectionParameters self, IMP::CheckLevel a0)"""
2048  return _IMP_em2d.ProjectionParameters_set_check_level(self, a0)
2049 
2050  def add_to_derivative(self, a0, a1, a2):
2051  r"""add_to_derivative(ProjectionParameters self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
2052  return _IMP_em2d.ProjectionParameters_add_to_derivative(self, a0, a1, a2)
2053 
2054  def set_is_optimized(self, a0, a1):
2055  r"""set_is_optimized(ProjectionParameters self, FloatKey a0, bool a1)"""
2056  return _IMP_em2d.ProjectionParameters_set_is_optimized(self, a0, a1)
2057 
2058  def get_is_optimized(self, a0):
2059  r"""get_is_optimized(ProjectionParameters self, FloatKey a0) -> bool"""
2060  return _IMP_em2d.ProjectionParameters_get_is_optimized(self, a0)
2061 
2062  def get_check_level(self):
2063  r"""get_check_level(ProjectionParameters self) -> IMP::CheckLevel"""
2064  return _IMP_em2d.ProjectionParameters_get_check_level(self)
2065 
2066  def __eq__(self, *args):
2067  r"""
2068  __eq__(ProjectionParameters self, ProjectionParameters o) -> bool
2069  __eq__(ProjectionParameters self, Particle d) -> bool
2070  """
2071  return _IMP_em2d.ProjectionParameters___eq__(self, *args)
2072 
2073  def __ne__(self, *args):
2074  r"""
2075  __ne__(ProjectionParameters self, ProjectionParameters o) -> bool
2076  __ne__(ProjectionParameters self, Particle d) -> bool
2077  """
2078  return _IMP_em2d.ProjectionParameters___ne__(self, *args)
2079 
2080  def __le__(self, *args):
2081  r"""
2082  __le__(ProjectionParameters self, ProjectionParameters o) -> bool
2083  __le__(ProjectionParameters self, Particle d) -> bool
2084  """
2085  return _IMP_em2d.ProjectionParameters___le__(self, *args)
2086 
2087  def __lt__(self, *args):
2088  r"""
2089  __lt__(ProjectionParameters self, ProjectionParameters o) -> bool
2090  __lt__(ProjectionParameters self, Particle d) -> bool
2091  """
2092  return _IMP_em2d.ProjectionParameters___lt__(self, *args)
2093 
2094  def __ge__(self, *args):
2095  r"""
2096  __ge__(ProjectionParameters self, ProjectionParameters o) -> bool
2097  __ge__(ProjectionParameters self, Particle d) -> bool
2098  """
2099  return _IMP_em2d.ProjectionParameters___ge__(self, *args)
2100 
2101  def __gt__(self, *args):
2102  r"""
2103  __gt__(ProjectionParameters self, ProjectionParameters o) -> bool
2104  __gt__(ProjectionParameters self, Particle d) -> bool
2105  """
2106  return _IMP_em2d.ProjectionParameters___gt__(self, *args)
2107 
2108  def __hash__(self):
2109  r"""__hash__(ProjectionParameters self) -> std::size_t"""
2110  return _IMP_em2d.ProjectionParameters___hash__(self)
2111 
2112  def __str__(self):
2113  r"""__str__(ProjectionParameters self) -> std::string"""
2114  return _IMP_em2d.ProjectionParameters___str__(self)
2115 
2116  def __repr__(self):
2117  r"""__repr__(ProjectionParameters self) -> std::string"""
2118  return _IMP_em2d.ProjectionParameters___repr__(self)
2119 
2120  def _get_as_binary(self):
2121  r"""_get_as_binary(ProjectionParameters self) -> PyObject *"""
2122  return _IMP_em2d.ProjectionParameters__get_as_binary(self)
2123 
2124  def _set_from_binary(self, p):
2125  r"""_set_from_binary(ProjectionParameters self, PyObject * p)"""
2126  return _IMP_em2d.ProjectionParameters__set_from_binary(self, p)
2127 
2128  def __getstate__(self):
2129  p = self._get_as_binary()
2130  if len(self.__dict__) > 1:
2131  d = self.__dict__.copy()
2132  del d['this']
2133  p = (d, p)
2134  return p
2135 
2136  def __setstate__(self, p):
2137  if not hasattr(self, 'this'):
2138  self.__init__()
2139  if isinstance(p, tuple):
2140  d, p = p
2141  self.__dict__.update(d)
2142  return self._set_from_binary(p)
2143 
2144 
2145 # Register ProjectionParameters in _IMP_em2d:
2146 _IMP_em2d.ProjectionParameters_swigregister(ProjectionParameters)
2147 
2148 def __lshift__(out, n):
2149  r"""__lshift__(_ostream out, ProjectionParameters n) -> _ostream"""
2150  return _IMP_em2d.__lshift__(out, n)
2151 class ProjectionParametersScoreState(IMP.ScoreState):
2152  r"""Proxy of C++ IMP::em2d::ProjectionParametersScoreState class."""
2153 
2154  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2155 
2156  def __init__(self, p):
2157  r"""__init__(ProjectionParametersScoreState self, Particle p) -> ProjectionParametersScoreState"""
2158  _IMP_em2d.ProjectionParametersScoreState_swiginit(self, _IMP_em2d.new_ProjectionParametersScoreState(p))
2159 
2160  def do_before_evaluate(self):
2161  r"""do_before_evaluate(ProjectionParametersScoreState self)"""
2162  return _IMP_em2d.ProjectionParametersScoreState_do_before_evaluate(self)
2163 
2164  def do_after_evaluate(self, da):
2165  r"""do_after_evaluate(ProjectionParametersScoreState self, DerivativeAccumulator da)"""
2166  return _IMP_em2d.ProjectionParametersScoreState_do_after_evaluate(self, da)
2167 
2168  def do_get_inputs(self):
2169  r"""do_get_inputs(ProjectionParametersScoreState self) -> IMP::ModelObjectsTemp"""
2170  return _IMP_em2d.ProjectionParametersScoreState_do_get_inputs(self)
2171 
2172  def do_get_outputs(self):
2173  r"""do_get_outputs(ProjectionParametersScoreState self) -> IMP::ModelObjectsTemp"""
2174  return _IMP_em2d.ProjectionParametersScoreState_do_get_outputs(self)
2175 
2176  def get_version_info(self):
2177  r"""get_version_info(ProjectionParametersScoreState self) -> VersionInfo"""
2178  return _IMP_em2d.ProjectionParametersScoreState_get_version_info(self)
2179  __swig_destroy__ = _IMP_em2d.delete_ProjectionParametersScoreState
2180 
2181  def __str__(self):
2182  r"""__str__(ProjectionParametersScoreState self) -> std::string"""
2183  return _IMP_em2d.ProjectionParametersScoreState___str__(self)
2184 
2185  def __repr__(self):
2186  r"""__repr__(ProjectionParametersScoreState self) -> std::string"""
2187  return _IMP_em2d.ProjectionParametersScoreState___repr__(self)
2188 
2189  @staticmethod
2190  def get_from(o):
2191  return _object_cast_to_ProjectionParametersScoreState(o)
2192 
2193 
2194 # Register ProjectionParametersScoreState in _IMP_em2d:
2195 _IMP_em2d.ProjectionParametersScoreState_swigregister(ProjectionParametersScoreState)
2196 class ProjectionMask(object):
2197  r"""Proxy of C++ IMP::em2d::ProjectionMask class."""
2198 
2199  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2200 
2201  def __init__(self):
2202  r"""__init__(ProjectionMask self) -> ProjectionMask"""
2203  _IMP_em2d.ProjectionMask_swiginit(self, _IMP_em2d.new_ProjectionMask())
2204 
2205  def apply(self, m, v):
2206  r"""apply(ProjectionMask self, cv::Mat & m, Vector2D v)"""
2207  return _IMP_em2d.ProjectionMask_apply(self, m, v)
2208 
2209  def show(self, *args):
2210  r"""show(ProjectionMask self, _ostream out=std::cout)"""
2211  return _IMP_em2d.ProjectionMask_show(self, *args)
2212  __swig_destroy__ = _IMP_em2d.delete_ProjectionMask
2213 
2214  def __str__(self):
2215  r"""__str__(ProjectionMask self) -> std::string"""
2216  return _IMP_em2d.ProjectionMask___str__(self)
2217 
2218  def __repr__(self):
2219  r"""__repr__(ProjectionMask self) -> std::string"""
2220  return _IMP_em2d.ProjectionMask___repr__(self)
2221 
2222  def _get_as_binary(self):
2223  r"""_get_as_binary(ProjectionMask self) -> PyObject *"""
2224  return _IMP_em2d.ProjectionMask__get_as_binary(self)
2225 
2226  def _set_from_binary(self, p):
2227  r"""_set_from_binary(ProjectionMask self, PyObject * p)"""
2228  return _IMP_em2d.ProjectionMask__set_from_binary(self, p)
2229 
2230  def __getstate__(self):
2231  p = self._get_as_binary()
2232  if len(self.__dict__) > 1:
2233  d = self.__dict__.copy()
2234  del d['this']
2235  p = (d, p)
2236  return p
2237 
2238  def __setstate__(self, p):
2239  if not hasattr(self, 'this'):
2240  self.__init__()
2241  if isinstance(p, tuple):
2242  d, p = p
2243  self.__dict__.update(d)
2244  return self._set_from_binary(p)
2245 
2246 
2247 # Register ProjectionMask in _IMP_em2d:
2248 _IMP_em2d.ProjectionMask_swigregister(ProjectionMask)
2249 
2250 def do_place(mask, m, v):
2251  r"""do_place(cv::Mat & mask, cv::Mat & m, Vector2D v)"""
2252  return _IMP_em2d.do_place(mask, m, v)
2253 class MasksManager(object):
2254  r"""Proxy of C++ IMP::em2d::MasksManager class."""
2255 
2256  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2257 
2258  def __init__(self, *args):
2259  r"""
2260  __init__(MasksManager self) -> MasksManager
2261  __init__(MasksManager self, double resolution, double pixelsize) -> MasksManager
2262  """
2263  _IMP_em2d.MasksManager_swiginit(self, _IMP_em2d.new_MasksManager(*args))
2264 
2265  def setup_kernel(self, resolution, pixelsize):
2266  r"""setup_kernel(MasksManager self, double resolution, double pixelsize)"""
2267  return _IMP_em2d.MasksManager_setup_kernel(self, resolution, pixelsize)
2268 
2269  def create_masks(self, ps):
2270  r"""create_masks(MasksManager self, IMP::ParticlesTemp const & ps)"""
2271  return _IMP_em2d.MasksManager_create_masks(self, ps)
2272 
2273  def create_mask(self, mass):
2274  r"""create_mask(MasksManager self, double mass)"""
2275  return _IMP_em2d.MasksManager_create_mask(self, mass)
2276 
2277  def find_mask(self, mass):
2278  r"""find_mask(MasksManager self, double mass) -> IMP::em2d::ProjectionMaskPtr"""
2279  return _IMP_em2d.MasksManager_find_mask(self, mass)
2280 
2281  def show(self, *args):
2282  r"""show(MasksManager self, _ostream out=std::cout)"""
2283  return _IMP_em2d.MasksManager_show(self, *args)
2284 
2285  def get_number_of_masks(self):
2286  r"""get_number_of_masks(MasksManager self) -> unsigned int"""
2287  return _IMP_em2d.MasksManager_get_number_of_masks(self)
2288  __swig_destroy__ = _IMP_em2d.delete_MasksManager
2289 
2290  def __str__(self):
2291  r"""__str__(MasksManager self) -> std::string"""
2292  return _IMP_em2d.MasksManager___str__(self)
2293 
2294  def __repr__(self):
2295  r"""__repr__(MasksManager self) -> std::string"""
2296  return _IMP_em2d.MasksManager___repr__(self)
2297 
2298  def _get_as_binary(self):
2299  r"""_get_as_binary(MasksManager self) -> PyObject *"""
2300  return _IMP_em2d.MasksManager__get_as_binary(self)
2301 
2302  def _set_from_binary(self, p):
2303  r"""_set_from_binary(MasksManager self, PyObject * p)"""
2304  return _IMP_em2d.MasksManager__set_from_binary(self, p)
2305 
2306  def __getstate__(self):
2307  p = self._get_as_binary()
2308  if len(self.__dict__) > 1:
2309  d = self.__dict__.copy()
2310  del d['this']
2311  p = (d, p)
2312  return p
2313 
2314  def __setstate__(self, p):
2315  if not hasattr(self, 'this'):
2316  self.__init__()
2317  if isinstance(p, tuple):
2318  d, p = p
2319  self.__dict__.update(d)
2320  return self._set_from_binary(p)
2321 
2322 
2323 # Register MasksManager in _IMP_em2d:
2324 _IMP_em2d.MasksManager_swigregister(MasksManager)
2325 class ProjectingParameters(object):
2326  r"""Proxy of C++ IMP::em2d::ProjectingParameters class."""
2327 
2328  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2329  pixel_size = property(_IMP_em2d.ProjectingParameters_pixel_size_get, _IMP_em2d.ProjectingParameters_pixel_size_set, doc=r"""pixel_size : double""")
2330  resolution = property(_IMP_em2d.ProjectingParameters_resolution_get, _IMP_em2d.ProjectingParameters_resolution_set, doc=r"""resolution : double""")
2331 
2332  def __init__(self, *args):
2333  r"""
2334  __init__(ProjectingParameters self) -> ProjectingParameters
2335  __init__(ProjectingParameters self, double ps, double res) -> ProjectingParameters
2336  """
2337  _IMP_em2d.ProjectingParameters_swiginit(self, _IMP_em2d.new_ProjectingParameters(*args))
2338 
2339  def show(self, *args):
2340  r"""show(ProjectingParameters self, _ostream out=std::cout)"""
2341  return _IMP_em2d.ProjectingParameters_show(self, *args)
2342 
2343  def __str__(self):
2344  r"""__str__(ProjectingParameters self) -> std::string"""
2345  return _IMP_em2d.ProjectingParameters___str__(self)
2346 
2347  def __repr__(self):
2348  r"""__repr__(ProjectingParameters self) -> std::string"""
2349  return _IMP_em2d.ProjectingParameters___repr__(self)
2350 
2351  def _get_as_binary(self):
2352  r"""_get_as_binary(ProjectingParameters self) -> PyObject *"""
2353  return _IMP_em2d.ProjectingParameters__get_as_binary(self)
2354 
2355  def _set_from_binary(self, p):
2356  r"""_set_from_binary(ProjectingParameters self, PyObject * p)"""
2357  return _IMP_em2d.ProjectingParameters__set_from_binary(self, p)
2358 
2359  def __getstate__(self):
2360  p = self._get_as_binary()
2361  if len(self.__dict__) > 1:
2362  d = self.__dict__.copy()
2363  del d['this']
2364  p = (d, p)
2365  return p
2366 
2367  def __setstate__(self, p):
2368  if not hasattr(self, 'this'):
2369  self.__init__()
2370  if isinstance(p, tuple):
2371  d, p = p
2372  self.__dict__.update(d)
2373  return self._set_from_binary(p)
2374 
2375  __swig_destroy__ = _IMP_em2d.delete_ProjectingParameters
2376 
2377 # Register ProjectingParameters in _IMP_em2d:
2378 _IMP_em2d.ProjectingParameters_swigregister(ProjectingParameters)
2379 class ProjectingOptions(ProjectingParameters):
2380  r"""Proxy of C++ IMP::em2d::ProjectingOptions class."""
2381 
2382  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2383  save_images = property(_IMP_em2d.ProjectingOptions_save_images_get, _IMP_em2d.ProjectingOptions_save_images_set, doc=r"""save_images : bool""")
2384  normalize = property(_IMP_em2d.ProjectingOptions_normalize_get, _IMP_em2d.ProjectingOptions_normalize_set, doc=r"""normalize : bool""")
2385  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""")
2386 
2387  def __init__(self, *args):
2388  r"""
2389  __init__(ProjectingOptions self) -> ProjectingOptions
2390  __init__(ProjectingOptions self, double ps, double res) -> ProjectingOptions
2391  __init__(ProjectingOptions self, double ps, double res, ImageReaderWriter irw) -> ProjectingOptions
2392  """
2393  _IMP_em2d.ProjectingOptions_swiginit(self, _IMP_em2d.new_ProjectingOptions(*args))
2394 
2395  def show(self, *args):
2396  r"""show(ProjectingOptions self, _ostream out=std::cout)"""
2397  return _IMP_em2d.ProjectingOptions_show(self, *args)
2398 
2399  def __str__(self):
2400  r"""__str__(ProjectingOptions self) -> std::string"""
2401  return _IMP_em2d.ProjectingOptions___str__(self)
2402 
2403  def __repr__(self):
2404  r"""__repr__(ProjectingOptions self) -> std::string"""
2405  return _IMP_em2d.ProjectingOptions___repr__(self)
2406  __swig_destroy__ = _IMP_em2d.delete_ProjectingOptions
2407 
2408 # Register ProjectingOptions in _IMP_em2d:
2409 _IMP_em2d.ProjectingOptions_swigregister(ProjectingOptions)
2410 
2411 def get_projections(*args):
2412  r"""
2413  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
2414  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
2415  """
2416  return _IMP_em2d.get_projections(*args)
2417 
2418 def get_projection(*args):
2419  r"""get_projection(Image img, IMP::ParticlesTemp const & ps, RegistrationResult reg, ProjectingOptions options, IMP::em2d::MasksManagerPtr masks=IMP::em2d::MasksManagerPtr(), IMP::String name="")"""
2420  return _IMP_em2d.get_projection(*args)
2421 
2422 def do_project_particles(ps, m2, R, translation, options, masks):
2423  r"""do_project_particles(IMP::ParticlesTemp const & ps, cv::Mat & m2, Rotation3D R, Vector3D translation, ProjectingOptions options, IMP::em2d::MasksManagerPtr masks)"""
2424  return _IMP_em2d.do_project_particles(ps, m2, R, translation, options, masks)
2425 
2426 def create_evenly_distributed_projections(ps, n, options):
2427  r"""create_evenly_distributed_projections(IMP::ParticlesTemp const & ps, unsigned int n, ProjectingOptions options) -> IMP::em2d::Images"""
2428  return _IMP_em2d.create_evenly_distributed_projections(ps, n, options)
2429 
2430 def do_project_vectors(*args):
2431  r"""
2432  do_project_vectors(IMP::algebra::Vector3Ds const & ps, Rotation3D R, Vector3D translation) -> IMP::algebra::Vector2Ds
2433  do_project_vectors(IMP::algebra::Vector3Ds const & ps, Rotation3D R, Vector3D translation, Vector3D center) -> IMP::algebra::Vector2Ds
2434  """
2435  return _IMP_em2d.do_project_vectors(*args)
2436 
2437 def get_enclosing_image_size(ps, pixel_size, slack):
2438  r"""get_enclosing_image_size(IMP::ParticlesTemp const & ps, double pixel_size, unsigned int slack) -> unsigned int"""
2439  return _IMP_em2d.get_enclosing_image_size(ps, pixel_size, slack)
2440 
2441 def get_complete_alignment(input, m_to_align, apply=False):
2442  r"""get_complete_alignment(cv::Mat const & input, cv::Mat & m_to_align, bool apply=False) -> ResultAlign2D"""
2443  return _IMP_em2d.get_complete_alignment(input, m_to_align, apply)
2444 
2445 def get_rotational_alignment(input, m_to_align, apply=False):
2446  r"""get_rotational_alignment(cv::Mat const & input, cv::Mat & m_to_align, bool apply=False) -> ResultAlign2D"""
2447  return _IMP_em2d.get_rotational_alignment(input, m_to_align, apply)
2448 
2449 def get_translational_alignment(input, m_to_align, apply=False):
2450  r"""get_translational_alignment(cv::Mat const & input, cv::Mat & m_to_align, bool apply=False) -> ResultAlign2D"""
2451  return _IMP_em2d.get_translational_alignment(input, m_to_align, apply)
2452 
2453 def get_complete_alignment_no_preprocessing(input, INPUT, POLAR1, m_to_align, POLAR2, apply=False):
2454  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"""
2455  return _IMP_em2d.get_complete_alignment_no_preprocessing(input, INPUT, POLAR1, m_to_align, POLAR2, apply)
2456 
2457 def get_rotational_alignment_no_preprocessing(POLAR1, POLAR2):
2458  r"""get_rotational_alignment_no_preprocessing(cv::Mat const & POLAR1, cv::Mat const & POLAR2) -> ResultAlign2D"""
2459  return _IMP_em2d.get_rotational_alignment_no_preprocessing(POLAR1, POLAR2)
2460 
2462  r"""get_translational_alignment_no_preprocessing(cv::Mat const & M1, cv::Mat const & M2) -> ResultAlign2D"""
2463  return _IMP_em2d.get_translational_alignment_no_preprocessing(M1, M2)
2464 
2465 def get_complete_alignment_with_centers_no_preprocessing(center1, center2, AUTOC_POLAR1, AUTOC_POLAR2):
2466  r"""get_complete_alignment_with_centers_no_preprocessing(Vector2D center1, Vector2D center2, cv::Mat const & AUTOC_POLAR1, cv::Mat const & AUTOC_POLAR2) -> ResultAlign2D"""
2467  return _IMP_em2d.get_complete_alignment_with_centers_no_preprocessing(center1, center2, AUTOC_POLAR1, AUTOC_POLAR2)
2468 
2469 def write_vectors_as_pdb(*args):
2470  r"""
2471  write_vectors_as_pdb(IMP::algebra::Vector2Ds const vs, IMP::String const filename)
2472  write_vectors_as_pdb(IMP::algebra::Vector3Ds const vs, IMP::String const filename)
2473  """
2474  return _IMP_em2d.write_vectors_as_pdb(*args)
2475 class Em2DRestraintParameters(ProjectingParameters):
2476  r"""Proxy of C++ IMP::em2d::Em2DRestraintParameters class."""
2477 
2478  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2479  n_projections = property(_IMP_em2d.Em2DRestraintParameters_n_projections_get, _IMP_em2d.Em2DRestraintParameters_n_projections_set, doc=r"""n_projections : unsigned int""")
2480  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""")
2481  save_match_images = property(_IMP_em2d.Em2DRestraintParameters_save_match_images_get, _IMP_em2d.Em2DRestraintParameters_save_match_images_set, doc=r"""save_match_images : bool""")
2482  optimization_steps = property(_IMP_em2d.Em2DRestraintParameters_optimization_steps_get, _IMP_em2d.Em2DRestraintParameters_optimization_steps_set, doc=r"""optimization_steps : unsigned int""")
2483  simplex_initial_length = property(_IMP_em2d.Em2DRestraintParameters_simplex_initial_length_get, _IMP_em2d.Em2DRestraintParameters_simplex_initial_length_set, doc=r"""simplex_initial_length : double""")
2484  simplex_minimum_size = property(_IMP_em2d.Em2DRestraintParameters_simplex_minimum_size_get, _IMP_em2d.Em2DRestraintParameters_simplex_minimum_size_set, doc=r"""simplex_minimum_size : double""")
2485 
2486  def __init__(self, *args):
2487  r"""
2488  __init__(Em2DRestraintParameters self) -> Em2DRestraintParameters
2489  __init__(Em2DRestraintParameters self, double ps, double res, unsigned int n_proj=20) -> Em2DRestraintParameters
2490  """
2491  _IMP_em2d.Em2DRestraintParameters_swiginit(self, _IMP_em2d.new_Em2DRestraintParameters(*args))
2492 
2493  def show(self, *args):
2494  r"""show(Em2DRestraintParameters self, _ostream out=std::cout)"""
2495  return _IMP_em2d.Em2DRestraintParameters_show(self, *args)
2496 
2497  def __str__(self):
2498  r"""__str__(Em2DRestraintParameters self) -> std::string"""
2499  return _IMP_em2d.Em2DRestraintParameters___str__(self)
2500 
2501  def __repr__(self):
2502  r"""__repr__(Em2DRestraintParameters self) -> std::string"""
2503  return _IMP_em2d.Em2DRestraintParameters___repr__(self)
2504 
2505  def _get_as_binary(self):
2506  r"""_get_as_binary(Em2DRestraintParameters self) -> PyObject *"""
2507  return _IMP_em2d.Em2DRestraintParameters__get_as_binary(self)
2508 
2509  def _set_from_binary(self, p):
2510  r"""_set_from_binary(Em2DRestraintParameters self, PyObject * p)"""
2511  return _IMP_em2d.Em2DRestraintParameters__set_from_binary(self, p)
2512 
2513  def __getstate__(self):
2514  p = self._get_as_binary()
2515  if len(self.__dict__) > 1:
2516  d = self.__dict__.copy()
2517  del d['this']
2518  p = (d, p)
2519  return p
2520 
2521  def __setstate__(self, p):
2522  if not hasattr(self, 'this'):
2523  self.__init__()
2524  if isinstance(p, tuple):
2525  d, p = p
2526  self.__dict__.update(d)
2527  return self._set_from_binary(p)
2528 
2529  __swig_destroy__ = _IMP_em2d.delete_Em2DRestraintParameters
2530 
2531 # Register Em2DRestraintParameters in _IMP_em2d:
2532 _IMP_em2d.Em2DRestraintParameters_swigregister(Em2DRestraintParameters)
2533 cvar = _IMP_em2d.cvar
2534 ALIGN2D_NO_PREPROCESSING = cvar.ALIGN2D_NO_PREPROCESSING
2535 ALIGN2D_PREPROCESSING = cvar.ALIGN2D_PREPROCESSING
2536 ALIGN2D_WITH_CENTERS = cvar.ALIGN2D_WITH_CENTERS
2537 
2538 class ProjectionFinder(IMP.Object):
2539  r"""Proxy of C++ IMP::em2d::ProjectionFinder class."""
2540 
2541  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2542 
2543  def __init__(self):
2544  r"""__init__(ProjectionFinder self) -> ProjectionFinder"""
2545  _IMP_em2d.ProjectionFinder_swiginit(self, _IMP_em2d.new_ProjectionFinder())
2546 
2547  def setup(self, score_function, params):
2548  r"""setup(ProjectionFinder self, ScoreFunction score_function, Em2DRestraintParameters params)"""
2549  return _IMP_em2d.ProjectionFinder_setup(self, score_function, params)
2550 
2551  def set_subjects(self, subjects):
2552  r"""set_subjects(ProjectionFinder self, IMP::em2d::Images const & subjects)"""
2553  return _IMP_em2d.ProjectionFinder_set_subjects(self, subjects)
2554 
2555  def set_projections(self, projections):
2556  r"""set_projections(ProjectionFinder self, IMP::em2d::Images const & projections)"""
2557  return _IMP_em2d.ProjectionFinder_set_projections(self, projections)
2558 
2559  def set_variance_images(self, variances):
2560  r"""set_variance_images(ProjectionFinder self, IMP::em2d::Images const & variances)"""
2561  return _IMP_em2d.ProjectionFinder_set_variance_images(self, variances)
2562 
2563  def set_model_particles(self, ps):
2564  r"""set_model_particles(ProjectionFinder self, IMP::ParticlesTemp const & ps)"""
2565  return _IMP_em2d.ProjectionFinder_set_model_particles(self, ps)
2566 
2567  def set_save_match_images(self, x):
2568  r"""set_save_match_images(ProjectionFinder self, bool x)"""
2569  return _IMP_em2d.ProjectionFinder_set_save_match_images(self, x)
2570 
2571  def get_save_match_images(self):
2572  r"""get_save_match_images(ProjectionFinder self) -> bool"""
2573  return _IMP_em2d.ProjectionFinder_get_save_match_images(self)
2574 
2575  def set_fast_mode(self, n):
2576  r"""set_fast_mode(ProjectionFinder self, unsigned int n)"""
2577  return _IMP_em2d.ProjectionFinder_set_fast_mode(self, n)
2578 
2579  def get_registration_results(self):
2580  r"""get_registration_results(ProjectionFinder self) -> IMP::em2d::RegistrationResults"""
2581  return _IMP_em2d.ProjectionFinder_get_registration_results(self)
2582 
2583  def get_coarse_registration(self):
2584  r"""get_coarse_registration(ProjectionFinder self)"""
2585  return _IMP_em2d.ProjectionFinder_get_coarse_registration(self)
2586 
2587  def get_complete_registration(self):
2588  r"""get_complete_registration(ProjectionFinder self)"""
2589  return _IMP_em2d.ProjectionFinder_get_complete_registration(self)
2590 
2591  def get_global_score(self):
2592  r"""get_global_score(ProjectionFinder self) -> double"""
2593  return _IMP_em2d.ProjectionFinder_get_global_score(self)
2594 
2595  def show(self, out):
2596  r"""show(ProjectionFinder self, _ostream out)"""
2597  return _IMP_em2d.ProjectionFinder_show(self, out)
2598 
2599  def get_preprocessing_time(self):
2600  r"""get_preprocessing_time(ProjectionFinder self) -> double"""
2601  return _IMP_em2d.ProjectionFinder_get_preprocessing_time(self)
2602 
2603  def get_coarse_registration_time(self):
2604  r"""get_coarse_registration_time(ProjectionFinder self) -> double"""
2605  return _IMP_em2d.ProjectionFinder_get_coarse_registration_time(self)
2606 
2607  def get_fine_registration_time(self):
2608  r"""get_fine_registration_time(ProjectionFinder self) -> double"""
2609  return _IMP_em2d.ProjectionFinder_get_fine_registration_time(self)
2610 
2611  def get_number_of_subjects(self):
2612  r"""get_number_of_subjects(ProjectionFinder self) -> unsigned int"""
2613  return _IMP_em2d.ProjectionFinder_get_number_of_subjects(self)
2614 
2615  def set_number_of_class_averages_members(self, n_members):
2616  r"""set_number_of_class_averages_members(ProjectionFinder self, IMP::Ints n_members)"""
2617  return _IMP_em2d.ProjectionFinder_set_number_of_class_averages_members(self, n_members)
2618 
2619  def get_number_of_projections(self):
2620  r"""get_number_of_projections(ProjectionFinder self) -> unsigned int"""
2621  return _IMP_em2d.ProjectionFinder_get_number_of_projections(self)
2622 
2623  def get_version_info(self):
2624  r"""get_version_info(ProjectionFinder self) -> VersionInfo"""
2625  return _IMP_em2d.ProjectionFinder_get_version_info(self)
2626  __swig_destroy__ = _IMP_em2d.delete_ProjectionFinder
2627 
2628  def __str__(self):
2629  r"""__str__(ProjectionFinder self) -> std::string"""
2630  return _IMP_em2d.ProjectionFinder___str__(self)
2631 
2632  def __repr__(self):
2633  r"""__repr__(ProjectionFinder self) -> std::string"""
2634  return _IMP_em2d.ProjectionFinder___repr__(self)
2635 
2636  @staticmethod
2637  def get_from(o):
2638  return _object_cast_to_ProjectionFinder(o)
2639 
2640 
2641 # Register ProjectionFinder in _IMP_em2d:
2642 _IMP_em2d.ProjectionFinder_swigregister(ProjectionFinder)
2643 class Em2DRestraint(IMP.Restraint):
2644  r"""Proxy of C++ IMP::em2d::Em2DRestraint class."""
2645 
2646  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2647 
2648  def __init__(self, m):
2649  r"""__init__(Em2DRestraint self, Model m) -> Em2DRestraint"""
2650  _IMP_em2d.Em2DRestraint_swiginit(self, _IMP_em2d.new_Em2DRestraint(m))
2651 
2652  def setup(self, score_function, params):
2653  r"""setup(Em2DRestraint self, ScoreFunction score_function, Em2DRestraintParameters params)"""
2654  return _IMP_em2d.Em2DRestraint_setup(self, score_function, params)
2655 
2656  def set_particles(self, particles_container):
2657  r"""set_particles(Em2DRestraint self, SingletonContainer particles_container)"""
2658  return _IMP_em2d.Em2DRestraint_set_particles(self, particles_container)
2659 
2660  def set_images(self, em_images):
2661  r"""set_images(Em2DRestraint self, IMP::em2d::Images const em_images)"""
2662  return _IMP_em2d.Em2DRestraint_set_images(self, em_images)
2663 
2664  def set_variance_images(self, variance_images):
2665  r"""set_variance_images(Em2DRestraint self, IMP::em2d::Images const variance_images)"""
2666  return _IMP_em2d.Em2DRestraint_set_variance_images(self, variance_images)
2667 
2668  def set_fast_mode(self, n):
2669  r"""set_fast_mode(Em2DRestraint self, unsigned int n)"""
2670  return _IMP_em2d.Em2DRestraint_set_fast_mode(self, n)
2671 
2672  def set_coarse_registration_mode(self, opt):
2673  r"""set_coarse_registration_mode(Em2DRestraint self, bool opt)"""
2674  return _IMP_em2d.Em2DRestraint_set_coarse_registration_mode(self, opt)
2675 
2676  def get_registration_results(self):
2677  r"""get_registration_results(Em2DRestraint self) -> IMP::em2d::RegistrationResults"""
2678  return _IMP_em2d.Em2DRestraint_get_registration_results(self)
2679 
2680  def do_get_inputs(self):
2681  r"""do_get_inputs(Em2DRestraint self) -> IMP::ModelObjectsTemp"""
2682  return _IMP_em2d.Em2DRestraint_do_get_inputs(self)
2683 
2684  def get_version_info(self):
2685  r"""get_version_info(Em2DRestraint self) -> VersionInfo"""
2686  return _IMP_em2d.Em2DRestraint_get_version_info(self)
2687  __swig_destroy__ = _IMP_em2d.delete_Em2DRestraint
2688 
2689  def __str__(self):
2690  r"""__str__(Em2DRestraint self) -> std::string"""
2691  return _IMP_em2d.Em2DRestraint___str__(self)
2692 
2693  def __repr__(self):
2694  r"""__repr__(Em2DRestraint self) -> std::string"""
2695  return _IMP_em2d.Em2DRestraint___repr__(self)
2696 
2697  @staticmethod
2698  def get_from(o):
2699  return _object_cast_to_Em2DRestraint(o)
2700 
2701 
2702 # Register Em2DRestraint in _IMP_em2d:
2703 _IMP_em2d.Em2DRestraint_swigregister(Em2DRestraint)
2704 class ClusterSet(object):
2705  r"""Proxy of C++ IMP::em2d::ClusterSet class."""
2706 
2707  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2708 
2709  def __init__(self, *args):
2710  r"""
2711  __init__(ClusterSet self) -> ClusterSet
2712  __init__(ClusterSet self, unsigned int N) -> ClusterSet
2713  """
2714  _IMP_em2d.ClusterSet_swiginit(self, _IMP_em2d.new_ClusterSet(*args))
2715 
2716  def do_join_clusters(self, cluster_id1, cluster_id2, distance_between_clusters):
2717  r"""do_join_clusters(ClusterSet self, unsigned int cluster_id1, unsigned int cluster_id2, double distance_between_clusters)"""
2718  return _IMP_em2d.ClusterSet_do_join_clusters(self, cluster_id1, cluster_id2, distance_between_clusters)
2719 
2720  def get_cluster_elements(self, id):
2721  r"""get_cluster_elements(ClusterSet self, unsigned int id) -> IMP::Ints"""
2722  return _IMP_em2d.ClusterSet_get_cluster_elements(self, id)
2723 
2724  def get_clusters_below_cutoff(self, cutoff):
2725  r"""get_clusters_below_cutoff(ClusterSet self, double cutoff) -> IMP::Ints"""
2726  return _IMP_em2d.ClusterSet_get_clusters_below_cutoff(self, cutoff)
2727 
2728  def get_cluster_formed_at_step(self, step):
2729  r"""get_cluster_formed_at_step(ClusterSet self, unsigned int step) -> IMP::Ints"""
2730  return _IMP_em2d.ClusterSet_get_cluster_formed_at_step(self, step)
2731 
2732  def get_distance_at_step(self, step):
2733  r"""get_distance_at_step(ClusterSet self, unsigned int step) -> double"""
2734  return _IMP_em2d.ClusterSet_get_distance_at_step(self, step)
2735 
2736  def get_id_for_cluster_at_step(self, step):
2737  r"""get_id_for_cluster_at_step(ClusterSet self, unsigned int step) -> unsigned int"""
2738  return _IMP_em2d.ClusterSet_get_id_for_cluster_at_step(self, step)
2739 
2740  def get_linkage_matrix(self):
2741  r"""get_linkage_matrix(ClusterSet self) -> IMP::FloatsList"""
2742  return _IMP_em2d.ClusterSet_get_linkage_matrix(self)
2743 
2744  def get_linkage_matrix_in_matlab_format(self):
2745  r"""get_linkage_matrix_in_matlab_format(ClusterSet self) -> IMP::FloatsList"""
2746  return _IMP_em2d.ClusterSet_get_linkage_matrix_in_matlab_format(self)
2747 
2748  def get_number_of_steps(self):
2749  r"""get_number_of_steps(ClusterSet self) -> unsigned int"""
2750  return _IMP_em2d.ClusterSet_get_number_of_steps(self)
2751 
2752  def show(self, out):
2753  r"""show(ClusterSet self, _ostream out)"""
2754  return _IMP_em2d.ClusterSet_show(self, out)
2755 
2756  def __str__(self):
2757  r"""__str__(ClusterSet self) -> std::string"""
2758  return _IMP_em2d.ClusterSet___str__(self)
2759 
2760  def __repr__(self):
2761  r"""__repr__(ClusterSet self) -> std::string"""
2762  return _IMP_em2d.ClusterSet___repr__(self)
2763 
2764  def _get_as_binary(self):
2765  r"""_get_as_binary(ClusterSet self) -> PyObject *"""
2766  return _IMP_em2d.ClusterSet__get_as_binary(self)
2767 
2768  def _set_from_binary(self, p):
2769  r"""_set_from_binary(ClusterSet self, PyObject * p)"""
2770  return _IMP_em2d.ClusterSet__set_from_binary(self, p)
2771 
2772  def __getstate__(self):
2773  p = self._get_as_binary()
2774  if len(self.__dict__) > 1:
2775  d = self.__dict__.copy()
2776  del d['this']
2777  p = (d, p)
2778  return p
2779 
2780  def __setstate__(self, p):
2781  if not hasattr(self, 'this'):
2782  self.__init__()
2783  if isinstance(p, tuple):
2784  d, p = p
2785  self.__dict__.update(d)
2786  return self._set_from_binary(p)
2787 
2788  __swig_destroy__ = _IMP_em2d.delete_ClusterSet
2789 
2790 # Register ClusterSet in _IMP_em2d:
2791 _IMP_em2d.ClusterSet_swigregister(ClusterSet)
2792 class SingleLinkage(object):
2793  r"""Proxy of C++ IMP::em2d::SingleLinkage class."""
2794 
2795  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2796 
2797  def __init__(self):
2798  r"""__init__(SingleLinkage self) -> SingleLinkage"""
2799  _IMP_em2d.SingleLinkage_swiginit(self, _IMP_em2d.new_SingleLinkage())
2800 
2801  def __call__(self, id1, id2, cluster_set, distances):
2802  r"""__call__(SingleLinkage self, unsigned int id1, unsigned int id2, ClusterSet cluster_set, IMP::FloatsList const & distances) -> double"""
2803  return _IMP_em2d.SingleLinkage___call__(self, id1, id2, cluster_set, distances)
2804 
2805  def show(self, out):
2806  r"""show(SingleLinkage self, _ostream out)"""
2807  return _IMP_em2d.SingleLinkage_show(self, out)
2808 
2809  def __str__(self):
2810  r"""__str__(SingleLinkage self) -> std::string"""
2811  return _IMP_em2d.SingleLinkage___str__(self)
2812 
2813  def __repr__(self):
2814  r"""__repr__(SingleLinkage self) -> std::string"""
2815  return _IMP_em2d.SingleLinkage___repr__(self)
2816 
2817  def _get_as_binary(self):
2818  r"""_get_as_binary(SingleLinkage self) -> PyObject *"""
2819  return _IMP_em2d.SingleLinkage__get_as_binary(self)
2820 
2821  def _set_from_binary(self, p):
2822  r"""_set_from_binary(SingleLinkage self, PyObject * p)"""
2823  return _IMP_em2d.SingleLinkage__set_from_binary(self, p)
2824 
2825  def __getstate__(self):
2826  p = self._get_as_binary()
2827  if len(self.__dict__) > 1:
2828  d = self.__dict__.copy()
2829  del d['this']
2830  p = (d, p)
2831  return p
2832 
2833  def __setstate__(self, p):
2834  if not hasattr(self, 'this'):
2835  self.__init__()
2836  if isinstance(p, tuple):
2837  d, p = p
2838  self.__dict__.update(d)
2839  return self._set_from_binary(p)
2840 
2841  __swig_destroy__ = _IMP_em2d.delete_SingleLinkage
2842 
2843 # Register SingleLinkage in _IMP_em2d:
2844 _IMP_em2d.SingleLinkage_swigregister(SingleLinkage)
2845 class CompleteLinkage(object):
2846  r"""Proxy of C++ IMP::em2d::CompleteLinkage class."""
2847 
2848  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2849 
2850  def __init__(self):
2851  r"""__init__(CompleteLinkage self) -> CompleteLinkage"""
2852  _IMP_em2d.CompleteLinkage_swiginit(self, _IMP_em2d.new_CompleteLinkage())
2853 
2854  def __call__(self, id1, id2, cluster_set, distances):
2855  r"""__call__(CompleteLinkage self, unsigned int id1, unsigned int id2, ClusterSet cluster_set, IMP::FloatsList const & distances) -> double"""
2856  return _IMP_em2d.CompleteLinkage___call__(self, id1, id2, cluster_set, distances)
2857 
2858  def show(self, out):
2859  r"""show(CompleteLinkage self, _ostream out)"""
2860  return _IMP_em2d.CompleteLinkage_show(self, out)
2861 
2862  def __str__(self):
2863  r"""__str__(CompleteLinkage self) -> std::string"""
2864  return _IMP_em2d.CompleteLinkage___str__(self)
2865 
2866  def __repr__(self):
2867  r"""__repr__(CompleteLinkage self) -> std::string"""
2868  return _IMP_em2d.CompleteLinkage___repr__(self)
2869 
2870  def _get_as_binary(self):
2871  r"""_get_as_binary(CompleteLinkage self) -> PyObject *"""
2872  return _IMP_em2d.CompleteLinkage__get_as_binary(self)
2873 
2874  def _set_from_binary(self, p):
2875  r"""_set_from_binary(CompleteLinkage self, PyObject * p)"""
2876  return _IMP_em2d.CompleteLinkage__set_from_binary(self, p)
2877 
2878  def __getstate__(self):
2879  p = self._get_as_binary()
2880  if len(self.__dict__) > 1:
2881  d = self.__dict__.copy()
2882  del d['this']
2883  p = (d, p)
2884  return p
2885 
2886  def __setstate__(self, p):
2887  if not hasattr(self, 'this'):
2888  self.__init__()
2889  if isinstance(p, tuple):
2890  d, p = p
2891  self.__dict__.update(d)
2892  return self._set_from_binary(p)
2893 
2894  __swig_destroy__ = _IMP_em2d.delete_CompleteLinkage
2895 
2896 # Register CompleteLinkage in _IMP_em2d:
2897 _IMP_em2d.CompleteLinkage_swigregister(CompleteLinkage)
2898 class AverageDistanceLinkage(object):
2899  r"""Proxy of C++ IMP::em2d::AverageDistanceLinkage class."""
2900 
2901  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2902 
2903  def __init__(self):
2904  r"""__init__(AverageDistanceLinkage self) -> AverageDistanceLinkage"""
2905  _IMP_em2d.AverageDistanceLinkage_swiginit(self, _IMP_em2d.new_AverageDistanceLinkage())
2906 
2907  def __call__(self, id1, id2, cluster_set, distances):
2908  r"""__call__(AverageDistanceLinkage self, unsigned int id1, unsigned int id2, ClusterSet cluster_set, IMP::FloatsList const & distances) -> double"""
2909  return _IMP_em2d.AverageDistanceLinkage___call__(self, id1, id2, cluster_set, distances)
2910 
2911  def show(self, out):
2912  r"""show(AverageDistanceLinkage self, _ostream out)"""
2913  return _IMP_em2d.AverageDistanceLinkage_show(self, out)
2914 
2915  def __str__(self):
2916  r"""__str__(AverageDistanceLinkage self) -> std::string"""
2917  return _IMP_em2d.AverageDistanceLinkage___str__(self)
2918 
2919  def __repr__(self):
2920  r"""__repr__(AverageDistanceLinkage self) -> std::string"""
2921  return _IMP_em2d.AverageDistanceLinkage___repr__(self)
2922 
2923  def _get_as_binary(self):
2924  r"""_get_as_binary(AverageDistanceLinkage self) -> PyObject *"""
2925  return _IMP_em2d.AverageDistanceLinkage__get_as_binary(self)
2926 
2927  def _set_from_binary(self, p):
2928  r"""_set_from_binary(AverageDistanceLinkage self, PyObject * p)"""
2929  return _IMP_em2d.AverageDistanceLinkage__set_from_binary(self, p)
2930 
2931  def __getstate__(self):
2932  p = self._get_as_binary()
2933  if len(self.__dict__) > 1:
2934  d = self.__dict__.copy()
2935  del d['this']
2936  p = (d, p)
2937  return p
2938 
2939  def __setstate__(self, p):
2940  if not hasattr(self, 'this'):
2941  self.__init__()
2942  if isinstance(p, tuple):
2943  d, p = p
2944  self.__dict__.update(d)
2945  return self._set_from_binary(p)
2946 
2947  __swig_destroy__ = _IMP_em2d.delete_AverageDistanceLinkage
2948 
2949 # Register AverageDistanceLinkage in _IMP_em2d:
2950 _IMP_em2d.AverageDistanceLinkage_swigregister(AverageDistanceLinkage)
2951 class CollisionCrossSection(IMP.Object):
2952  r"""Proxy of C++ IMP::em2d::CollisionCrossSection class."""
2953 
2954  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2955 
2956  def __init__(self, n_projections, resolution, pixel_size, projection_image_size):
2957  r"""__init__(CollisionCrossSection self, unsigned int n_projections, double resolution, double pixel_size, double projection_image_size) -> CollisionCrossSection"""
2958  _IMP_em2d.CollisionCrossSection_swiginit(self, _IMP_em2d.new_CollisionCrossSection(n_projections, resolution, pixel_size, projection_image_size))
2959 
2960  def set_model_particles(self, ps):
2961  r"""set_model_particles(CollisionCrossSection self, IMP::ParticlesTemp const & ps)"""
2962  return _IMP_em2d.CollisionCrossSection_set_model_particles(self, ps)
2963 
2964  def get_ccs(self):
2965  r"""get_ccs(CollisionCrossSection self) -> double"""
2966  return _IMP_em2d.CollisionCrossSection_get_ccs(self)
2967 
2968  def show(self, out):
2969  r"""show(CollisionCrossSection self, _ostream out)"""
2970  return _IMP_em2d.CollisionCrossSection_show(self, out)
2971 
2972  def get_version_info(self):
2973  r"""get_version_info(CollisionCrossSection self) -> VersionInfo"""
2974  return _IMP_em2d.CollisionCrossSection_get_version_info(self)
2975  __swig_destroy__ = _IMP_em2d.delete_CollisionCrossSection
2976 
2977  def __str__(self):
2978  r"""__str__(CollisionCrossSection self) -> std::string"""
2979  return _IMP_em2d.CollisionCrossSection___str__(self)
2980 
2981  def __repr__(self):
2982  r"""__repr__(CollisionCrossSection self) -> std::string"""
2983  return _IMP_em2d.CollisionCrossSection___repr__(self)
2984 
2985  @staticmethod
2986  def get_from(o):
2987  return _object_cast_to_CollisionCrossSection(o)
2988 
2989 
2990 # Register CollisionCrossSection in _IMP_em2d:
2991 _IMP_em2d.CollisionCrossSection_swigregister(CollisionCrossSection)
2992 class GridStates(IMP.domino.ParticleStates):
2993  r"""Proxy of C++ IMP::em2d::GridStates class."""
2994 
2995  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2996 
2997  def __init__(self, *args):
2998  r"""__init__(GridStates self, IMP::algebra::Vector3Ds const & positions, IMP::algebra::Rotation3Ds const & orientations, IMP::String const & name="GridStates") -> GridStates"""
2999  _IMP_em2d.GridStates_swiginit(self, _IMP_em2d.new_GridStates(*args))
3000 
3001  def get_position(self, i):
3002  r"""get_position(GridStates self, unsigned int i) -> Vector3D"""
3003  return _IMP_em2d.GridStates_get_position(self, i)
3004 
3005  def get_orientation(self, i):
3006  r"""get_orientation(GridStates self, unsigned int i) -> Rotation3D"""
3007  return _IMP_em2d.GridStates_get_orientation(self, i)
3008 
3009  def get_version_info(self):
3010  r"""get_version_info(GridStates self) -> VersionInfo"""
3011  return _IMP_em2d.GridStates_get_version_info(self)
3012  __swig_destroy__ = _IMP_em2d.delete_GridStates
3013 
3014  def __str__(self):
3015  r"""__str__(GridStates self) -> std::string"""
3016  return _IMP_em2d.GridStates___str__(self)
3017 
3018  def __repr__(self):
3019  r"""__repr__(GridStates self) -> std::string"""
3020  return _IMP_em2d.GridStates___repr__(self)
3021 
3022  @staticmethod
3023  def get_from(o):
3024  return _object_cast_to_GridStates(o)
3025 
3026 
3027 # Register GridStates in _IMP_em2d:
3028 _IMP_em2d.GridStates_swigregister(GridStates)
3029 class ProjectionStates(GridStates):
3030  r"""Proxy of C++ IMP::em2d::ProjectionStates class."""
3031 
3032  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3033 
3034  def __init__(self, *args):
3035  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"""
3036  _IMP_em2d.ProjectionStates_swiginit(self, _IMP_em2d.new_ProjectionStates(*args))
3037 
3038  def get_projection(self, i):
3039  r"""get_projection(ProjectionStates self, unsigned int i) -> Image"""
3040  return _IMP_em2d.ProjectionStates_get_projection(self, i)
3041  __swig_destroy__ = _IMP_em2d.delete_ProjectionStates
3042 
3043  def __str__(self):
3044  r"""__str__(ProjectionStates self) -> std::string"""
3045  return _IMP_em2d.ProjectionStates___str__(self)
3046 
3047  def __repr__(self):
3048  r"""__repr__(ProjectionStates self) -> std::string"""
3049  return _IMP_em2d.ProjectionStates___repr__(self)
3050 
3051  @staticmethod
3052  def get_from(o):
3053  return _object_cast_to_ProjectionStates(o)
3054 
3055 
3056 # Register ProjectionStates in _IMP_em2d:
3057 _IMP_em2d.ProjectionStates_swigregister(ProjectionStates)
3058 class DistanceFilter(IMP.domino.SubsetFilter):
3059  r"""Proxy of C++ IMP::em2d::DistanceFilter class."""
3060 
3061  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3062 
3063  def __init__(self, subset_to_act_on, subset_to_restrain, ps_table, max_distance):
3064  r"""__init__(DistanceFilter self, Subset subset_to_act_on, Subset subset_to_restrain, ParticleStatesTable ps_table, double max_distance) -> DistanceFilter"""
3065  _IMP_em2d.DistanceFilter_swiginit(self, _IMP_em2d.new_DistanceFilter(subset_to_act_on, subset_to_restrain, ps_table, max_distance))
3066 
3067  def show(self, *args):
3068  r"""show(DistanceFilter self, _ostream out=std::cout)"""
3069  return _IMP_em2d.DistanceFilter_show(self, *args)
3070 
3071  def get_version_info(self):
3072  r"""get_version_info(DistanceFilter self) -> VersionInfo"""
3073  return _IMP_em2d.DistanceFilter_get_version_info(self)
3074  __swig_destroy__ = _IMP_em2d.delete_DistanceFilter
3075 
3076  def __str__(self):
3077  r"""__str__(DistanceFilter self) -> std::string"""
3078  return _IMP_em2d.DistanceFilter___str__(self)
3079 
3080  def __repr__(self):
3081  r"""__repr__(DistanceFilter self) -> std::string"""
3082  return _IMP_em2d.DistanceFilter___repr__(self)
3083 
3084  @staticmethod
3085  def get_from(o):
3086  return _object_cast_to_DistanceFilter(o)
3087 
3088 
3089 # Register DistanceFilter in _IMP_em2d:
3090 _IMP_em2d.DistanceFilter_swigregister(DistanceFilter)
3091 class DistanceFilterTable(IMP.domino.SubsetFilterTable):
3092  r"""Proxy of C++ IMP::em2d::DistanceFilterTable class."""
3093 
3094  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3095 
3096  def __init__(self, subset_to_act_on, ps_table, max_distance):
3097  r"""__init__(DistanceFilterTable self, Subset subset_to_act_on, ParticleStatesTable ps_table, double max_distance) -> DistanceFilterTable"""
3098  _IMP_em2d.DistanceFilterTable_swiginit(self, _IMP_em2d.new_DistanceFilterTable(subset_to_act_on, ps_table, max_distance))
3099 
3100  def show(self, *args):
3101  r"""show(DistanceFilterTable self, _ostream out=std::cout)"""
3102  return _IMP_em2d.DistanceFilterTable_show(self, *args)
3103 
3104  def get_version_info(self):
3105  r"""get_version_info(DistanceFilterTable self) -> VersionInfo"""
3106  return _IMP_em2d.DistanceFilterTable_get_version_info(self)
3107  __swig_destroy__ = _IMP_em2d.delete_DistanceFilterTable
3108 
3109  def __str__(self):
3110  r"""__str__(DistanceFilterTable self) -> std::string"""
3111  return _IMP_em2d.DistanceFilterTable___str__(self)
3112 
3113  def __repr__(self):
3114  r"""__repr__(DistanceFilterTable self) -> std::string"""
3115  return _IMP_em2d.DistanceFilterTable___repr__(self)
3116 
3117  @staticmethod
3118  def get_from(o):
3119  return _object_cast_to_DistanceFilterTable(o)
3120 
3121 
3122 # Register DistanceFilterTable in _IMP_em2d:
3123 _IMP_em2d.DistanceFilterTable_swigregister(DistanceFilterTable)
3124 class IntsOrder(object):
3125  r"""Proxy of C++ IMP::em2d::IntsOrder class."""
3126 
3127  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3128  __repr__ = _swig_repr
3129 
3130  def __call__(self, a, b):
3131  r"""__call__(IntsOrder self, IMP::Ints const & a, IMP::Ints const & b) -> bool"""
3132  return _IMP_em2d.IntsOrder___call__(self, a, b)
3133 
3134  def __init__(self):
3135  r"""__init__(IntsOrder self) -> IntsOrder"""
3136  _IMP_em2d.IntsOrder_swiginit(self, _IMP_em2d.new_IntsOrder())
3137  __swig_destroy__ = _IMP_em2d.delete_IntsOrder
3138 
3139 # Register IntsOrder in _IMP_em2d:
3140 _IMP_em2d.IntsOrder_swigregister(IntsOrder)
3141 class RigidBodiesImageFitRestraint(IMP.Restraint):
3142  r"""Proxy of C++ IMP::em2d::RigidBodiesImageFitRestraint class."""
3143 
3144  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3145 
3146  def get_version_info(self):
3147  r"""get_version_info(RigidBodiesImageFitRestraint self) -> VersionInfo"""
3148  return _IMP_em2d.RigidBodiesImageFitRestraint_get_version_info(self)
3149  __swig_destroy__ = _IMP_em2d.delete_RigidBodiesImageFitRestraint
3150 
3151  def __init__(self, scf, rbs, img):
3152  r"""__init__(RigidBodiesImageFitRestraint self, ScoreFunction scf, IMP::core::RigidBodies const & rbs, Image img) -> RigidBodiesImageFitRestraint"""
3153  _IMP_em2d.RigidBodiesImageFitRestraint_swiginit(self, _IMP_em2d.new_RigidBodiesImageFitRestraint(scf, rbs, img))
3154 
3155  def set_projecting_parameters(self, p):
3156  r"""set_projecting_parameters(RigidBodiesImageFitRestraint self, ProjectingParameters p)"""
3157  return _IMP_em2d.RigidBodiesImageFitRestraint_set_projecting_parameters(self, p)
3158 
3159  def set_orientations(self, rb, rots):
3160  r"""set_orientations(RigidBodiesImageFitRestraint self, RigidBody rb, IMP::algebra::Rotation3Ds const & rots)"""
3161  return _IMP_em2d.RigidBodiesImageFitRestraint_set_orientations(self, rb, rots)
3162 
3163  def get_number_of_masks(self, rb):
3164  r"""get_number_of_masks(RigidBodiesImageFitRestraint self, RigidBody rb) -> unsigned int"""
3165  return _IMP_em2d.RigidBodiesImageFitRestraint_get_number_of_masks(self, rb)
3166 
3167  def __str__(self):
3168  r"""__str__(RigidBodiesImageFitRestraint self) -> std::string"""
3169  return _IMP_em2d.RigidBodiesImageFitRestraint___str__(self)
3170 
3171  def __repr__(self):
3172  r"""__repr__(RigidBodiesImageFitRestraint self) -> std::string"""
3173  return _IMP_em2d.RigidBodiesImageFitRestraint___repr__(self)
3174 
3175  @staticmethod
3176  def get_from(o):
3177  return _object_cast_to_RigidBodiesImageFitRestraint(o)
3178 
3179 
3180 # Register RigidBodiesImageFitRestraint in _IMP_em2d:
3181 _IMP_em2d.RigidBodiesImageFitRestraint_swigregister(RigidBodiesImageFitRestraint)
3182 
3183 def get_unique_index(rot):
3184  r"""get_unique_index(Rotation3D rot) -> IMP::Ints"""
3185  return _IMP_em2d.get_unique_index(rot)
3186 class RelativePositionMover(IMP.core.RigidBodyMover):
3187  r"""Proxy of C++ IMP::em2d::RelativePositionMover class."""
3188 
3189  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3190 
3191  def __init__(self, d, max_translation, max_rotation):
3192  r"""__init__(RelativePositionMover self, RigidBody d, IMP::Float max_translation, IMP::Float max_rotation) -> RelativePositionMover"""
3193  _IMP_em2d.RelativePositionMover_swiginit(self, _IMP_em2d.new_RelativePositionMover(d, max_translation, max_rotation))
3194 
3195  def add_internal_transformations(self, d, transforms):
3196  r"""add_internal_transformations(RelativePositionMover self, RigidBody d, IMP::algebra::Transformation3Ds transforms)"""
3197  return _IMP_em2d.RelativePositionMover_add_internal_transformations(self, d, transforms)
3198 
3199  def set_random_move_probability(self, p):
3200  r"""set_random_move_probability(RelativePositionMover self, IMP::Float p)"""
3201  return _IMP_em2d.RelativePositionMover_set_random_move_probability(self, p)
3202  __swig_destroy__ = _IMP_em2d.delete_RelativePositionMover
3203 
3204  def __str__(self):
3205  r"""__str__(RelativePositionMover self) -> std::string"""
3206  return _IMP_em2d.RelativePositionMover___str__(self)
3207 
3208  def __repr__(self):
3209  r"""__repr__(RelativePositionMover self) -> std::string"""
3210  return _IMP_em2d.RelativePositionMover___repr__(self)
3211 
3212  @staticmethod
3213  def get_from(o):
3214  return _object_cast_to_RelativePositionMover(o)
3215 
3216 
3217 # Register RelativePositionMover in _IMP_em2d:
3218 _IMP_em2d.RelativePositionMover_swigregister(RelativePositionMover)
3219 class DummyRestraint(IMP.Restraint):
3220  r"""Proxy of C++ IMP::em2d::DummyRestraint class."""
3221 
3222  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3223 
3224  def __init__(self, p, q):
3225  r"""__init__(DummyRestraint self, Particle p, Particle q) -> DummyRestraint"""
3226  _IMP_em2d.DummyRestraint_swiginit(self, _IMP_em2d.new_DummyRestraint(p, q))
3227 
3228  def show(self, *args):
3229  r"""show(DummyRestraint self, _ostream out=std::cout)"""
3230  return _IMP_em2d.DummyRestraint_show(self, *args)
3231 
3232  def do_get_inputs(self):
3233  r"""do_get_inputs(DummyRestraint self) -> IMP::ModelObjectsTemp"""
3234  return _IMP_em2d.DummyRestraint_do_get_inputs(self)
3235 
3236  def get_version_info(self):
3237  r"""get_version_info(DummyRestraint self) -> VersionInfo"""
3238  return _IMP_em2d.DummyRestraint_get_version_info(self)
3239  __swig_destroy__ = _IMP_em2d.delete_DummyRestraint
3240 
3241  def __str__(self):
3242  r"""__str__(DummyRestraint self) -> std::string"""
3243  return _IMP_em2d.DummyRestraint___str__(self)
3244 
3245  def __repr__(self):
3246  r"""__repr__(DummyRestraint self) -> std::string"""
3247  return _IMP_em2d.DummyRestraint___repr__(self)
3248 
3249  @staticmethod
3250  def get_from(o):
3251  return _object_cast_to_DummyRestraint(o)
3252 
3253 
3254 # Register DummyRestraint in _IMP_em2d:
3255 _IMP_em2d.DummyRestraint_swigregister(DummyRestraint)
3256 class ParticlesDummyRestraint(IMP.Restraint):
3257  r"""Proxy of C++ IMP::em2d::ParticlesDummyRestraint class."""
3258 
3259  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3260 
3261  def __init__(self, sc):
3262  r"""__init__(ParticlesDummyRestraint self, SingletonContainer sc) -> ParticlesDummyRestraint"""
3263  _IMP_em2d.ParticlesDummyRestraint_swiginit(self, _IMP_em2d.new_ParticlesDummyRestraint(sc))
3264 
3265  def show(self, *args):
3266  r"""show(ParticlesDummyRestraint self, _ostream out=std::cout)"""
3267  return _IMP_em2d.ParticlesDummyRestraint_show(self, *args)
3268 
3269  def do_get_inputs(self):
3270  r"""do_get_inputs(ParticlesDummyRestraint self) -> IMP::ModelObjectsTemp"""
3271  return _IMP_em2d.ParticlesDummyRestraint_do_get_inputs(self)
3272 
3273  def get_version_info(self):
3274  r"""get_version_info(ParticlesDummyRestraint self) -> VersionInfo"""
3275  return _IMP_em2d.ParticlesDummyRestraint_get_version_info(self)
3276  __swig_destroy__ = _IMP_em2d.delete_ParticlesDummyRestraint
3277 
3278  def __str__(self):
3279  r"""__str__(ParticlesDummyRestraint self) -> std::string"""
3280  return _IMP_em2d.ParticlesDummyRestraint___str__(self)
3281 
3282  def __repr__(self):
3283  r"""__repr__(ParticlesDummyRestraint self) -> std::string"""
3284  return _IMP_em2d.ParticlesDummyRestraint___repr__(self)
3285 
3286  @staticmethod
3287  def get_from(o):
3288  return _object_cast_to_ParticlesDummyRestraint(o)
3289 
3290 
3291 # Register ParticlesDummyRestraint in _IMP_em2d:
3292 _IMP_em2d.ParticlesDummyRestraint_swigregister(ParticlesDummyRestraint)
3293 class PCAFitRestraint(IMP.Restraint):
3294  r"""Proxy of C++ IMP::em2d::PCAFitRestraint class."""
3295 
3296  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3297 
3298  def __init__(self, particles, image_files, pixel_size, resolution=10.0, projection_number=100, reuse_direction=False, n_components=1, micrographs_number=0):
3299  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, unsigned int micrographs_number=0) -> PCAFitRestraint"""
3300  _IMP_em2d.PCAFitRestraint_swiginit(self, _IMP_em2d.new_PCAFitRestraint(particles, image_files, pixel_size, resolution, projection_number, reuse_direction, n_components, micrographs_number))
3301 
3302  def get_projection_number(self):
3303  r"""get_projection_number(PCAFitRestraint self) -> unsigned int"""
3304  return _IMP_em2d.PCAFitRestraint_get_projection_number(self)
3305 
3306  def set_projection_number(self, n):
3307  r"""set_projection_number(PCAFitRestraint self, unsigned int n)"""
3308  return _IMP_em2d.PCAFitRestraint_set_projection_number(self, n)
3309 
3310  def get_micrographs_number(self):
3311  r"""get_micrographs_number(PCAFitRestraint self) -> unsigned int"""
3312  return _IMP_em2d.PCAFitRestraint_get_micrographs_number(self)
3313 
3314  def set_micrographs_number(self, n):
3315  r"""set_micrographs_number(PCAFitRestraint self, unsigned int n)"""
3316  return _IMP_em2d.PCAFitRestraint_set_micrographs_number(self, n)
3317 
3318  def get_transformation(self, image_number):
3319  r"""get_transformation(PCAFitRestraint self, unsigned int image_number) -> Transformation3D"""
3320  return _IMP_em2d.PCAFitRestraint_get_transformation(self, image_number)
3321 
3322  def get_cross_correlation_coefficient(self, image_number):
3323  r"""get_cross_correlation_coefficient(PCAFitRestraint self, unsigned int image_number) -> double"""
3324  return _IMP_em2d.PCAFitRestraint_get_cross_correlation_coefficient(self, image_number)
3325 
3326  def write_best_projections(self, file_name, evaluate=False):
3327  r"""write_best_projections(PCAFitRestraint self, std::string file_name, bool evaluate=False)"""
3328  return _IMP_em2d.PCAFitRestraint_write_best_projections(self, file_name, evaluate)
3329 
3330  def do_get_inputs(self):
3331  r"""do_get_inputs(PCAFitRestraint self) -> IMP::ModelObjectsTemp"""
3332  return _IMP_em2d.PCAFitRestraint_do_get_inputs(self)
3333 
3334  def get_version_info(self):
3335  r"""get_version_info(PCAFitRestraint self) -> VersionInfo"""
3336  return _IMP_em2d.PCAFitRestraint_get_version_info(self)
3337  __swig_destroy__ = _IMP_em2d.delete_PCAFitRestraint
3338 
3339  def __str__(self):
3340  r"""__str__(PCAFitRestraint self) -> std::string"""
3341  return _IMP_em2d.PCAFitRestraint___str__(self)
3342 
3343  def __repr__(self):
3344  r"""__repr__(PCAFitRestraint self) -> std::string"""
3345  return _IMP_em2d.PCAFitRestraint___repr__(self)
3346 
3347  @staticmethod
3348  def get_from(o):
3349  return _object_cast_to_em2dPCAFitRestraint(o)
3350 
3351 
3352 # Register PCAFitRestraint in _IMP_em2d:
3353 _IMP_em2d.PCAFitRestraint_swigregister(PCAFitRestraint)
3354 class ResultAlign2D(object):
3355  r"""Proxy of C++ std::pair< IMP::algebra::Transformation2D,double > class."""
3356 
3357  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3358  __repr__ = _swig_repr
3359 
3360  def __init__(self, *args):
3361  r"""
3362  __init__(ResultAlign2D self) -> ResultAlign2D
3363  __init__(ResultAlign2D self, Transformation2D first, double second) -> ResultAlign2D
3364  __init__(ResultAlign2D self, ResultAlign2D other) -> ResultAlign2D
3365  """
3366  _IMP_em2d.ResultAlign2D_swiginit(self, _IMP_em2d.new_ResultAlign2D(*args))
3367  first = property(_IMP_em2d.ResultAlign2D_first_get, _IMP_em2d.ResultAlign2D_first_set, doc=r"""first : IMP::algebra::Transformation2D""")
3368  second = property(_IMP_em2d.ResultAlign2D_second_get, _IMP_em2d.ResultAlign2D_second_set, doc=r"""second : double""")
3369  def __len__(self):
3370  return 2
3371  def __repr__(self):
3372  return str((self.first, self.second))
3373  def __getitem__(self, index):
3374  if not (index % 2):
3375  return self.first
3376  else:
3377  return self.second
3378  def __setitem__(self, index, val):
3379  if not (index % 2):
3380  self.first = val
3381  else:
3382  self.second = val
3383  __swig_destroy__ = _IMP_em2d.delete_ResultAlign2D
3384 
3385 # Register ResultAlign2D in _IMP_em2d:
3386 _IMP_em2d.ResultAlign2D_swigregister(ResultAlign2D)
3387 
3388 def _do_hierarchical_clustering_single_linkage(distances):
3389  r"""_do_hierarchical_clustering_single_linkage(IMP::FloatsList const & distances) -> ClusterSet"""
3390  return _IMP_em2d._do_hierarchical_clustering_single_linkage(distances)
3391 
3392 def _do_hierarchical_clustering_complete_linkage(distances):
3393  r"""_do_hierarchical_clustering_complete_linkage(IMP::FloatsList const & distances) -> ClusterSet"""
3394  return _IMP_em2d._do_hierarchical_clustering_complete_linkage(distances)
3395 
3396 def _do_hierarchical_clustering_average_distance_linkage(distances):
3397  r"""_do_hierarchical_clustering_average_distance_linkage(IMP::FloatsList const & distances) -> ClusterSet"""
3398  return _IMP_em2d._do_hierarchical_clustering_average_distance_linkage(distances)
3399 
3400 do_hierarchical_clustering_single_linkage = _do_hierarchical_clustering_single_linkage
3401 do_hierarchical_clustering_complete_linkage = _do_hierarchical_clustering_complete_linkage
3402 do_hierarchical_clustering_average_distance_linkage = _do_hierarchical_clustering_average_distance_linkage
3403 
3404 
3405 def get_module_version():
3406  r"""get_module_version() -> std::string const"""
3407  return _IMP_em2d.get_module_version()
3408 
3409 def get_example_path(fname):
3410  r"""get_example_path(std::string fname) -> std::string"""
3411  return _IMP_em2d.get_example_path(fname)
3412 
3413 def get_data_path(fname):
3414  r"""get_data_path(std::string fname) -> std::string"""
3415  return _IMP_em2d.get_data_path(fname)
3416 
3417 from . import _version_check
3418 _version_check.check_version(get_module_version())
3419 __version__ = get_module_version()
3420 
3421 
double get_shift_error(const RegistrationResult &rr1, const RegistrationResult &rr2)
Distance between the two in-plane translations.
Images create_evenly_distributed_projections(const ParticlesTemp &ps, unsigned int n, const ProjectingOptions &options)
void get_autocorrelation2d_no_preprocessing(const cv::Mat &M, cv::Mat &corr)
Autocorrelation without preprocessing.
void do_morphologic_contrast_enhancement(const cv::Mat &m, cv::Mat &result, const cv::Mat &kernel, unsigned int iterations)
double get_mean(const cv::Mat &mat, const cvIntMat &mask)
CheckLevel get_check_level()
Get the current audit mode.
Definition: exception.h:80
setup
Definition: setup.py:1
void apply_threshold(cv::Mat &m, cv::Mat &result, double threshold=0.0)
em2d::Images get_projections(const ParticlesTemp &ps, const algebra::SphericalVector3Ds &vs, int rows, int cols, const ProjectingOptions &options, Strings names=Strings())
Generates projections from particles.
std::string get_module_version()
Return the version of this module, as a string.
IMPEM2D_BEGIN_NAMESPACE Strings read_selection_file(String fn)
Reads a selection file.
ResultAlign2D get_complete_alignment_with_centers_no_preprocessing(const algebra::Vector2D &center1, const algebra::Vector2D &center2, const cv::Mat &AUTOC_POLAR1, const cv::Mat &AUTOC_POLAR2)
Strings create_filenames(unsigned long number, String basic_name, String extension)
Various classes to hold sets of particles.
ResultAlign2D get_translational_alignment(const cv::Mat &input, cv::Mat &m_to_align, bool apply=false)
Aligns two matrices translationally.
void get_correlation2d(const cv::Mat &A, const cv::Mat &B, cv::Mat &corr)
Correlation matrix between two 2D matrices using FFT.
cvIntMat create_circular_mask(int rows, int cols, int radius)
ResultAlign2D get_complete_alignment(const cv::Mat &input, cv::Mat &m_to_align, bool apply=false)
void do_dilate_and_shrink_warp(cv::Mat &m, const cv::Mat &grayscale, cv::Mat &kernel)
(U. Adiga, 2005)
em2d::ResultAlign2D get_rotational_alignment(const cv::Mat &input, cv::Mat &m_to_align, bool apply=false)
RegistrationResults get_evenly_distributed_registration_results(unsigned int n_projections)
void apply_variance_filter(Image *input, Image *filtered, int kernelsize)
Definition: Image.h:266
void apply_diffusion_filter(Image *input, Image *filtered, double beta, double pixelsize, int time_steps)
Definition: Image.h:279
int do_labeling(const cvIntMat &m, cvIntMat &mat_to_label)
Labeling function for a matrix.
Make CGAL functionality available to IMP.
MatchTemplateResults get_best_template_matches(const cv::Mat &m, const cv::Mat &templ, unsigned int n)
Modify the transformation of a rigid body.
void do_project_particles(const ParticlesTemp &ps, cv::Mat &m2, const algebra::Rotation3D &R, const algebra::Vector3D &translation, const ProjectingOptions &options, MasksManagerPtr masks)
Projects a set of particles. This is the core function that others call.
void get_autocorrelation2d(const cv::Mat &m, cv::Mat &corr)
Computes the autocorrelation matrix.
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
void apply_mean_outside_mask(Image *img, double radius)
Several general purpose optimizers from the GNU Scientific Library (GSL).
double get_rotation_error(const RegistrationResult &rr1, const RegistrationResult &rr2)
Composable functors to implement scores via compile-time composition.
ResultAlign2D get_rotational_alignment_no_preprocessing(const cv::Mat &POLAR1, const cv::Mat &POLAR2)
void get_fft_using_optimal_size(const cv::Mat &m, cv::Mat &M)
Floats get_histogram(Image *img, int bins)
Definition: Image.h:255
void write_matrix(cv::Mat &m, std::string name)
Quick and dirty way of writing a OpenCV matrix to a Spider image.
void do_subtract_images(Image *first, Image *second, Image *result)
Code to compute statistical measures.
RegistrationResults get_random_registration_results(unsigned int n, double maximum_shift=5.0)
Provides a set of random registration results (or parameters)
algebra::Vector2Ds do_project_vectors(const algebra::Vector3Ds &ps, const algebra::Rotation3D &R, const algebra::Vector3D &translation)
Project the points contained in Vector3Ds to gen vectors in 2D.
void write_vectors_as_pdb(const algebra::Vector2Ds vs, const String filename)
Common base class for heavy weight IMP objects.
Definition: Object.h:111
ScoreStates maintain invariants in the Model.
Definition: ScoreState.h:56
void apply_circular_mask(const cv::Mat &mat, cv::Mat &result, int radius, double value=0.0)
Images read_images(const Strings &names, const ImageReaderWriter *rw)
void write_registration_results(String filename, const RegistrationResults &results)
Writes a set of registration results.
Basic utilities for handling cryo-electron microscopy 3D density maps.
void crop(Image *img, const IntPair &center, int size)
void get_morphologic_gradient(const cv::Mat &m, cv::Mat &result, const cv::Mat &kernel)
void apply_mask(const cv::Mat &m, cv::Mat &result, const cvIntMat &mask, double val)
Applies a binary mask to an image.
double get_cross_correlation_coefficient(Image *im1, Image *im2)
Cross correlation between two images.
void save_images(Images images, const Strings &names, const ImageReaderWriter *rw)
void get_domes(cv::Mat &m, cv::Mat &result, double h)
Gets the domes of m with height h.
void do_normalize(Image *im, bool force=false)
Interface to specialized Particle types (e.g. atoms)
Definition: Decorator.h:119
void do_matrix_to_image_flip(cv::Mat &m)
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
ResultAlign2D get_translational_alignment_no_preprocessing(const cv::Mat &M1, const cv::Mat &M2)
void get_correlation2d_no_preprocessing(const cv::Mat &M1, const cv::Mat &M2, cv::Mat &corr)
Correlation without preprocessing.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
unsigned int get_enclosing_image_size(const ParticlesTemp &ps, double pixel_size, unsigned int slack)
Get an automatic size for an image that contains the particles.
std::pair< algebra::Transformation2D, double > ResultAlign2D
Definition: align2D.h:22
void do_resample_polar(Image *im1, Image *im2, const PolarResamplingParameters &polar_params)
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
em2d::ResultAlign2D get_complete_alignment_no_preprocessing(const cv::Mat &input, const cv::Mat &INPUT, const cv::Mat &POLAR1, cv::Mat &m_to_align, const cv::Mat &POLAR2, bool apply=false)
double get_overlap_percentage(cv::Mat &m1, cv::Mat &m2, const IntPair &center)
RegistrationResults read_registration_results(const String &filename)
Reads a set of registration results.
void get_diffusion_filtering_partial_derivative(const cv::Mat &m, cv::Mat &der, double dx, double dy, double ang)
Ints get_unique_index(const algebra::Rotation3D &rot)
Map a rotation to a list of 4 "unique" integers.
double get_global_score(const RegistrationResults &RRs)
void do_place(cv::Mat &mask, cv::Mat &m, const algebra::Vector2D &v)
void do_morphologic_reconstruction(const cv::Mat &mask, cv::Mat &marker, int neighbors_mode=4)
morphologic grayscale reconstruction (L Vincent, 1993)
Output IMP model data in various file formats.
Functionality for loading, creating, manipulating and scoring atomic structures.
Support for the RMF file format for storing hierarchical molecular data and markup.
Divide-and-conquer inferential optimization in discrete space.
Support for small angle X-ray scattering (SAXS) data.
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
Definition: exception.h:72
void get_projection(em2d::Image *img, const ParticlesTemp &ps, const RegistrationResult &reg, const ProjectingOptions &options, MasksManagerPtr masks=MasksManagerPtr(), String name="")
Generates a projection from particles.
Inferential scoring building on methods developed as part of the Inferential Structure Determination ...
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56
void get_spectrum(const cv::Mat &m, cv::Mat &real, cv::Mat &imag)
Computes the fft of a matrix and returns the real and imaginary matrices.