/* Ignore things to prevent SWIG warning about them */ namespace IMP::em { %ignore DensityMap::operator =; } %ignore operator<<(std::ostream&, const DensityHeader &); %ignore operator<<(std::ostream&, const EMHeader &); %ignore operator<<(std::ostream&, const MRCHeader &); /* Make selected classes extensible in Python */ IMP_REFCOUNT_RETURN_SINGLE(IMP::em::DensityMap) /* Wrap our own classes */ %include "IMP/em/def.h" %include "IMP/em/DensityHeader.h" %include "IMP/em/MapReaderWriter.h" %include "IMP/em/DensityMap.h" %include "IMP/em/EMReaderWriter.h" %include "IMP/em/XplorReaderWriter.h" %include "IMP/em/MRCReaderWriter.h" %include "IMP/em/KernelParameters.h" %include "IMP/em/SampledDensityMap.h" %include "IMP/em/CoarseCC.h" %include "IMP/em/CoarseConvolution.h" %include "IMP/em/CoarseCCatIntervals.h" %include "IMP/em/SurfaceShellDensityMap.h" %include "IMP/em/FitRestraint.h" %include "IMP/em/converters.h" %include "IMP/em/project.h" %include "IMP/em/SpiderHeader.h" %include "IMP/em/ImageHeader.h" %include "IMP/em/ImageReaderWriter.h" %include "IMP/em/SpiderReaderWriter.h" %include "IMP/em/Volume.h" %include "IMP/em/Image.h" %include "IMP/em/noise.h" %include "IMP/em/filters.h" %include "IMP/em/rigid_fitting.h" /* Allow runtime casting of Restraint* objects to FitRestraint* */ namespace IMP { namespace em { %extend FitRestraint { static FitRestraint* cast(Restraint *r) { return dynamic_cast(r); } } %template(project_given_rotation1) ::IMP::em::project_given_rotation1; %template(project_given_direction1) ::IMP::em::project_given_direction1; %template(_ImageReaderWriter) ::IMP::em::ImageReaderWriter; %template(_SpiderImageReaderWriter) ::IMP::em::SpiderImageReaderWriter; %template(_Image) ::IMP::em::Image; %template(_Volume) ::IMP::em::Volume; %template(floats) ::std::vector; %template(add_noise) ::IMP::em::add_noise<::IMP::algebra::Matrix2D >; %template(add_noise_d) ::IMP::em::add_noise<::IMP::algebra::Matrix2D >; %template(FilterByThreshold2D) ::IMP::em::FilterByThreshold; %template(FilterByThreshold3D) ::IMP::em::FilterByThreshold; } } // Cannot instantiate template classes directly, since SWIG complains about // attempts to redefine the template classes; so rename them in the Python layer %pythoncode { ImageReaderWriter = _ImageReaderWriter SpiderImageReaderWriter = _SpiderImageReaderWriter Image = _Image Volume = _Volume }