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