diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4ec29e6b73bcf120b46cbc2eb81830a84c5673d3..d5a2c7632e717937308cdc6de08d08933ddbb7ef 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -8,6 +8,7 @@ Changes in Release 2.2.x * DSSP 4.0 support in DSSP binding (https://github.com/PDB-REDO/dssp) * mol.alg.PDBize does not turn plain polymer chains (not marked peptide or nucleotide) into ligand chains anymore + * Remove ENABLE_IMG flag in cmake build system - img module is always built now * Several minor bug fixes and improvements. Changes in Release 2.2.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index e64a83ad54034fb980330ad8963416b443748bca..ba6cfe36f4e204a17cc4bd53e33e9c55cf021599 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,8 +34,6 @@ option(ENABLE_GFX "whether graphics support should be enabled" ON) option(OPENGLPREFERENCE_LEGACY "whether to use the OpenGL Legacy GL implementation" OFF) -option(ENABLE_IMG "whether the image processing module should be compiled" - ON) option(ENABLE_INFO "whether openstructure should be compiled with support for the info library" ON) option(USE_NUMPY "whether numpy support is added" @@ -129,11 +127,6 @@ if (COMPILE_TMTOOLS) else() set(_TM_TOOLS OFF) endif() -if (ENABLE_IMG) - set(_IMG ON) -else() - set(_IMG OFF) -endif() if (PROFILE) set(_PROFILE ON) else() @@ -229,14 +222,11 @@ if (ENABLE_GFX) find_package(OpenGL REQUIRED) endif() -if (ENABLE_IMG OR ENABLE_GFX) - find_package(PNG REQUIRED) -else() - set (PNG_LIBRARY "") -endif() - find_package(EIGEN 3.2.0 REQUIRED) find_package(SQLITE3 3.7.13 REQUIRED) +find_package(PNG REQUIRED) +find_package(FFTW REQUIRED) +find_package(TIFF REQUIRED) if(USE_NUMPY) find_package(Numpy REQUIRED) @@ -249,12 +239,6 @@ else(ENABLE_MM) set(_OPENMM_PLUGINS "NONE") endif(ENABLE_MM) -if (ENABLE_IMG) - find_package(FFTW REQUIRED) - find_package(TIFF REQUIRED) -endif() - - if (ENABLE_STATIC) set(Boost_LIBRARIES) set(Boost_USE_STATIC_LIBS ON) @@ -367,7 +351,6 @@ message(STATUS " Info support (-DENABLE_INFO) : ${_INFO}\n" " Graphical interface (-DENABLE_GUI) : ${_UI}\n" " OpenGL support (-DENABLE_GFX) : ${_OPENGL}\n" - " Image Processing support (-DENABLE_IMG) : ${_IMG}\n" " Shader support (-DUSE_SHADER) : ${_SHADER}\n" " Numpy support (-DUSE_NUMPY) : ${_NUMPY}\n" " SpaceNav Device support (-DENABLE_SPNAV) : ${_SPNAV}\n" diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 1de92e23ab98b0b4ff7860ba2270a7716608bf99..fa8d9e3ffd61d3a7ba8a122862b01a15892d07af 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -18,9 +18,6 @@ endif() if (USE_DOUBLE_PRECISION) set(CMAKE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-double") endif() -if (NOT ENABLE_IMG) - set(CMAKE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-no_img") -endif() if (NOT ENABLE_GFX) set(CMAKE_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-no_gfx") endif() diff --git a/modules/base/pymod/CMakeLists.txt b/modules/base/pymod/CMakeLists.txt index 77f8ae1d427fcd9fef050926b7343f41697f99a5..a4cc6c8cc84c27107e15191e631320174e72c590 100644 --- a/modules/base/pymod/CMakeLists.txt +++ b/modules/base/pymod/CMakeLists.txt @@ -22,9 +22,9 @@ endif(ENABLE_GUI) if(ENABLE_GFX) set(SUBST_DICT "${SUBST_DICT},${SQ}gfx${SQ}") endif(ENABLE_GFX) -if(ENABLE_IMG) - set(SUBST_DICT "${SUBST_DICT},${SQ}img${SQ}") -endif(ENABLE_IMG) + +set(SUBST_DICT "${SUBST_DICT},${SQ}img${SQ}") + if(ENABLE_INFO) set(SUBST_DICT ${SUBST_DICT},${SQ}info${SQ}) endif(ENABLE_INFO) diff --git a/modules/config/CMakeLists.txt b/modules/config/CMakeLists.txt index e6588b170dd743186cc19253d0a4e14c78539e0e..60c1c38e2c92c53fa1f694a268762a0428c2c5eb 100644 --- a/modules/config/CMakeLists.txt +++ b/modules/config/CMakeLists.txt @@ -26,11 +26,6 @@ if (PROFILE) else() set(profiling_enabled 0) endif() -if (ENABLE_IMG) - set(img_enabled 1) -else() - set(img_enabled 0) -endif() if (_DOUBLE_PREC) set(double_prec 1) else() diff --git a/modules/config/config.hh.in b/modules/config/config.hh.in index 9cc959a3654af7bbc4808fcca2f24a521a814e9d..e69421653566716ccbd29636fab7baaa7bdf2028 100644 --- a/modules/config/config.hh.in +++ b/modules/config/config.hh.in @@ -26,7 +26,6 @@ #define OST_SHADER_SUPPORT_ENABLED @shader_support@ #define OST_PROFILING_ENABLED @profiling_enabled@ #define OST_ANIMATIONS_ENABLED @animations_enabled@ -#define OST_IMG_ENABLED @img_enabled@ #define OST_DOUBLE_PRECISION @double_prec@ #define OST_STATIC_PROPERTY_WORKAROUND @static_props@ #define OST_FFT_USE_THREADS @fftw_use_threads@ diff --git a/modules/doc/install.rst b/modules/doc/install.rst index a2820d768c78e7c5bc00a1a2243ceac7021ea059..7b0dc73d9069a69b08404589e0338f9366f2d50a 100644 --- a/modules/doc/install.rst +++ b/modules/doc/install.rst @@ -36,9 +36,6 @@ parentheses. * `zlib <https://zlib.net/>`_ (usually comes with Boost or system) * `Eigen3 <http://eigen.tuxfamily.org>`_ (3.2.0) * `SQLite3 <https://www3.sqlite.org>`_ (3.7.13) - -When you enable support for image processing, you will need: - * `FFTW3 <http://fftw.org>`_. By default, OpenStructure is compiled with single precision and thus also requires FFTW to be compiled with single precision. Most platforms offer this as a second package. If you are compiling manually, @@ -52,6 +49,7 @@ If you would like to use the info module, also install: If you would like to use the graphical user interface (GUI), also install: +* `Qt5 <http://qt-project.org/>`_ * `SIP <http://www.riverbankcomputing.co.uk/software/sip/download>`_ * `PyQt5 <http://www.riverbankcomputing.co.uk/software/pyqt/download>`_ @@ -183,10 +181,6 @@ can influence it. * `USE_NUMPY` allows OpenStructure to pass back data in NumPy format. By default, this is switched off. -* `ENABLE_IMG` controls whether to build the image processing module. This will - enable support for density maps, and general image processing in 1, 2 an 3 - dimensions. By default, this is switched on. - * `ENABLE_MM` controls whether the molecular mechanics module is enabled. By default, this is switched off. If it is turned on, you should also set the paths to your local OpenMM installation: diff --git a/modules/gfx/pymod/CMakeLists.txt b/modules/gfx/pymod/CMakeLists.txt index cdc4abb2158de61e9639cc50d839fc760c28e30d..c9ef2a2cbc6e6e77d33fe11001f113081fc9a4f5 100644 --- a/modules/gfx/pymod/CMakeLists.txt +++ b/modules/gfx/pymod/CMakeLists.txt @@ -16,12 +16,9 @@ set(OST_GFX_PYMOD_SOURCES export_glwin_base.cc export_exporter.cc export_bitmap.cc + export_map.cc ) -if (ENABLE_IMG) - set(OST_GFX_PYMOD_SOURCES ${OST_GFX_PYMOD_SOURCES} export_map.cc) -endif() - pymod(NAME gfx CPP ${OST_GFX_PYMOD_SOURCES} PY __init__.py py_gfx_obj.py) set(GRADIENT_FILE diff --git a/modules/gfx/pymod/color_by_def.hh b/modules/gfx/pymod/color_by_def.hh index 86938289d454a379c3c714bfad11b5cbdba6ba6a..a7298b013e2e463a61ea194f696f1ad71d7157a7 100644 --- a/modules/gfx/pymod/color_by_def.hh +++ b/modules/gfx/pymod/color_by_def.hh @@ -21,10 +21,8 @@ #include <ost/config.hh> #include <ost/gfx/gfx_object.hh> - -#if OST_IMG_ENABLED #include <ost/img/alg/stat.hh> -#endif + using namespace ost; using namespace ost::gfx; @@ -106,7 +104,6 @@ inline void color_by_e7(GfxObj* go, color_by_e5(go,eh.CreateFullView(),prop,c1,c2); } -#if OST_IMG_ENABLED inline void color_by_m0(GfxObj* go, const ::img::MapHandle& mh, const String& prop, @@ -154,7 +151,6 @@ inline void color_by_m3(GfxObj* go, g.SetColorAt(1.0,c2); go->ColorBy(mh,prop,g,minv, maxv); } -#endif } @@ -168,15 +164,11 @@ inline void color_by_m3(GfxObj* go, .def("ColorBy",ost_gfx::color_by_e6)\ .def("ColorBy",ost_gfx::color_by_e7) -#if OST_IMG_ENABLED # define COLOR_BY_DEF_MAP() \ .def("ColorBy",ost_gfx::color_by_m0)\ .def("ColorBy",ost_gfx::color_by_m1)\ .def("ColorBy",ost_gfx::color_by_m2)\ .def("ColorBy",ost_gfx::color_by_m3) -#else -# define COLOR_BY_DEF_MAP() -#endif #define COLOR_BY_DEF() \ COLOR_BY_DEF_STD() \ diff --git a/modules/gfx/pymod/export_color_ops.cc b/modules/gfx/pymod/export_color_ops.cc index c77458b6773dfdb870ebb6e11b9e1f15c49cc435..941fda907bba98f825d40fe71a0d596f1b5cdee7 100644 --- a/modules/gfx/pymod/export_color_ops.cc +++ b/modules/gfx/pymod/export_color_ops.cc @@ -28,9 +28,7 @@ #include <ost/gfx/color_ops/gradient_color_op.hh> #include <ost/gfx/color_ops/gradient_level_color_op.hh> #include <ost/gfx/color_ops/entity_view_color_op.hh> -#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IMG_ENABLED using namespace boost::python; @@ -146,7 +144,6 @@ void export_ColorOps() .staticmethod("FromInfo") ; -#if OST_IMG_ENABLED class_<MapHandleColorOp, bases<GradientColorOp> >("MapHandleColorOp", init<>()) .def(init<const MapHandleColorOp&>()) .def(init<const String&, const String&, const gfx::Gradient&, float, float, const img::MapHandle&>()) @@ -158,8 +155,6 @@ void export_ColorOps() .def("FromInfo",&MapHandleColorOp::FromInfo) .staticmethod("FromInfo") ; -#endif //OST_IMG_ENABLED - } diff --git a/modules/gfx/pymod/export_entity.cc b/modules/gfx/pymod/export_entity.cc index 334a96c5b3d359c0560e72857dea29a377b423ad..a88fdca7dd58b0d98f8c63a9eb854394bcd406ca 100644 --- a/modules/gfx/pymod/export_entity.cc +++ b/modules/gfx/pymod/export_entity.cc @@ -215,7 +215,6 @@ void ent_apply_52(Entity* e, GradientLevelColorOp& glco){ e->Apply(glco); } -#if OST_IMG_ENABLED void ent_apply_61(Entity* e, MapHandleColorOp& mhco, bool store){ e->Apply(mhco,store); } @@ -223,8 +222,6 @@ void ent_apply_62(Entity* e, MapHandleColorOp& mhco){ e->Apply(mhco); } -#endif //OST_IMG_ENABLED - RenderOptionsPtr ent_sline_opts(Entity* ent) { return ent->GetOptions(RenderMode::SLINE); @@ -407,10 +404,8 @@ void export_Entity() .def("Apply",&ent_apply_42) .def("Apply",&ent_apply_51) .def("Apply",&ent_apply_52) -#if OST_IMG_ENABLED .def("Apply",&ent_apply_61) .def("Apply",&ent_apply_62) -#endif //OST_IMG_ENABLED .add_property("seq_hack",&Entity::GetSeqHack,&Entity::SetSeqHack) ; //register_ptr_to_python<EntityP>(); diff --git a/modules/gfx/pymod/wrap_gfx.cc b/modules/gfx/pymod/wrap_gfx.cc index 10967df666492b09bdbca2e318e42067d547a010..6fe8e62d659f8b2ecb436b0933ec78a97682255f 100644 --- a/modules/gfx/pymod/wrap_gfx.cc +++ b/modules/gfx/pymod/wrap_gfx.cc @@ -39,10 +39,7 @@ extern void export_color(); extern void export_gradient(); extern void export_bitmap(); extern void export_Exporter(); - -#if OST_IMG_ENABLED - extern void export_Map(); -#endif +extern void export_Map(); extern void export_SymmetryNode(); extern void export_SceneObserver(); @@ -63,9 +60,7 @@ BOOST_PYTHON_MODULE(_ost_gfx) export_Entity(); export_Surface(); export_RenderOptions(); -#if OST_IMG_ENABLED export_Map(); -#endif export_SymmetryNode(); export_SceneObserver(); export_ColorOps(); diff --git a/modules/gfx/src/CMakeLists.txt b/modules/gfx/src/CMakeLists.txt index d7790789e5c38d1bac5fcd90a29cba681aac1297..a726580526118a4ac1ccd3318351ac6dca596b3f 100644 --- a/modules/gfx/src/CMakeLists.txt +++ b/modules/gfx/src/CMakeLists.txt @@ -40,6 +40,7 @@ povray.hh exporter.hh exporter_fw.hh gost_exporter.hh +color_ops/map_handle_color_op.hh ) set(OST_GFX_COLOR_OPS_HEADERS @@ -51,6 +52,7 @@ gradient_color_op.hh entity_view_color_op.hh basic_gradient_color_op.hh gradient_level_color_op.hh +map_handle_color_op.hh ) set(OST_GFX_RENDER_OPTIONS_HEADERS @@ -86,11 +88,6 @@ tabulated_trig.hh fast_spheres.hh ) - -if (ENABLE_IMG) - list(APPEND OST_GFX_HEADERS color_ops/map_handle_color_op.hh) -endif() - set(OST_GFX_SOURCES bitmap_io.cc exporter.cc @@ -149,37 +146,31 @@ render_options/sline_render_options.cc render_options/line_trace_render_options.cc render_options/cartoon_render_options.cc render_options/trace_render_options.cc +color_ops/map_handle_color_op.cc ) -if (ENABLE_IMG) - set(OST_GFX_MAP_IMPL_HEADERS - map_iso_gen.hh - map_iso_gen_s.hh - map_iso_gen_s.hh - map_iso_spec.hh - map_octree.hh - octree_isocont.hh - ) - set(OST_GFX_MAP_SOURCES - map_iso.cc - map_slab.cc - impl/map_iso_gen.cc - impl/map_iso_gen_s.cc - impl/map_iso_gen_o.cc - impl/map_octree.cc - impl/octree_isocont.cc - ) - set(OST_GFX_MAP_HEADERS - map_iso.hh - map_slab.hh - map_iso_prop.hh - ) - list(APPEND OST_GFX_COLOR_OPS_HEADERS map_handle_color_op.hh) - list(APPEND OST_GFX_SOURCES color_ops/map_handle_color_op.cc) -else() - set(OST_GFX_MAP_HEADERS "") - set(OST_GFX_MAP_SOURCES "") -endif() +set(OST_GFX_MAP_IMPL_HEADERS +map_iso_gen.hh +map_iso_gen_s.hh +map_iso_gen_s.hh +map_iso_spec.hh +map_octree.hh +octree_isocont.hh +) +set(OST_GFX_MAP_SOURCES +map_iso.cc +map_slab.cc +impl/map_iso_gen.cc +impl/map_iso_gen_s.cc +impl/map_iso_gen_o.cc +impl/map_octree.cc +impl/octree_isocont.cc +) +set(OST_GFX_MAP_HEADERS +map_iso.hh +map_slab.hh +map_iso_prop.hh +) if (USE_SHADER) list(APPEND OST_GFX_SOURCES shader.cc) @@ -197,10 +188,7 @@ if (USE_SHADER) endif() endif() -set(OST_GFX_DEPENDENCIES "ost_conop;ost_seq") -if (ENABLE_IMG) - set(OST_GFX_DEPENDENCIES "${OST_GFX_DEPENDENCIES};ost_img;ost_img_alg") -endif() +set(OST_GFX_DEPENDENCIES "ost_conop;ost_seq;ost_img;ost_img_alg") module(NAME gfx SOURCES ${OST_GFX_SOURCES} ${OST_GFX_MAP_SOURCES} HEADERS ${OST_GFX_MAP_IMPL_HEADERS} ${OST_GFX_IMPL_HEADERS} IN_DIR impl diff --git a/modules/gfx/src/entity.cc b/modules/gfx/src/entity.cc index 1d1f232baec883f490e86a592a9a33fa6347c4bf..87ab2d58b1badd14fad6a24300a42c6934fd61a4 100644 --- a/modules/gfx/src/entity.cc +++ b/modules/gfx/src/entity.cc @@ -836,7 +836,6 @@ void Entity::ColorBy(const mol::EntityView& ev, this->Apply(evop); } -#if OST_IMG_ENABLED void Entity::ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv) @@ -844,7 +843,6 @@ void Entity::ColorBy(const img::MapHandle& mh, MapHandleColorOp mhop = MapHandleColorOp("",prop,g,minv,maxv,mh); this->Apply(mhop); } -#endif //OST_IMG_ENABLED void Entity::ColorBy(const String& prop, const Gradient& gradient, @@ -1097,7 +1095,6 @@ void Entity::Apply(const gfx::EntityViewColorOp& op, bool store) FlagRebuild(); } -#if OST_IMG_ENABLED void Entity::Apply(const gfx::MapHandleColorOp& op, bool store) { if(store){ @@ -1107,7 +1104,6 @@ void Entity::Apply(const gfx::MapHandleColorOp& op, bool store) apply_color_op_to_renderer_list(renderer_.begin(), renderer_.end(), op); FlagRebuild(); } -#endif void Entity::CleanColorOps() { diff --git a/modules/gfx/src/entity.hh b/modules/gfx/src/entity.hh index f16fe32924ba035911a314108f908ad812614d52..73746563d030af9da7b790b32a796f911bc9413a 100644 --- a/modules/gfx/src/entity.hh +++ b/modules/gfx/src/entity.hh @@ -36,10 +36,7 @@ #include <ost/gfx/color_ops/uniform_color_op.hh> #include <ost/gfx/color_ops/gradient_level_color_op.hh> #include <ost/gfx/color_ops/entity_view_color_op.hh> - -#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IMG_ENABLED #include <ost/gfx/impl/entity_renderer.hh> @@ -233,12 +230,10 @@ public: const String& prop, const Gradient& g, float minv, float maxv); -#if OST_IMG_ENABLED // GfxObj property interface virtual void ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv); -#endif // map property to color gradient from minv to maxv void ColorBy(const String& prop, @@ -294,13 +289,9 @@ public: void Apply(const gfx::ByElementColorOp& op, bool store=true); void Apply(const gfx::ByChainColorOp& op, bool store=true); void Apply(const gfx::UniformColorOp& op, bool store=true); - void Apply(const gfx::GradientLevelColorOp& op, bool store=true); void Apply(const gfx::EntityViewColorOp& op, bool store=true); - -#if OST_IMG_ENABLED void Apply(const gfx::MapHandleColorOp& op, bool store=true); -#endif void CleanColorOps(); void ReapplyColorOps(); diff --git a/modules/gfx/src/gfx_object.cc b/modules/gfx/src/gfx_object.cc index dbfe17cddd122612c98a977e76ba9138654a7ee1..2df82251d81f3422e29629f3c6d809f8ae3817b7 100644 --- a/modules/gfx/src/gfx_object.cc +++ b/modules/gfx/src/gfx_object.cc @@ -34,10 +34,7 @@ #include "povray.hh" #include "impl/mapped_property.hh" #include "exporter.hh" - -#if OST_IMG_ENABLED -# include <ost/img/alg/stat.hh> -#endif // OST_IMG_ENABLED +#include <ost/img/alg/stat.hh> #if OST_SHADER_SUPPORT_ENABLED #include "shader.hh" @@ -454,14 +451,12 @@ void GfxObj::ColorBy(const mol::EntityView& ev, LOG_VERBOSE("ColorBy not implemented for this gfx object"); } -#if OST_IMG_ENABLED void GfxObj::ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g, float minv, float maxv) { LOG_VERBOSE("ColorBy not implemented for this gfx object"); } -#endif ////////////////////////////////////////////////// // and now for the rest of the GfxObj interface diff --git a/modules/gfx/src/gfx_object.hh b/modules/gfx/src/gfx_object.hh index 4049eb77fdfb51d06565c7f25cf0497f8ba6c527..6e1b36275045d97c3aef853ecfa08d1304b0e72f 100644 --- a/modules/gfx/src/gfx_object.hh +++ b/modules/gfx/src/gfx_object.hh @@ -104,11 +104,9 @@ public: virtual void ColorBy(const mol::EntityView& ev, const String& prop, const Gradient& g, float minv, float maxv); -#if OST_IMG_ENABLED virtual void ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv); -#endif // end of gfx obj base interface diff --git a/modules/gfx/src/gfx_object_base.hh b/modules/gfx/src/gfx_object_base.hh index c2072ab89febaac523e82e77616e62f7b4beffeb..dae0a54144623667ce55b015b5cd6bb06e60ceec 100644 --- a/modules/gfx/src/gfx_object_base.hh +++ b/modules/gfx/src/gfx_object_base.hh @@ -26,9 +26,7 @@ #include <ost/geom/geom.hh> #include <ost/mol/entity_handle.hh> #include <ost/mol/entity_view.hh> -#if OST_IMG_ENABLED -# include <ost/img/map.hh> -#endif +#include <ost/img/map.hh> #include <ost/config.hh> #include "module_config.hh" @@ -135,15 +133,10 @@ class DLLEXPORT_OST_GFX GfxObjBase: public GfxNode const String& prop, const Gradient& g, float minv, float maxv) = 0; -#if OST_IMG_ENABLED /// \brief color based on image virtual void ColorBy(const img::MapHandle& mh, const String& prop, - const Gradient& g,float minv, float maxv) = 0; -#endif - - - + const Gradient& g,float minv, float maxv) = 0; }; }} // ns diff --git a/modules/gfx/src/impl/connect_renderer_base.cc b/modules/gfx/src/impl/connect_renderer_base.cc index 51afae44fa6cf9d343cce17c13b88c447c304122..1986ea302d37b305569e8a8629f4dcb394f98983 100644 --- a/modules/gfx/src/impl/connect_renderer_base.cc +++ b/modules/gfx/src/impl/connect_renderer_base.cc @@ -237,14 +237,11 @@ void ConnectRendererBase::Apply(const gfx::EntityViewColorOp& op) state_|=DIRTY_VA; } -#if OST_IMG_ENABLED void ConnectRendererBase::Apply(const gfx::MapHandleColorOp& op) { apply_color_op(this,&view_,MapHandleGetCol(op),op); state_|=DIRTY_VA; } -#endif - void ConnectRendererBase::PickAtom(const geom::Line3& line, Real line_width, mol::AtomHandle& picked_atom) diff --git a/modules/gfx/src/impl/connect_renderer_base.hh b/modules/gfx/src/impl/connect_renderer_base.hh index bcf8691eae2cd3fd3db3b1451305548598ac00b6..3bbf0b2976e171a536aabd4800009260ec6d5a1e 100644 --- a/modules/gfx/src/impl/connect_renderer_base.hh +++ b/modules/gfx/src/impl/connect_renderer_base.hh @@ -47,9 +47,7 @@ public: virtual void PickAtom(const geom::Line3& line, Real line_width, mol::AtomHandle& picked_atom); -#if OST_IMG_ENABLED virtual void Apply(const gfx::MapHandleColorOp& op); -#endif virtual void PickBond(const geom::Line3& line, Real line_width, mol::BondHandle& picked_bond); diff --git a/modules/gfx/src/impl/entity_renderer.hh b/modules/gfx/src/impl/entity_renderer.hh index 0157c5b08d4420c7ceb71a66c7dc6109e99cd785..602a600959b8a33155a6d6d255dd24b5328620f9 100644 --- a/modules/gfx/src/impl/entity_renderer.hh +++ b/modules/gfx/src/impl/entity_renderer.hh @@ -49,9 +49,7 @@ #include <ost/gfx/color_ops/uniform_color_op.hh> #include <ost/gfx/color_ops/gradient_level_color_op.hh> #include <ost/gfx/color_ops/entity_view_color_op.hh> -#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IMG_ENABLED #include "mapped_property.hh" #include "entity_renderer_fw.hh" @@ -157,9 +155,7 @@ public: virtual void Apply(const gfx::UniformColorOp& op)=0; virtual void Apply(const gfx::GradientLevelColorOp& op)=0; virtual void Apply(const gfx::EntityViewColorOp& op)=0; -#if OST_IMG_ENABLED virtual void Apply(const gfx::MapHandleColorOp& op)=0; -#endif bool IsDirty() const; @@ -263,7 +259,6 @@ struct EntityViewGetCol { float minv_, maxv_; }; -#if OST_IMG_ENABLED struct MapHandleGetCol { MapHandleGetCol(const MapHandleColorOp& op):property_(op.GetProperty()), mh_(op.GetMapHandle()), @@ -278,7 +273,6 @@ struct MapHandleGetCol { Gradient gradient_; float minv_, maxv_; }; -#endif }}} //ns diff --git a/modules/gfx/src/impl/mapped_property.cc b/modules/gfx/src/impl/mapped_property.cc index bb6dbf378aca5ac4aa4120e442e4acda7215da47..8c238bd8972b42c02a05ab754e1593d906ada9fe 100644 --- a/modules/gfx/src/impl/mapped_property.cc +++ b/modules/gfx/src/impl/mapped_property.cc @@ -23,7 +23,6 @@ namespace ost { namespace gfx { namespace impl { -#if OST_IMG_ENABLED namespace { float InterpolatedValue(const img::ImageHandle& mh, const geom::Vec3& xyz) @@ -51,9 +50,6 @@ float InterpolatedValue(const img::ImageHandle& mh, const geom::Vec3& xyz) } } -#endif - - float DLLEXPORT_OST_GFX MappedProperty(const mol::EntityView& ev, const String& prop, const geom::Vec3& pos) @@ -83,8 +79,7 @@ Color DLLEXPORT_OST_GFX MappedProperty(const mol::EntityView& ev, nrvo=g.GetColorAt(Normalize(MappedProperty(ev,prop,pos), minv, maxv)); return nrvo; } - -#if OST_IMG_ENABLED + float DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, const String& prop, const geom::Vec3& pos) @@ -102,5 +97,4 @@ Color DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, return nrvo; } -#endif }}} diff --git a/modules/gfx/src/impl/mapped_property.hh b/modules/gfx/src/impl/mapped_property.hh index bc380f068eba71334933d7de1ea71bbfdf5347df..a8a4fd296fed76e08653246b5adde585d44e1791 100644 --- a/modules/gfx/src/impl/mapped_property.hh +++ b/modules/gfx/src/impl/mapped_property.hh @@ -24,9 +24,7 @@ */ #include <ost/mol/entity_view.hh> -#if OST_IMG_ENABLED #include <ost/img/map.hh> -#endif #include <ost/gfx/module_config.hh> #include <ost/gfx/gradient.hh> @@ -49,8 +47,7 @@ float DLLEXPORT_OST_GFX MappedProperty(const mol::EntityView& ev, Color DLLEXPORT_OST_GFX MappedProperty(const mol::EntityView& ev, const String& prop, const Gradient& g, float minv, float maxv, - const geom::Vec3& pos); -#if OST_IMG_ENABLED + const geom::Vec3& pos); float DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, const String& prop, const geom::Vec3& pos); @@ -58,7 +55,6 @@ Color DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, const String& prop, const Gradient& g, float minv, float maxv, const geom::Vec3& pos); -#endif }}} diff --git a/modules/gfx/src/impl/trace_renderer_base.cc b/modules/gfx/src/impl/trace_renderer_base.cc index b78dad0ab5d90aaecbc1f7bb5878bccebb5b8b0a..76d98b1947628246ed7225ca9dcd92897a08a291 100644 --- a/modules/gfx/src/impl/trace_renderer_base.cc +++ b/modules/gfx/src/impl/trace_renderer_base.cc @@ -221,13 +221,11 @@ void TraceRendererBase::PickBond(const geom::Line3& line, Real line_width, // don't to anything } -#if OST_IMG_ENABLED void TraceRendererBase::Apply(const gfx::MapHandleColorOp& op) { apply_color_op(this,trace_subset_,MapHandleGetCol(op),op); state_|=DIRTY_VA; } -#endif void TraceRendererBase::rebuild_sel(const SplineEntryListList& spline_list_list, SplineEntryListList& sel_spline_list_list, diff --git a/modules/gfx/src/impl/trace_renderer_base.hh b/modules/gfx/src/impl/trace_renderer_base.hh index d8f4acdeb8e2c39f053e91df32cc17bc837ccf5c..e26c7a1a63834a27380923e064d70e4908703f22 100644 --- a/modules/gfx/src/impl/trace_renderer_base.hh +++ b/modules/gfx/src/impl/trace_renderer_base.hh @@ -51,10 +51,7 @@ public: virtual void Apply(const gfx::UniformColorOp& op); virtual void Apply(const gfx::GradientLevelColorOp& op); virtual void Apply(const gfx::EntityViewColorOp& op); -#if OST_IMG_ENABLED virtual void Apply(const gfx::MapHandleColorOp& op); -#endif - virtual void PickAtom(const geom::Line3& line, Real line_width, mol::AtomHandle& picked_atom); diff --git a/modules/gfx/src/surface.cc b/modules/gfx/src/surface.cc index c0adbef6c5af9d1c01f21af5ac680e6df4d1880b..4ca9ad3af376828e0e42980317e0c3ffc6a0a06f 100644 --- a/modules/gfx/src/surface.cc +++ b/modules/gfx/src/surface.cc @@ -191,7 +191,7 @@ void Surface::ColorBy(const mol::EntityView& ev, EntityViewColorOp evop = EntityViewColorOp(prop, g,minv,maxv,ev); this->Apply(evop); } -#if OST_IMG_ENABLED + void Surface::ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv) @@ -200,9 +200,6 @@ void Surface::ColorBy(const img::MapHandle& mh, this->Apply(mhop); } -#endif //OST_IMG_ENABLED - - namespace { float normalize(float v, float min_v, float max_v) @@ -344,8 +341,7 @@ void Surface::Apply(const gfx::EntityViewColorOp& op, bool store) } FlagRefresh(); } - -#if OST_IMG_ENABLED + void Surface::Apply(const gfx::MapHandleColorOp& op, bool store) { if(store){ @@ -362,7 +358,6 @@ void Surface::Apply(const gfx::MapHandleColorOp& op, bool store) } FlagRefresh(); } -#endif //OST_IMG_ENABLED void Surface::CleanColorOps() { diff --git a/modules/gfx/src/surface.hh b/modules/gfx/src/surface.hh index 52b7166f14da0ac893f3144f2aad6f13f5c1b8a0..19d97e88e5ed5c881dda5f82aca069db37cd63ed 100644 --- a/modules/gfx/src/surface.hh +++ b/modules/gfx/src/surface.hh @@ -36,10 +36,7 @@ #include <ost/gfx/color_ops/basic_gradient_color_op.hh> #include <ost/gfx/color_ops/gradient_level_color_op.hh> #include <ost/gfx/color_ops/entity_view_color_op.hh> - -#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IMG_ENABLED namespace ost { namespace gfx { @@ -69,13 +66,11 @@ public: // GfxObj property interface virtual void ColorBy(const mol::EntityView& ev, const String& prop, - const Gradient& g, float minv, float maxv); -#if OST_IMG_ENABLED + const Gradient& g, float minv, float maxv); // GfxObj property interface virtual void ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv); -#endif //OST_IMG_ENABLED // map property to color gradient from minv to maxv void ColorBy(const String& prop, @@ -104,9 +99,7 @@ public: void Apply(const gfx::BasicGradientColorOp& op, bool store=true); void Apply(const gfx::GradientLevelColorOp& op, bool store=true); void Apply(const gfx::EntityViewColorOp& op, bool store=true); -#if OST_IMG_ENABLED void Apply(const gfx::MapHandleColorOp& op, bool store=true); -#endif void CleanColorOps(); void ReapplyColorOps(); diff --git a/modules/gfx/tests/CMakeLists.txt b/modules/gfx/tests/CMakeLists.txt index 273ab6809780c1c9cc2a7083b0c4beaac9ec7a29..665302fbaf78f20ccabc3c9c0ce5cbc1663b0172 100644 --- a/modules/gfx/tests/CMakeLists.txt +++ b/modules/gfx/tests/CMakeLists.txt @@ -3,10 +3,8 @@ set(OST_GFX_UNIT_TESTS test_gfx_node.cc test_color.cc test_gfx.py + test_map_octree.cc ) -if (ENABLE_IMG) - list(APPEND OST_GFX_UNIT_TESTS test_map_octree.cc) -endif() ost_unittest(MODULE gfx SOURCES "${OST_GFX_UNIT_TESTS}" diff --git a/modules/gui/pymod/CMakeLists.txt b/modules/gui/pymod/CMakeLists.txt index 0f3b63b94fdec661fa1cb122c8754cb94a6b18ef..80c6a83447a978abe101be8caf86c38d7014654d 100644 --- a/modules/gui/pymod/CMakeLists.txt +++ b/modules/gui/pymod/CMakeLists.txt @@ -18,6 +18,10 @@ set(OST_GUI_PYMOD_SOURCES export_file_viewer.cc export_widget.cc export_gl_canvas.cc + data_viewer_proxy.cc + export_data_viewer.cc + export_overlay.cc + export_overlay_manager.cc ) set(OST_GUI_SCENE_PYMOD_MODULES __init__.py @@ -59,14 +63,6 @@ line_trace_widget.py wireframe_widget.py query_editor.py ) -if (ENABLE_IMG) - list(APPEND OST_GUI_PYMOD_SOURCES - data_viewer_proxy.cc - export_data_viewer.cc - export_overlay.cc - export_overlay_manager.cc - ) -endif() if (ENABLE_SPNAV) list( APPEND OST_GUI_PYMOD_SOURCES diff --git a/modules/gui/pymod/export_gosty.cc b/modules/gui/pymod/export_gosty.cc index 18f945e2e226ff363618c39e345ec3ea5956050d..5cb7544cf68ceeba945c3e14feaf3d336c96de58 100644 --- a/modules/gui/pymod/export_gosty.cc +++ b/modules/gui/pymod/export_gosty.cc @@ -35,17 +35,14 @@ using namespace boost::python; #include "transfer_ownership.hh" #include "sip_handler.hh" -#if OST_IMG_ENABLED #include "data_viewer_proxy.hh" using namespace ost::img::gui; -#endif using namespace ost; using namespace ost::gui; namespace { -#if OST_IMG_ENABLED DataViewerProxyPtr app_create_data_viewer1(GostyApp* app, const ost::img::ImageHandle& d, const QString& name) { return DataViewerProxyPtr(new DataViewerProxy(app->CreateDataViewer(d,name))); @@ -58,7 +55,6 @@ DataViewerProxyPtr app_create_data_viewer3(GostyApp* app, const ost::img::ImageH { return DataViewerProxyPtr(new DataViewerProxy(app->CreateDataViewer(d,name,noparent))); } -#endif } void app_add_widget_to_app_a(GostyApp* app, const QString& ident, @@ -115,11 +111,9 @@ void export_Gosty() return_value_policy<reference_existing_object>()) .add_property("message_widget", make_function(&GostyApp::GetMessageWidget, return_value_policy<reference_existing_object>())) - #if OST_IMG_ENABLED .def("CreateDataViewer", &app_create_data_viewer1) .def("CreateDataViewer", &app_create_data_viewer2) .def("CreateDataViewer", &app_create_data_viewer3) - #endif .def("ProcessEvents", &GostyApp::ProcessEvents) .add_property("perspective", make_function(&GostyApp::GetPerspective, diff --git a/modules/gui/pymod/export_scene_win.cc b/modules/gui/pymod/export_scene_win.cc index 3ef9546b547fda7a6fc67ca5c9672f83b6732951..d021a324a884203e718fef5e1f1d81f00c8d8150 100644 --- a/modules/gui/pymod/export_scene_win.cc +++ b/modules/gui/pymod/export_scene_win.cc @@ -56,9 +56,7 @@ void export_SceneWin() .value("VIEWS_SAME_OBJECT", VIEWS_SAME_OBJECT) .value("SINGLE", SINGLE) .value("MULTI", MULTI) -#if OST_IMG_ENABLED .value("MAP", MAP) -#endif .export_values() ; diff --git a/modules/gui/pymod/wrap_gui.cc b/modules/gui/pymod/wrap_gui.cc index 3dc8058875e0e6145112162d1006855dda6129e5..d9f18d313911ac6590178f27a2f18f59083a06e2 100644 --- a/modules/gui/pymod/wrap_gui.cc +++ b/modules/gui/pymod/wrap_gui.cc @@ -42,15 +42,12 @@ void export_FileLoader(); void export_FileViewer(); void export_Widget(); void export_GLCanvas(); - -#if OST_SPNAV_ENABLED -void export_Input(); -#endif - -#ifdef OST_IMG_ENABLED void export_data_viewer(); void export_overlay(); void export_overlay_manager(); + +#if OST_SPNAV_ENABLED +void export_Input(); #endif #include <boost/python/to_python_converter.hpp> @@ -134,11 +131,9 @@ BOOST_PYTHON_MODULE(_ost_gui) export_Input(); #endif - #if OST_IMG_ENABLED export_data_viewer(); export_overlay(); export_overlay_manager(); - #endif class_<AdminRights>("AdminRights", init<>()) .def("Acquire", &AdminRights::Acquire) diff --git a/modules/gui/src/CMakeLists.txt b/modules/gui/src/CMakeLists.txt index f9db89d699d04cca2fe90ffd40a29c4335d3f89f..e475fbdde390af650934b2ca89714911ecfd13c0 100644 --- a/modules/gui/src/CMakeLists.txt +++ b/modules/gui/src/CMakeLists.txt @@ -49,6 +49,7 @@ tool_options_widget.hh manipulator.hh tool_options_win.hh mouse_event.hh +map_tool.hh ) set(OST_GUI_PYTHON_SHELL_HEADERS main_thread_runner.hh @@ -133,34 +134,32 @@ plot_ticker_fw.hh plot_types.hh ) -if (ENABLE_IMG) - set(OST_GUI_DATA_VIEWER_HEADERS - argand.hh - data_viewer.hh - data_viewer_panel.hh - data_viewer_panel_base.hh - draw_overlay.hh - drawing_functions.hh - fft_panel.hh - info_panel.hh - img2qt.hh - mask_overlay.hh - null_overlay.hh - overlay.hh - overlay_base.hh - overlay_base_fw.hh - overlay_manager.hh - overlay_manager_fw.hh - overlay_manager_gui.hh - overlay_manager_observer.hh - pointlist_overlay.hh - pointlist_overlay_base.hh - strategies.hh - strategies_fw.hh - viewer_normalizer.hh - IN_DIR data_viewer - ) -endif() +set(OST_GUI_DATA_VIEWER_HEADERS +argand.hh +data_viewer.hh +data_viewer_panel.hh +data_viewer_panel_base.hh +draw_overlay.hh +drawing_functions.hh +fft_panel.hh +info_panel.hh +img2qt.hh +mask_overlay.hh +null_overlay.hh +overlay.hh +overlay_base.hh +overlay_base_fw.hh +overlay_manager.hh +overlay_manager_fw.hh +overlay_manager_gui.hh +overlay_manager_observer.hh +pointlist_overlay.hh +pointlist_overlay_base.hh +strategies.hh +strategies_fw.hh +viewer_normalizer.hh +IN_DIR data_viewer +) set(OST_GUI_HEADERS file_browser.hh @@ -293,6 +292,25 @@ scene_win/render_modes_node.cc scene_win/root_node.cc scene_win/scene_win.cc scene_win/scene_win_model.cc +tools/map_tool.cc +data_viewer/argand.cc +data_viewer/data_viewer.cc +data_viewer/data_viewer_panel.cc +data_viewer/data_viewer_panel_base.cc +data_viewer/draw_overlay.cc +data_viewer/drawing_functions.cc +data_viewer/fft_panel.cc +data_viewer/info_panel.cc +data_viewer/img2qt.cc +data_viewer/mask_overlay.cc +data_viewer/null_overlay.cc +data_viewer/overlay_base.cc +data_viewer/overlay_manager.cc +data_viewer/overlay_manager_gui.cc +data_viewer/pointlist_overlay.cc +data_viewer/pointlist_overlay_base.cc +data_viewer/strategies.cc +data_viewer/viewer_normalizer.cc ) set(HEADERS_TO_BE_MOCCED @@ -385,41 +403,16 @@ tools/tool_manager.hh tools/tool_options_widget.hh tools/measure_tool.hh tools/tool_options_win.hh +data_viewer/argand.hh +data_viewer/fft_panel.hh +data_viewer/info_panel.hh +data_viewer/data_viewer.hh +data_viewer/overlay_manager_gui.hh +data_viewer/data_viewer_panel_base.hh +data_viewer/null_overlay.hh +data_viewer/overlay_base.hh +data_viewer/pointlist_overlay_base.hh ) -if (ENABLE_IMG) - list(APPEND OST_GUI_TOOLS_HEADERS map_tool.hh) - list(APPEND OST_GUI_SOURCES - tools/map_tool.cc - data_viewer/argand.cc - data_viewer/data_viewer.cc - data_viewer/data_viewer_panel.cc - data_viewer/data_viewer_panel_base.cc - data_viewer/draw_overlay.cc - data_viewer/drawing_functions.cc - data_viewer/fft_panel.cc - data_viewer/info_panel.cc - data_viewer/img2qt.cc - data_viewer/mask_overlay.cc - data_viewer/null_overlay.cc - data_viewer/overlay_base.cc - data_viewer/overlay_manager.cc - data_viewer/overlay_manager_gui.cc - data_viewer/pointlist_overlay.cc - data_viewer/pointlist_overlay_base.cc - data_viewer/strategies.cc - data_viewer/viewer_normalizer.cc) - list(APPEND HEADERS_TO_BE_MOCCED - data_viewer/argand.hh - data_viewer/fft_panel.hh - data_viewer/info_panel.hh - data_viewer/data_viewer.hh - data_viewer/overlay_manager_gui.hh - data_viewer/data_viewer_panel_base.hh - data_viewer/null_overlay.hh - data_viewer/overlay_base.hh - data_viewer/pointlist_overlay_base.hh - ) -endif() if (ENABLE_SPNAV) set(spnav_enabled 1) diff --git a/modules/gui/src/file_browser.cc b/modules/gui/src/file_browser.cc index b390e911121a0e16145e0030f79a2462ed1e37c1..23051a760191c7de128b99a611ee57d3c4b7d008 100644 --- a/modules/gui/src/file_browser.cc +++ b/modules/gui/src/file_browser.cc @@ -36,11 +36,9 @@ #include <ost/gui/python_shell/python_interpreter.hh> -#if OST_IMG_ENABLED -# include <ost/img/image_handle.hh> -# include <ost/io/img/load_map.hh> -# include <ost/gfx/map_iso.hh> -#endif +#include <ost/img/image_handle.hh> +#include <ost/io/img/load_map.hh> +#include <ost/gfx/map_iso.hh> #include "widget_registry.hh" #include "file_browser.hh" diff --git a/modules/gui/src/file_loader.cc b/modules/gui/src/file_loader.cc index 0aef387175d695c453d309bf44e7eec53f2808b6..46ec00ffadf2ce61307b1c6f852b49a9f5dcf98e 100644 --- a/modules/gui/src/file_loader.cc +++ b/modules/gui/src/file_loader.cc @@ -45,12 +45,10 @@ #include <ost/gui/file_type_dialog.hh> #include <ost/gui/sequence_viewer/sequence_viewer.hh> -#if OST_IMG_ENABLED -# include <ost/io/img/load_map.hh> -# include <ost/gfx/map_iso.hh> -# include <ost/img/extent.hh> -# include <ost/gui/data_viewer/data_viewer.hh> -#endif +#include <ost/io/img/load_map.hh> +#include <ost/gfx/map_iso.hh> +#include <ost/img/extent.hh> +#include <ost/gui/data_viewer/data_viewer.hh> #include <QDir> #include <QAction> @@ -60,10 +58,7 @@ #include <QMenuBar> namespace ost { namespace gui { - -#if OST_IMG_ENABLED - QList<img::ImageHandle> FileLoader::loaded_images_; -#endif +QList<img::ImageHandle> FileLoader::loaded_images_; FileLoader::FileLoader(){} @@ -82,7 +77,6 @@ void FileLoader::LoadObject(const QString& filename, const QString& selection) else{ try{ obj=FileLoader::TryLoadEntity(filename, io::EntityIOHandlerP(), selection); - #if OST_IMG_ENABLED if (!obj) { try{ obj=FileLoader::TryLoadMap(filename); @@ -90,7 +84,6 @@ void FileLoader::LoadObject(const QString& filename, const QString& selection) return; } } - #endif if (!obj) { try{ obj=FileLoader::TryLoadAlignment(filename); @@ -148,11 +141,9 @@ gfx::GfxObjP FileLoader::NoHandlerFound(const QString& filename) if(dialog->GetSurfaceHandler()){ return TryLoadSurface(filename,dialog->GetSurfaceHandler()); } - #if OST_IMG_ENABLED if(dialog->GetMapHandler()){ return TryLoadMap(filename,dialog->GetMapHandler()); } - #endif } } catch (io::IOException& e) { @@ -235,7 +226,6 @@ gfx::GfxObjP FileLoader::TryLoadEntity(const QString& filename, io::EntityIOHand return gfx::GfxObjP(); } -#if OST_IMG_ENABLED gfx::GfxObjP FileLoader::TryLoadMap(const QString& filename, io::MapIOHandlerPtr handler) { if(!handler){ @@ -267,7 +257,6 @@ gfx::GfxObjP FileLoader::TryLoadMap(const QString& filename, io::MapIOHandlerPtr } return gfx::GfxObjP(); } -#endif gfx::GfxObjP FileLoader::TryLoadSurface(const QString& filename, io::SurfaceIOHandlerPtr handler) { diff --git a/modules/gui/src/file_loader.hh b/modules/gui/src/file_loader.hh index 805fa5cab3c039e2b20c7946425650fd1a636092..48166798c654773f00f026b9b6f8645fecd29990 100644 --- a/modules/gui/src/file_loader.hh +++ b/modules/gui/src/file_loader.hh @@ -29,9 +29,7 @@ #include <ost/io/mol/entity_io_handler.hh> #include <ost/io/seq/sequence_io_handler.hh> #include <ost/io/mol/surface_io_handler.hh> -#if OST_IMG_ENABLED -# include <ost/io/img/map_io_handler.hh> -#endif +#include <ost/io/img/map_io_handler.hh> #include <QString> #include <QList> @@ -52,20 +50,14 @@ private: static gfx::GfxObjP TryLoadEntity(const QString& filename, io::EntityIOHandlerP handler=io::EntityIOHandlerP(), const QString& selection=QString()); static gfx::GfxObjP TryLoadSurface(const QString& filename, io::SurfaceIOHandlerPtr handler=io::SurfaceIOHandlerPtr()); static gfx::GfxObjP TryLoadAlignment(const QString& filename, io::SequenceIOHandlerPtr handler=io::SequenceIOHandlerPtr()); -#if OST_IMG_ENABLED static gfx::GfxObjP TryLoadMap(const QString& filename, io::MapIOHandlerPtr handler=io::MapIOHandlerPtr()); -#endif static void RunScript(const QString& filename); static void LoadPDB(const QString& filename, const QString& selection=QString()); static void AddToScene(const QString& filename, gfx::GfxObjP obj); static void HandleError(const Error& e, ErrorType type, const QString& filename, gfx::GfxObjP obj=gfx::GfxObjP()); static gfx::GfxObjP NoHandlerFound(const QString& filename); virtual ~FileLoader(); - - -#if OST_IMG_ENABLED static QList<img::ImageHandle> loaded_images_; -#endif public: static void LoadObject(const QString& filename, const QString& selection=QString()); diff --git a/modules/gui/src/file_type_dialog.cc b/modules/gui/src/file_type_dialog.cc index 01cac724d9918f3e6be28a502c68d34f7f7997d0..6c998f9daa13957e0d8785ea76b129605162a1f2 100644 --- a/modules/gui/src/file_type_dialog.cc +++ b/modules/gui/src/file_type_dialog.cc @@ -61,14 +61,12 @@ public: this->AddRow(this->rowCount(),alignment_handler[i]->GetFormatName().c_str(),alignment_handler[i]->GetFormatDescription().c_str(),handler); } -#if OST_IMG_ENABLED io::MapIOFList map_handler = io::IOManager::Instance().GetAvailableMapHandler(); for(unsigned int i = 0 ; i < map_handler.size() ; i++){ QVariant handler = QVariant(); handler.setValue(map_handler[i]); this->AddRow(this->rowCount(),map_handler[i]->GetFormatName().c_str(),map_handler[i]->GetFormatDescription().c_str(),handler); } -#endif io::SurfaceIOFList surf_handler = io::IOManager::Instance().GetAvailableSurfaceHandler(); for(unsigned int i = 0 ; i < surf_handler.size() ; i++){ @@ -102,10 +100,7 @@ public: FileTypeDialog::FileTypeDialog(const QString& file_name, QWidget* parent): - QDialog(parent),entity_handler_(),seq_handler_(), surf_handler_() -#if OST_IMG_ENABLED - ,map_handler_() -#endif + QDialog(parent),entity_handler_(),seq_handler_(), surf_handler_(), map_handler_() { this->setWindowTitle("File format not recognized"); this->setFixedSize(QSize(400, 300)); @@ -152,13 +147,11 @@ void FileTypeDialog::accept() surf_handler_ = surf_handler_fac->Create(); break; } -#if OST_IMG_ENABLED io::MapIOHandlerFactoryBasePtr map_handler_fac = variant.value<io::MapIOHandlerFactoryBasePtr>(); if(map_handler_fac){ map_handler_ = map_handler_fac->Create(); break; } -#endif } } QDialog::accept(); @@ -176,10 +169,8 @@ io::SurfaceIOHandlerPtr FileTypeDialog::GetSurfaceHandler(){ return surf_handler_; } -#if OST_IMG_ENABLED io::MapIOHandlerPtr FileTypeDialog::GetMapHandler(){ return map_handler_; } -#endif }} //ns diff --git a/modules/gui/src/file_type_dialog.hh b/modules/gui/src/file_type_dialog.hh index 3b650a9254cf90b9bf1bdf630ffb478cc5f04751..73711914983580eba3a339b8238e0ff71e6778d4 100644 --- a/modules/gui/src/file_type_dialog.hh +++ b/modules/gui/src/file_type_dialog.hh @@ -30,9 +30,7 @@ #include <ost/io/mol/entity_io_handler.hh> #include <ost/io/seq/sequence_io_handler.hh> #include <ost/io/mol/surface_io_handler.hh> -#if OST_IMG_ENABLED #include <ost/io/img/map_io_handler.hh> -#endif #endif @@ -51,9 +49,7 @@ public: io::EntityIOHandlerP GetEntityHandler(); io::SequenceIOHandlerPtr GetSequenceHandler(); io::SurfaceIOHandlerPtr GetSurfaceHandler(); -#if OST_IMG_ENABLED io::MapIOHandlerPtr GetMapHandler(); -#endif public slots: virtual void accept(); private: @@ -62,9 +58,7 @@ private: io::EntityIOHandlerP entity_handler_; io::SequenceIOHandlerPtr seq_handler_; io::SurfaceIOHandlerPtr surf_handler_; -#if OST_IMG_ENABLED io::MapIOHandlerPtr map_handler_; -#endif }; @@ -73,8 +67,6 @@ private: Q_DECLARE_METATYPE(ost::io::EntityIOHandlerFactoryBaseP); Q_DECLARE_METATYPE(ost::io::SequenceIOHandlerFactoryBasePtr); Q_DECLARE_METATYPE(ost::io::SurfaceIOHandlerFactoryBasePtr); -#if OST_IMG_ENABLED Q_DECLARE_METATYPE(ost::io::MapIOHandlerFactoryBasePtr); -#endif #endif diff --git a/modules/gui/src/gl_win.cc b/modules/gui/src/gl_win.cc index f6d00bfb571f1d024d97e147576217be7994d0a5..24cbc29f0a2cf4e87a314c9d7ec3297d1f26d647 100644 --- a/modules/gui/src/gl_win.cc +++ b/modules/gui/src/gl_win.cc @@ -31,10 +31,7 @@ #include <ost/gui/tools/tool.hh> #include <ost/gui/tools/tool_bar.hh> #include <ost/gui/scene_menu.hh> - -#if OST_IMG_ENABLED -# include <ost/gui/tools/map_tool.hh> -#endif +#include <ost/gui/tools/map_tool.hh> /* Authors: Ansgar Philippsen, Marco Biasini @@ -61,9 +58,7 @@ GLWin::GLWin(QWidget* p, bool try_stereo): Widget(NULL, p) { ToolManager::Instance().AddTool(new SelectionTool); ToolManager::Instance().AddTool(new Manipulator); ToolManager::Instance().AddTool(new MeasureTool); -#if OST_IMG_ENABLED ToolManager::Instance().AddTool(new MapTool); -#endif scene_menu_ = new SceneMenu(); diff --git a/modules/gui/src/gosty_app.cc b/modules/gui/src/gosty_app.cc index 58bd7dd890f630f5fd1a629df49907dcae1ff9fd..ccd13bd8f9c6707379bc642cde1e881dd03f5d2b 100644 --- a/modules/gui/src/gosty_app.cc +++ b/modules/gui/src/gosty_app.cc @@ -28,10 +28,7 @@ #include <ost/gui/scene_win/scene_win.hh> #include <ost/gui/sequence_viewer/sequence_viewer.hh> #include <ost/gui/messages/message_widget.hh> - -#if OST_IMG_ENABLED - #include <ost/gui/data_viewer/data_viewer.hh> -#endif +#include <ost/gui/data_viewer/data_viewer.hh> #include <QApplication> #include <QMainWindow> @@ -112,7 +109,6 @@ SequenceViewer* GostyApp::GetSequenceViewer() return seq_viewer_; } -#if OST_IMG_ENABLED ost::img::gui::DataViewer* GostyApp::CreateDataViewer(const ost::img::ImageHandle& d, const QString& name, const int noparent) { ost::img::gui::DataViewer* viewer=NULL; @@ -129,7 +125,6 @@ ost::img::gui::DataViewer* GostyApp::CreateDataViewer(const ost::img::ImageHandl return viewer; } -#endif PythonShell* GostyApp::GetPyShell() { diff --git a/modules/gui/src/gosty_app.hh b/modules/gui/src/gosty_app.hh index 0831e1316b5de9a82eec5b88a7a3037e4d3184f1..d81e40fdb0c036a3e73f61fc998caa8f97004867 100644 --- a/modules/gui/src/gosty_app.hh +++ b/modules/gui/src/gosty_app.hh @@ -121,11 +121,9 @@ public: /// Stops the execution of the script. void StopScript(); -#if OST_IMG_ENABLED /// \brief create new DataViewer /// ost::img::gui::DataViewer* CreateDataViewer(const ost::img::ImageHandle& d, const QString& name="", const int noparent=0); -#endif /// \brief give the application time to run the mainloop and process events void ProcessEvents(); diff --git a/modules/gui/src/scene_selection.cc b/modules/gui/src/scene_selection.cc index 7057b6a9d2aaaea7ffbf6acba5ac7d1d09b58903..041fe2316283aaf9decd699044e74924825e92d7 100644 --- a/modules/gui/src/scene_selection.cc +++ b/modules/gui/src/scene_selection.cc @@ -28,12 +28,10 @@ #include <ost/gfx/gfx_object.hh> #include <ost/gfx/entity.hh> -#if OST_IMG_ENABLED -# include <ost/gfx/map_iso.hh> -# include <ost/gui/main_area.hh> -# include <ost/gui/perspective.hh> -# include <ost/gui/data_viewer/data_viewer.hh> -#endif +#include <ost/gfx/map_iso.hh> +#include <ost/gui/main_area.hh> +#include <ost/gui/perspective.hh> +#include <ost/gui/data_viewer/data_viewer.hh> #include <ost/gui/scene_win/scene_win.hh> @@ -127,8 +125,6 @@ void SceneSelection::Delete() { gfx::Scene::Instance().RequestRedraw(); } -#if OST_IMG_ENABLED - void SceneSelection::ViewDensitySlices() { for(unsigned int i = 0; i < nodes_.size(); i++){ gfx::GfxNodeP node = nodes_[i]; @@ -161,8 +157,6 @@ void SceneSelection::ShowOriginalMap() } } -#endif // OST_IMG_ENABLED - void SceneSelection::Deselect(){ for(unsigned int i = 0; i < nodes_.size(); i++){ gfx::GfxNodeP node = nodes_[i]; diff --git a/modules/gui/src/scene_selection.hh b/modules/gui/src/scene_selection.hh index 70ce89365ee7e99ffabbd13a5fa0540ff680b039..68a71915cc6ca7d70cb9f5b65690fb678a61771b 100644 --- a/modules/gui/src/scene_selection.hh +++ b/modules/gui/src/scene_selection.hh @@ -44,11 +44,9 @@ public: public slots: void CenterOnObjects(); void Delete(); -#if OST_IMG_ENABLED void ViewDensitySlices(); void ShowDownsampledMap(); void ShowOriginalMap(); -#endif // OST_IMG_ENABLED void Deselect(); void Show(); void Hide(); diff --git a/modules/gui/src/scene_win/context_menu.cc b/modules/gui/src/scene_win/context_menu.cc index aae03ae53ae07212e033045d7c9490ab7451df97..72ea6e6baa356e4611fec862941aa9c37d97d8d5 100644 --- a/modules/gui/src/scene_win/context_menu.cc +++ b/modules/gui/src/scene_win/context_menu.cc @@ -28,9 +28,7 @@ #include <ost/gui/scene_selection.hh> -#if OST_IMG_ENABLED #include <ost/gfx/map_iso.hh> -#endif // OST_IMG_ENABLED #include "custom_part_node.hh" #include "entity_node.hh" @@ -101,7 +99,6 @@ ContextMenu::ContextMenu(QTreeView* view, SceneWinModel* model): connect(action, SIGNAL(triggered()), this, SLOT(Rename())); this->AddAction(action, ENTITY_VIEW | SINGLE); -#if OST_IMG_ENABLED action = new QAction("View Density Slices",this); connect(action, SIGNAL(triggered()), SceneSelection::Instance(), SLOT(ViewDensitySlices())); this->AddAction(action, MAP); @@ -113,7 +110,6 @@ ContextMenu::ContextMenu(QTreeView* view, SceneWinModel* model): action = new QAction("Show Downsampled Map",this); connect(action, SIGNAL(triggered()), SceneSelection::Instance(), SLOT(ShowDownsampledMap())); this->AddAction(action, MAP | SINGLE | MAP_ORIGINAL | MAP_DSAMPLED_AVAIL); -#endif // OST_IMG_ENABLED } @@ -141,7 +137,6 @@ void ContextMenu::ShowMenu(const QPoint& pos) if(gfx::Scene::Instance().GetRootNode() == gfx_node){flags &= ~NOT_SCENE;} if(!dyn_cast<gfx::GfxObj> (gfx_node)){flags &= ~GFX_OBJECT;} if(!dyn_cast<gfx::Entity> (gfx_node)){flags &= ~ENTITY;} -#if OST_IMG_ENABLED if(!dyn_cast<gfx::MapIso>(gfx_node)) { flags &= ~MAP; @@ -161,14 +156,9 @@ void ContextMenu::ShowMenu(const QPoint& pos) } if(!dyn_cast<gfx::MapIso> (gfx_node)){flags &= ~MAP;} -#endif // OST_IMG_ENABLED } else{ - flags &= ~(GFX_NODE | GFX_OBJECT | ENTITY -#if OST_IMG_ENABLED - | MAP -#endif - ); + flags &= ~(GFX_NODE | GFX_OBJECT | ENTITY | MAP); flags &= ~(NOT_VISIBLE | NOT_HIDDEN); } EntityPartNode* entity_part_node = qobject_cast<EntityPartNode*>(model_->GetItem(indexes[i])); diff --git a/modules/gui/src/scene_win/context_menu.hh b/modules/gui/src/scene_win/context_menu.hh index 12c844b1889b371cff30e7b11d8051e0028931ed..5b87822fe186e6a767699d3b355384b05d8b3d10 100644 --- a/modules/gui/src/scene_win/context_menu.hh +++ b/modules/gui/src/scene_win/context_menu.hh @@ -45,13 +45,11 @@ enum ContextActionType NOT_SCENE=0x80, SINGLE=0x100, MULTI=0x200, - VIEWS_SAME_OBJECT=0x400 -#if OST_IMG_ENABLED - ,MAP=0x800, + VIEWS_SAME_OBJECT=0x400, + MAP=0x800, MAP_ORIGINAL=0x1000, MAP_DOWNSAMPLED=0x2000, MAP_DSAMPLED_AVAIL=0x4000 -#endif }; Q_DECLARE_FLAGS(ContextActionTypes, ContextActionType) diff --git a/modules/img/CMakeLists.txt b/modules/img/CMakeLists.txt index 224964ef17a5e69426157c2eec261ac69b4cb4dc..a84cc8def1cd444f7cf674118b3f253ffd56e350 100644 --- a/modules/img/CMakeLists.txt +++ b/modules/img/CMakeLists.txt @@ -1,7 +1,6 @@ -if (ENABLE_IMG) - add_subdirectory(base) - add_subdirectory(alg) - if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ex) - add_subdirectory(ex) - endif() +add_subdirectory(base) +add_subdirectory(alg) +if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ex) + add_subdirectory(ex) endif() + diff --git a/modules/io/pymod/CMakeLists.txt b/modules/io/pymod/CMakeLists.txt index d547f7d7a487a6b28a31478bb1d7ec1e95b68acb..ead77d54b9d4cc0285845a166a52287774d73f67 100644 --- a/modules/io/pymod/CMakeLists.txt +++ b/modules/io/pymod/CMakeLists.txt @@ -3,12 +3,9 @@ set(OST_IO_PYMOD_SOURCES export_pdb_io.cc export_mmcif_io.cc export_omf_io.cc + export_map_io.cc ) -if (ENABLE_IMG) - set(OST_IO_PYMOD_SOURCES ${OST_IO_PYMOD_SOURCES} export_map_io.cc) -endif() - set(OST_IO_PYMOD_MODULES __init__.py remote.py diff --git a/modules/io/pymod/wrap_io.cc b/modules/io/pymod/wrap_io.cc index c714fed34c83b94da070651d35e4d14d0b9ada02..ccf86b566efb31ca271eb81f4840cf483dd56ba7 100644 --- a/modules/io/pymod/wrap_io.cc +++ b/modules/io/pymod/wrap_io.cc @@ -70,9 +70,7 @@ ost::mol::alg::StereoChemicalProps (*read_props_b)(bool check) = &ReadStereoChem void export_pdb_io(); void export_mmcif_io(); void export_omf_io(); -#if OST_IMG_ENABLED void export_map_io(); -#endif BOOST_PYTHON_MODULE(_ost_io) { class_<IOManager, boost::noncopyable>("IOManager", no_init) @@ -136,9 +134,7 @@ BOOST_PYTHON_MODULE(_ost_io) export_pdb_io(); export_mmcif_io(); export_omf_io(); -#if OST_IMG_ENABLED export_map_io(); -#endif def("SaveCHARMMTraj", &SaveCHARMMTraj, (arg("traj"), arg("pdb_filename"), arg("dcd_filename"), arg("stride")=1, arg("profile")=IOProfile())); diff --git a/modules/io/src/CMakeLists.txt b/modules/io/src/CMakeLists.txt index 41ac18cc63766a9674afc7e61fd4acc7542ea99d..40edd5ce7d53c42594254fbc7679fbc3abce1dae 100644 --- a/modules/io/src/CMakeLists.txt +++ b/modules/io/src/CMakeLists.txt @@ -34,11 +34,9 @@ foreach(fname ${OST_IO_SEQ_SOURCES}) set(OST_IO_SOURCES ${OST_IO_SOURCES} seq/${fname}) endforeach(fname ${OST_IO_SEQ_SOURCES}) -if (ENABLE_IMG) - foreach(fname ${OST_IO_IMG_SOURCES}) - set(OST_IO_SOURCES ${OST_IO_SOURCES} img/${fname}) - endforeach(fname ${OST_IO_IMG_SOURCES}) -endif() +foreach(fname ${OST_IO_IMG_SOURCES}) + set(OST_IO_SOURCES ${OST_IO_SOURCES} img/${fname}) +endforeach(fname ${OST_IO_IMG_SOURCES}) #################################### # Add headers in subfolders (additionally) to OST_IO_HEADERS. @@ -58,17 +56,12 @@ foreach(fname ${OST_IO_SEQ_HEADERS}) set(OST_IO_HEADERS ${OST_IO_HEADERS} seq/${fname}) endforeach(fname ${OST_IO_SEQ_HEADERS}) -if (ENABLE_IMG) - foreach(fname ${OST_IO_IMG_HEADERS}) - set(OST_IO_HEADERS ${OST_IO_HEADERS} img/${fname}) - endforeach(fname ${OST_IO_IMG_HEADERS}) -endif() +foreach(fname ${OST_IO_IMG_HEADERS}) + set(OST_IO_HEADERS ${OST_IO_HEADERS} img/${fname}) +endforeach(fname ${OST_IO_IMG_HEADERS}) #################################### -set(OST_IO_DEPENDENCIES ost_base;ost_conop;ost_seq;ost_mol_alg) -if (ENABLE_IMG) - set(OST_IO_DEPENDENCIES ${OST_IO_DEPENDENCIES};ost_img;ost_img_alg) -endif() +set(OST_IO_DEPENDENCIES ost_base;ost_conop;ost_seq;ost_mol_alg;ost_img;ost_img_alg) module(NAME io SOURCES "${OST_IO_SOURCES}" HEADERS ${OST_IO_MOL_HEADERS} IN_DIR mol ${OST_IO_IMG_HEADERS} IN_DIR img @@ -76,6 +69,5 @@ module(NAME io SOURCES "${OST_IO_SOURCES}" ${OST_IO_HEADERS} DEPENDS_ON ${OST_IO_DEPENDENCIES}) target_link_libraries(ost_io ${BOOST_IOSTREAM_LIBRARIES}) -if (ENABLE_IMG) - target_link_libraries(ost_io ${TIFF_LIBRARIES} ${PNG_LIBRARIES}) -endif() \ No newline at end of file +target_link_libraries(ost_io ${TIFF_LIBRARIES} ${PNG_LIBRARIES}) + diff --git a/modules/io/src/io_manager.cc b/modules/io/src/io_manager.cc index 61f880d46d4a63e4061334cbf796db8eb99c48f1..2cc1ce85c7ae5223a3322a23ddbd331420a389e8 100644 --- a/modules/io/src/io_manager.cc +++ b/modules/io/src/io_manager.cc @@ -29,20 +29,19 @@ #include <ost/io/seq/pssm_io_handler.hh> #include <ost/io/mol/surface_io_msms_handler.hh> #include <ost/io/seq/clustal_io_handler.hh> -#if OST_IMG_ENABLED -# include <ost/io/img/map_io_dx_handler.hh> -# include <ost/io/img/map_io_spi_handler.hh> -# include <ost/io/img/map_io_mrc_handler.hh> -# include <ost/io/img/map_io_dm3_handler.hh> -# include <ost/io/img/map_io_situs_handler.hh> -# include <ost/io/img/map_io_tiff_handler.hh> -# include <ost/io/img/map_io_png_handler.hh> -# include <ost/io/img/map_io_dat_handler.hh> -# include <ost/io/img/map_io_jpk_handler.hh> -# include <ost/io/img/map_io_nanoscope_handler.hh> -# include <ost/io/img/map_io_df3_handler.hh> -# include <ost/io/img/map_io_ipl_handler.hh> -#endif +#include <ost/io/img/map_io_dx_handler.hh> +#include <ost/io/img/map_io_spi_handler.hh> +#include <ost/io/img/map_io_mrc_handler.hh> +#include <ost/io/img/map_io_dm3_handler.hh> +#include <ost/io/img/map_io_situs_handler.hh> +#include <ost/io/img/map_io_tiff_handler.hh> +#include <ost/io/img/map_io_png_handler.hh> +#include <ost/io/img/map_io_dat_handler.hh> +#include <ost/io/img/map_io_jpk_handler.hh> +#include <ost/io/img/map_io_nanoscope_handler.hh> +#include <ost/io/img/map_io_df3_handler.hh> +#include <ost/io/img/map_io_ipl_handler.hh> + namespace ost { namespace io { IOManager::IOManager() @@ -59,7 +58,6 @@ IOManager::IOManager() RegisterFactory(ProfileIOHandlerFactoryBasePtr(new HhmIOHandlerFactory)); RegisterFactory(ProfileIOHandlerFactoryBasePtr(new PssmIOHandlerFactory)); RegisterFactory(SurfaceIOHandlerFactoryBasePtr(new SurfaceIOMSMSHandlerFactory)); -#if OST_IMG_ENABLED RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIODxHandlerFactory)); RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIOSpiHandlerFactory)); RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIOSitusHandlerFactory)); @@ -72,7 +70,6 @@ IOManager::IOManager() RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIONanoscopeHandlerFactory)); RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIODF3HandlerFactory)); RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIOIPLHandlerFactory)); -#endif } IOManager& IOManager::Instance() @@ -165,7 +162,6 @@ SurfaceIOHandlerPtr IOManager::FindSurfaceImportHandler(const String& filename, throw IOUnknownFormatException("no suitable surface io handler found for "+filename); } -#if OST_IMG_ENABLED MapIOHandlerPtr IOManager::FindMapImportHandlerFile(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) { @@ -282,8 +278,6 @@ const MapIOFList& IOManager::GetAvailableMapHandler() const return map_io_list_; } -#endif //OST_IMG_ENABLED - void IOManager::RegisterFactory(const EntityIOHandlerFactoryBaseP& f) { entity_iohf_list_.push_back(f); diff --git a/modules/io/src/io_manager.hh b/modules/io/src/io_manager.hh index 4a6e9d26664fca61b7eae266b57becd809137bd7..d95d34b5a0804f2dff248b68fadd6bc2fc56011b 100644 --- a/modules/io/src/io_manager.hh +++ b/modules/io/src/io_manager.hh @@ -28,10 +28,7 @@ #include <ost/io/seq/sequence_io_handler.hh> #include <ost/io/seq/profile_io_handler.hh> #include <ost/io/mol/surface_io_handler.hh> - -#if OST_IMG_ENABLED -# include <ost/io/img/map_io_handler.hh> -#endif +#include <ost/io/img/map_io_handler.hh> #include <ost/io/io_exception.hh> @@ -41,10 +38,7 @@ typedef std::vector<EntityIOHandlerFactoryBaseP> EntityIOHFList; typedef std::vector<SequenceIOHandlerFactoryBasePtr> AlignmentIOFList; typedef std::vector<ProfileIOHandlerFactoryBasePtr> ProfileIOFList; typedef std::vector<SurfaceIOHandlerFactoryBasePtr> SurfaceIOFList; - -#if OST_IMG_ENABLED - typedef std::vector<MapIOHandlerFactoryBasePtr> MapIOFList; -#endif +typedef std::vector<MapIOHandlerFactoryBasePtr> MapIOFList; /// \brief Central registry for input/output handlers class DLLEXPORT_OST_IO IOManager { @@ -119,7 +113,6 @@ public: /// \brief Get a list with all available SurfaceHandler const SurfaceIOFList& GetAvailableSurfaceHandler() const; -#if OST_IMG_ENABLED /// \name Image/Map IO //@{ /// \brief register map io handle factory @@ -140,7 +133,6 @@ public: const MapIOFList& GetAvailableMapHandler() const; //@} -#endif // singleton interface static IOManager& Instance(); @@ -154,10 +146,7 @@ private: AlignmentIOFList alignment_io_list_; ProfileIOFList profile_io_list_; SurfaceIOFList surface_io_list_; - -#if OST_IMG_ENABLED MapIOFList map_io_list_; -#endif }; diff --git a/modules/io/tests/CMakeLists.txt b/modules/io/tests/CMakeLists.txt index 56c4fd7a22efed4efe380e7d33f7be2792867a12..0af1dfd5b2e4f11b4b77830a80793f0ecca13e27 100644 --- a/modules/io/tests/CMakeLists.txt +++ b/modules/io/tests/CMakeLists.txt @@ -14,11 +14,10 @@ set(OST_IO_UNIT_TESTS test_star_parser.cc test_mmcif_reader.cc test_mmcif_info.cc + test_io_img.cc + test_exceptions.cc ) -if (ENABLE_IMG) - list(APPEND OST_IO_UNIT_TESTS test_io_img.cc) - list(APPEND OST_IO_UNIT_TESTS test_exceptions.cc) -endif() + ost_unittest(MODULE io SOURCES "${OST_IO_UNIT_TESTS}" LINK ost_mol ost_seq) diff --git a/modules/mol/alg/pymod/CMakeLists.txt b/modules/mol/alg/pymod/CMakeLists.txt index f4d1fdb71b68519b303d5df13dea34a2d529c230..7aac1db8dbfef1354d59132e13f39f7de15b0a1a 100644 --- a/modules/mol/alg/pymod/CMakeLists.txt +++ b/modules/mol/alg/pymod/CMakeLists.txt @@ -10,6 +10,7 @@ set(OST_MOL_ALG_PYMOD_SOURCES export_non_standard.cc export_molck.cc export_membrane.cc + export_entity_to_density.cc ) set(OST_MOL_ALG_PYMOD_MODULES @@ -23,14 +24,6 @@ set(OST_MOL_ALG_PYMOD_MODULES hbond.py ) -if (ENABLE_IMG) - - set(OST_MOL_ALG_PYMOD_SOURCES - ${OST_MOL_ALG_PYMOD_SOURCES} - export_entity_to_density.cc - ) - -endif() if (NOT ENABLE_STATIC) pymod(NAME mol_alg OUTPUT_DIR ost/mol/alg CPP ${OST_MOL_ALG_PYMOD_SOURCES} PY ${OST_MOL_ALG_PYMOD_MODULES}) diff --git a/modules/mol/alg/pymod/export_entity_to_density.cc b/modules/mol/alg/pymod/export_entity_to_density.cc index 256c3e21999241c00c409259cfa9d230fa109994..7a4ce21cec1f94043bdd39fb8e33a77ededeb10c 100644 --- a/modules/mol/alg/pymod/export_entity_to_density.cc +++ b/modules/mol/alg/pymod/export_entity_to_density.cc @@ -23,8 +23,6 @@ #include <boost/python.hpp> #include <ost/config.hh> -#if OST_IMG_ENABLED - #include <ost/mol/alg/entity_to_density.hh> using namespace boost::python; @@ -46,4 +44,4 @@ void export_entity_to_density() .export_values() ; } -#endif + diff --git a/modules/mol/alg/pymod/export_structure_analysis.cc b/modules/mol/alg/pymod/export_structure_analysis.cc index a819658899a5e17a3a2ab5f83058bb456ce036d7..6b1998469f81f26851dacbbd4abc9e976bc912ac 100644 --- a/modules/mol/alg/pymod/export_structure_analysis.cc +++ b/modules/mol/alg/pymod/export_structure_analysis.cc @@ -30,10 +30,8 @@ std::vector< std::vector<Real> > (*pair_dist2)(const mol::EntityView&,const mol: void export_StructureAnalysis() { def("GetPosListFromView",&GetPosListFromView, (arg("view"))); -#if OST_IMG_ENABLED def("CalculateAverageAgreementWithDensityMap",&CalculateAverageAgreementWithDensityMap,(arg("pos_list"),arg("density_map"))); def("CalculateAgreementWithDensityMap",&CalculateAgreementWithDensityMap,(arg("pos_list"),arg("density_map"))); -#endif def("WrapEntityInPeriodicCell",&WrapEntityInPeriodicCell,(arg("Entity"),arg("cell_center"),arg("ucell_size"),arg("ucell_angles")=geom::Vec3(),arg("group_res")=true,arg("follow_bonds")=false)); diff --git a/modules/mol/alg/pymod/wrap_mol_alg.cc b/modules/mol/alg/pymod/wrap_mol_alg.cc index 265df5dfd552a3dbf26b895855c582f744d2980b..e1b80398615764e98b67b912ae0e75758b24c136 100644 --- a/modules/mol/alg/pymod/wrap_mol_alg.cc +++ b/modules/mol/alg/pymod/wrap_mol_alg.cc @@ -49,9 +49,7 @@ void export_accessibility(); void export_sec_struct(); void export_sec_struct_segments(); void export_find_membrane(); -#if OST_IMG_ENABLED void export_entity_to_density(); -#endif namespace { @@ -322,9 +320,7 @@ BOOST_PYTHON_MODULE(_ost_mol_alg) export_sec_struct(); export_sec_struct_segments(); export_find_membrane(); - #if OST_IMG_ENABLED export_entity_to_density(); - #endif def("LocalDistDiffTest", lddt_a, (arg("sequence_separation")=0,arg("local_lddt_property_string")="")); def("LocalDistDiffTest", lddt_c, (arg("local_lddt_property_string")="")); diff --git a/modules/mol/alg/src/CMakeLists.txt b/modules/mol/alg/src/CMakeLists.txt index 42c571d79444add71b47a8da9916a106a2e1caf1..c90616ba298908dcc12d798291ba0a1770306328 100644 --- a/modules/mol/alg/src/CMakeLists.txt +++ b/modules/mol/alg/src/CMakeLists.txt @@ -23,6 +23,7 @@ set(OST_MOL_ALG_HEADERS nonstandard.hh molck.hh find_membrane.hh + entity_to_density.hh ) set(OST_MOL_ALG_SOURCES @@ -49,23 +50,10 @@ set(OST_MOL_ALG_SOURCES nonstandard.cc molck.cc find_membrane.cc + entity_to_density.cc ) -set(MOL_ALG_DEPS ost_mol ost_seq) - -if (ENABLE_IMG) - set(OST_MOL_ALG_HEADERS - ${OST_MOL_ALG_HEADERS} - entity_to_density.hh - ) - - set(OST_MOL_ALG_SOURCES - ${OST_MOL_ALG_SOURCES} - entity_to_density.cc - ) - - set(MOL_ALG_DEPS ${MOL_ALG_DEPS} ost_img ost_img_alg ost_seq_alg ost_conop) -endif() +set(MOL_ALG_DEPS ost_mol ost_seq ost_img ost_img_alg ost_seq_alg ost_conop) executable(NAME lddt SOURCES lddt.cc DEPENDS_ON ost_mol ost_mol_alg ost_io STATIC) diff --git a/modules/mol/alg/src/structure_analysis.cc b/modules/mol/alg/src/structure_analysis.cc index e1b36a0b3ce2560c116bf58a3902d9815d013c53..ede1de8de5de6f6deccb73dc51c0611e314a44af 100644 --- a/modules/mol/alg/src/structure_analysis.cc +++ b/modules/mol/alg/src/structure_analysis.cc @@ -38,7 +38,7 @@ geom::Vec3List GetPosListFromView(const EntityView& view){ } return vl; } -#if OST_IMG_ENABLED + std::vector<Real> CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map){ CheckHandleValidity(density_map); std::vector<Real> v; @@ -86,9 +86,7 @@ std::vector< std::vector<Real> > PariwiseDistanceMatrix(const EntityView& view){ } return dist_mat; } - - -#endif + void DLLEXPORT_OST_MOL_ALG WrapEntityInPeriodicCell(EntityHandle eh, const geom::Vec3 cell_center, const geom::Vec3 ucell_size, \ const geom::Vec3 ucell_angles, bool group_residues,bool follow_bonds){ mol::XCSEditor edi=eh.EditXCS(mol::BUFFERED_EDIT); diff --git a/modules/mol/alg/src/structure_analysis.hh b/modules/mol/alg/src/structure_analysis.hh index 2de4d70fd06132ef3fb953197b0c524aaaa72d05..5ca2ac3d06773a6dcd73d614bff6033a62dc8db0 100644 --- a/modules/mol/alg/src/structure_analysis.hh +++ b/modules/mol/alg/src/structure_analysis.hh @@ -27,16 +27,12 @@ #include <ost/mol/entity_view.hh> #include <ost/mol/entity_handle.hh> -#if OST_IMG_ENABLED -# include <ost/img/map.hh> -#endif +#include <ost/img/map.hh> namespace ost { namespace mol { namespace alg { geom::Vec3List DLLEXPORT_OST_MOL_ALG GetPosListFromView(const EntityView& view); -#if OST_IMG_ENABLED std::vector<Real> DLLEXPORT_OST_MOL_ALG CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map); Real DLLEXPORT_OST_MOL_ALG CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map); -#endif void DLLEXPORT_OST_MOL_ALG WrapEntityInPeriodicCell(EntityHandle eh, const geom::Vec3 cell_center, const geom::Vec3 ucell_size, const geom::Vec3 ucell_angles=geom::Vec3(), bool group_res=true, bool follow_bond=true); std::vector< std::vector<Real> > DLLEXPORT_OST_MOL_ALG PariwiseDistanceMatrix(const EntityView& view1, const EntityView& view2); std::vector< std::vector<Real> > DLLEXPORT_OST_MOL_ALG PariwiseDistanceMatrix(const EntityView& view); diff --git a/modules/mol/mm/src/CMakeLists.txt b/modules/mol/mm/src/CMakeLists.txt index 46f4d4cd576f47533c6661397f7428ae414a4820..21da031198800411cc09856a2978bb243c97cccd 100644 --- a/modules/mol/mm/src/CMakeLists.txt +++ b/modules/mol/mm/src/CMakeLists.txt @@ -41,7 +41,7 @@ set(SETTINGS_HH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/settings.hh") configure_file(settings.hh.in ${SETTINGS_HH_FILE}) -set(MOL_MM_DEPS ost_mol ost_io ost_img) +set(MOL_MM_DEPS ost_mol ost_io) module(NAME mol_mm SOURCES ${OST_MOL_MM_SOURCES} diff --git a/modules/mol/mm/src/topology.hh b/modules/mol/mm/src/topology.hh index e7c8e70ecee8e3195b06241121cdb803feacaa18..da6452a1f2aba59a28bc3b7139215211c39ee580 100644 --- a/modules/mol/mm/src/topology.hh +++ b/modules/mol/mm/src/topology.hh @@ -38,7 +38,6 @@ #include <ost/mol/xcs_editor.hh> #include <ost/mol/bond_handle.hh> #include <ost/mol/residue_prop.hh> -#include <ost/img/image_handle.hh> #include <time.h>