From 1f3788ffbbc6bb2edae56051ee6811f35d284561 Mon Sep 17 00:00:00 2001 From: valerio <valerio@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Sun, 28 Feb 2010 17:20:28 +0000 Subject: [PATCH] Module name change iplt -> img git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@1743 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- CMakeLists.txt | 12 +- examples/{iplt => img}/circle.png | Bin examples/{iplt => img}/create_split_image.py | 6 +- examples/{iplt => img}/fft_li.py | 4 +- examples/img/modulate_image.py | 23 ++ examples/{iplt => img}/spoke_pattern.py | 8 +- examples/{iplt => img}/square.png | Bin examples/{iplt => img}/tone1.png | Bin examples/{iplt => img}/tone2.png | Bin examples/{iplt => img}/tone3.png | Bin examples/{iplt => img}/tone4.png | Bin examples/{iplt => img}/tone5.png | Bin examples/{iplt => img}/view_phase_diff.py | 14 +- examples/iplt/modulate_image.py | 23 -- examples/map/gfx_mapiso.py | 6 +- examples/map/gfx_mapslab.py | 8 +- modules/base/pymod/__init__.py | 2 +- modules/config/CMakeLists.txt | 6 +- modules/config/config.hh.in | 2 +- modules/gfx/pymod/CMakeLists.txt | 2 +- modules/gfx/pymod/color_by_def.hh | 12 +- modules/gfx/pymod/export_color_ops.cc | 12 +- modules/gfx/pymod/export_entity.cc | 8 +- modules/gfx/pymod/export_map.cc | 4 +- modules/gfx/pymod/wrap_gfx.cc | 4 +- modules/gfx/src/CMakeLists.txt | 8 +- .../gfx/src/color_ops/map_handle_color_op.cc | 10 +- .../gfx/src/color_ops/map_handle_color_op.hh | 12 +- modules/gfx/src/entity.cc | 8 +- modules/gfx/src/entity.hh | 10 +- modules/gfx/src/gfx_object.cc | 22 +- modules/gfx/src/gfx_object.hh | 14 +- modules/gfx/src/impl/connect_renderer_base.cc | 4 +- modules/gfx/src/impl/connect_renderer_base.hh | 2 +- modules/gfx/src/impl/entity_renderer.hh | 6 +- modules/gfx/src/impl/map_iso_gen.cc | 106 ++++----- modules/gfx/src/impl/map_iso_gen.hh | 4 +- modules/gfx/src/impl/map_iso_gen_o.cc | 2 +- modules/gfx/src/impl/map_iso_gen_o.hh | 4 +- modules/gfx/src/impl/map_iso_gen_s.cc | 14 +- modules/gfx/src/impl/map_iso_gen_s.hh | 4 +- modules/gfx/src/impl/map_octree.cc | 30 +-- modules/gfx/src/impl/map_octree.hh | 28 +-- modules/gfx/src/impl/mapped_property.cc | 26 +-- modules/gfx/src/impl/mapped_property.hh | 10 +- modules/gfx/src/impl/octree_isocont.cc | 50 ++--- modules/gfx/src/impl/octree_isocont.hh | 22 +- modules/gfx/src/impl/trace_renderer_base.cc | 4 +- modules/gfx/src/impl/trace_renderer_base.hh | 2 +- modules/gfx/src/map_iso.cc | 20 +- modules/gfx/src/map_iso.hh | 10 +- modules/gfx/src/map_slab.cc | 26 +-- modules/gfx/src/map_slab.hh | 10 +- modules/gfx/src/surface.cc | 12 +- modules/gfx/src/surface.hh | 12 +- modules/gfx/tests/test_map_octree.cc | 100 ++++----- modules/gui/pymod/CMakeLists.txt | 2 +- modules/gui/pymod/data_viewer_proxy.cc | 4 +- modules/gui/pymod/data_viewer_proxy.hh | 8 +- modules/gui/pymod/export_data_viewer.cc | 4 +- modules/gui/pymod/export_gosty.cc | 12 +- modules/gui/pymod/wrap_gui.cc | 4 +- modules/gui/src/CMakeLists.txt | 8 +- modules/gui/src/data_viewer/argand.cc | 2 +- modules/gui/src/data_viewer/argand.hh | 8 +- modules/gui/src/data_viewer/data_viewer.cc | 8 +- modules/gui/src/data_viewer/data_viewer.hh | 8 +- .../gui/src/data_viewer/data_viewer_panel.cc | 2 +- .../gui/src/data_viewer/data_viewer_panel.hh | 2 +- .../src/data_viewer/data_viewer_panel_base.cc | 10 +- .../src/data_viewer/data_viewer_panel_base.hh | 10 +- modules/gui/src/data_viewer/draw_overlay.cc | 2 +- modules/gui/src/data_viewer/draw_overlay.hh | 4 +- .../gui/src/data_viewer/drawing_functions.cc | 2 +- .../gui/src/data_viewer/drawing_functions.hh | 2 +- modules/gui/src/data_viewer/fft_panel.cc | 4 +- modules/gui/src/data_viewer/fft_panel.hh | 2 +- .../src/data_viewer/{iplt2qt.cc => img2qt.cc} | 14 +- .../src/data_viewer/{iplt2qt.hh => img2qt.hh} | 10 +- modules/gui/src/data_viewer/info_panel.cc | 4 +- modules/gui/src/data_viewer/info_panel.hh | 8 +- modules/gui/src/data_viewer/mask_overlay.cc | 4 +- modules/gui/src/data_viewer/mask_overlay.hh | 6 +- modules/gui/src/data_viewer/null_overlay.cc | 2 +- modules/gui/src/data_viewer/null_overlay.hh | 2 +- modules/gui/src/data_viewer/overlay_base.cc | 2 +- modules/gui/src/data_viewer/overlay_base.hh | 2 +- .../gui/src/data_viewer/overlay_base_fw.hh | 2 +- .../gui/src/data_viewer/overlay_manager.cc | 2 +- .../gui/src/data_viewer/overlay_manager.hh | 2 +- .../gui/src/data_viewer/overlay_manager_fw.hh | 2 +- .../src/data_viewer/overlay_manager_gui.cc | 2 +- .../src/data_viewer/overlay_manager_gui.hh | 2 +- .../data_viewer/overlay_manager_observer.hh | 2 +- .../gui/src/data_viewer/pointlist_overlay.cc | 2 +- .../gui/src/data_viewer/pointlist_overlay.hh | 4 +- .../src/data_viewer/pointlist_overlay_base.cc | 2 +- .../src/data_viewer/pointlist_overlay_base.hh | 6 +- modules/gui/src/data_viewer/strategies.cc | 2 +- modules/gui/src/data_viewer/strategies.hh | 2 +- modules/gui/src/data_viewer/strategies_fw.hh | 2 +- .../gui/src/data_viewer/viewer_normalizer.cc | 4 +- .../gui/src/data_viewer/viewer_normalizer.hh | 4 +- modules/gui/src/file_browser.cc | 6 +- modules/gui/src/file_loader.cc | 18 +- modules/gui/src/file_loader.hh | 4 +- modules/gui/src/gl_win.cc | 4 +- modules/gui/src/gosty_app.cc | 6 +- modules/gui/src/gosty_app.hh | 6 +- modules/{iplt => img}/CMakeLists.txt | 2 +- modules/{iplt => img}/alg/CMakeLists.txt | 0 .../{iplt => img}/alg/pymod/CMakeLists.txt | 4 +- modules/{iplt => img}/alg/pymod/__init__.py | 2 +- .../{iplt => img}/alg/pymod/export_filter.cc | 6 +- .../alg/pymod/export_normalizer.cc | 6 +- .../{iplt => img}/alg/pymod/export_polar.cc | 10 +- .../alg/pymod/export_transcendentals.cc | 6 +- modules/{iplt => img}/alg/pymod/wrap_alg.cc | 70 +++--- modules/{iplt => img}/alg/pymod/wrap_tf.cc | 12 +- modules/{iplt => img}/alg/src/CMakeLists.txt | 12 +- modules/{iplt => img}/alg/src/alg_mirror.cc | 2 +- modules/{iplt => img}/alg/src/alg_mirror.hh | 10 +- modules/{iplt => img}/alg/src/alg_shift.cc | 2 +- modules/{iplt => img}/alg/src/alg_shift.hh | 10 +- .../{iplt => img}/alg/src/alg_transform.cc | 2 +- .../{iplt => img}/alg/src/alg_transform.hh | 10 +- modules/{iplt => img}/alg/src/anisotropic.cc | 2 +- modules/{iplt => img}/alg/src/anisotropic.hh | 4 +- .../{iplt => img}/alg/src/auto_correlate.cc | 2 +- .../{iplt => img}/alg/src/auto_correlate.hh | 10 +- modules/{iplt => img}/alg/src/clear.hh | 8 +- modules/{iplt => img}/alg/src/clip_min_max.hh | 2 +- modules/{iplt => img}/alg/src/conjugate.hh | 10 +- modules/{iplt => img}/alg/src/convolute.cc | 4 +- modules/{iplt => img}/alg/src/convolute.hh | 10 +- modules/{iplt => img}/alg/src/correlate.cc | 4 +- modules/{iplt => img}/alg/src/correlate.hh | 10 +- .../{iplt => img}/alg/src/cross_correlate.cc | 2 +- .../{iplt => img}/alg/src/cross_correlate.hh | 8 +- .../alg/src/custom_transformer.cc | 2 +- .../alg/src/custom_transformer.hh | 6 +- .../{iplt => img}/alg/src/density_slice.cc | 2 +- .../{iplt => img}/alg/src/density_slice.hh | 12 +- modules/{iplt => img}/alg/src/dft.cc | 2 +- modules/{iplt => img}/alg/src/dft.hh | 10 +- .../{iplt => img}/alg/src/discrete_shrink.cc | 2 +- .../{iplt => img}/alg/src/discrete_shrink.hh | 12 +- modules/{iplt => img}/alg/src/fft.cc | 10 +- modules/{iplt => img}/alg/src/fft.hh | 14 +- modules/{iplt => img}/alg/src/fftw_helper.hh | 0 modules/{iplt => img}/alg/src/fill.hh | 8 +- modules/{iplt => img}/alg/src/filter.hh | 0 .../{iplt => img}/alg/src/fourier_filters.cc | 20 +- .../{iplt => img}/alg/src/fourier_filters.hh | 24 +- .../{iplt => img}/alg/src/fractional_shift.cc | 4 +- .../{iplt => img}/alg/src/fractional_shift.hh | 6 +- modules/{iplt => img}/alg/src/gaussian.cc | 2 +- modules/{iplt => img}/alg/src/gaussian.hh | 12 +- .../alg/src/gaussian_gradient_magnitude.cc | 2 +- .../alg/src/gaussian_gradient_magnitude.hh | 12 +- .../alg/src/gaussian_laplacian.cc | 2 +- .../alg/src/gaussian_laplacian.hh | 12 +- .../alg/src/highest_peak_search_3d.cc | 18 +- .../alg/src/highest_peak_search_3d.hh | 16 +- modules/{iplt => img}/alg/src/histogram.cc | 2 +- modules/{iplt => img}/alg/src/histogram.hh | 14 +- .../alg/src/levenberg_marquardt.h | 4 +- modules/{iplt => img}/alg/src/line_average.cc | 4 +- modules/{iplt => img}/alg/src/line_average.hh | 16 +- .../{iplt => img}/alg/src/line_iterator.cc | 4 +- .../{iplt => img}/alg/src/line_iterator.hh | 10 +- .../alg/src/local_sigma_threshold.cc | 4 +- .../alg/src/local_sigma_threshold.hh | 12 +- modules/{iplt => img}/alg/src/mask_image.cc | 4 +- modules/{iplt => img}/alg/src/mask_image.hh | 12 +- .../{iplt => img}/alg/src/module_config.hh | 16 +- modules/{iplt => img}/alg/src/negate.hh | 6 +- modules/{iplt => img}/alg/src/norm.hh | 0 modules/{iplt => img}/alg/src/norm_linear.cc | 2 +- modules/{iplt => img}/alg/src/norm_linear.hh | 10 +- modules/{iplt => img}/alg/src/norm_log.cc | 2 +- modules/{iplt => img}/alg/src/norm_log.hh | 10 +- modules/{iplt => img}/alg/src/norm_od.cc | 2 +- modules/{iplt => img}/alg/src/norm_od.hh | 8 +- modules/{iplt => img}/alg/src/normalizer.cc | 2 +- modules/{iplt => img}/alg/src/normalizer.hh | 10 +- .../alg/src/normalizer_factory.cc | 4 +- .../alg/src/normalizer_factory.hh | 20 +- modules/{iplt => img}/alg/src/numeric.h | 2 +- modules/{iplt => img}/alg/src/polar.cc | 8 +- modules/{iplt => img}/alg/src/polar.hh | 4 +- .../{iplt => img}/alg/src/power_spectrum.cc | 2 +- .../{iplt => img}/alg/src/power_spectrum.hh | 8 +- modules/{iplt => img}/alg/src/randomize.cc | 2 +- modules/{iplt => img}/alg/src/randomize.hh | 12 +- modules/{iplt => img}/alg/src/rscrosscorr.cc | 16 +- modules/{iplt => img}/alg/src/rscrosscorr.hh | 8 +- .../alg/src/smooth_mask_image.cc | 8 +- .../alg/src/smooth_mask_image.hh | 12 +- modules/{iplt => img}/alg/src/stat.cc | 4 +- modules/{iplt => img}/alg/src/stat.hh | 14 +- modules/{iplt => img}/alg/src/stat_min_max.cc | 4 +- modules/{iplt => img}/alg/src/stat_min_max.hh | 14 +- modules/{iplt => img}/alg/src/threshold.cc | 2 +- modules/{iplt => img}/alg/src/threshold.hh | 8 +- .../{iplt => img}/alg/src/transcendentals.hh | 10 +- modules/{iplt => img}/alg/src/transform.hh | 0 modules/{iplt => img}/alg/src/transform_fw.hh | 0 .../alg/src/transformation_base.cc | 2 +- .../alg/src/transformation_base.hh | 16 +- .../{iplt => img}/alg/src/transformations.cc | 2 +- .../{iplt => img}/alg/src/transformations.hh | 12 +- .../{iplt => img}/alg/tests/CMakeLists.txt | 2 +- .../alg/tests/test_circular_mask.cc | 10 +- modules/{iplt => img}/alg/tests/test_clear.cc | 10 +- modules/{iplt => img}/alg/tests/test_conj.cc | 8 +- .../{iplt => img}/alg/tests/test_convolute.cc | 14 +- .../alg/tests/test_discrete_shrink.cc | 10 +- modules/{iplt => img}/alg/tests/test_fft.cc | 10 +- modules/{iplt => img}/alg/tests/test_fill.cc | 10 +- .../{iplt => img}/alg/tests/test_filter.cc | 18 +- .../{iplt => img}/alg/tests/test_histogram.cc | 8 +- .../{iplt => img}/alg/tests/test_mirror.cc | 10 +- .../{iplt => img}/alg/tests/test_negate.cc | 10 +- .../alg/tests/test_power_spectrum.cc | 10 +- modules/{iplt => img}/alg/tests/test_shift.cc | 10 +- modules/{iplt => img}/alg/tests/test_stat.cc | 8 +- .../{iplt => img}/alg/tests/test_transform.cc | 10 +- modules/{iplt => img}/alg/tests/test_utils.hh | 8 +- modules/{iplt => img}/alg/tests/tests.cc | 4 +- modules/{iplt => img}/alg/tests/tests.hh | 0 modules/{iplt => img}/base/CMakeLists.txt | 0 .../{iplt => img}/base/pymod/CMakeLists.txt | 8 +- modules/{iplt => img}/base/pymod/__init__.py | 2 +- .../{iplt => img}/base/pymod/export_data.cc | 8 +- .../base/pymod/export_data_algorithm.cc | 6 +- .../{iplt => img}/base/pymod/export_extent.cc | 2 +- .../base/pymod/export_function.cc | 6 +- .../base/pymod/export_image_handle.cc | 8 +- .../base/pymod/export_image_list.cc | 10 +- .../{iplt => img}/base/pymod/export_map.cc | 6 +- .../{iplt => img}/base/pymod/export_mask.cc | 6 +- .../{iplt => img}/base/pymod/export_peak.cc | 4 +- .../{iplt => img}/base/pymod/export_phase.cc | 4 +- .../{iplt => img}/base/pymod/export_point.cc | 10 +- .../base/pymod/export_progress.cc | 14 +- .../base/pymod/export_raster_image.cc | 4 +- .../{iplt => img}/base/pymod/export_size.cc | 8 +- .../base/pymod/wrap_extent_iterator.hh | 10 +- .../base/pymod/wrap_img.cc} | 8 +- modules/{iplt => img}/base/src/CMakeLists.txt | 24 +- modules/{iplt => img}/base/src/algorithm.hh | 2 +- modules/{iplt => img}/base/src/base.hh | 2 +- modules/{iplt => img}/base/src/circle_mask.cc | 2 +- modules/{iplt => img}/base/src/circle_mask.hh | 4 +- .../{iplt => img}/base/src/composite_mask.cc | 2 +- .../{iplt => img}/base/src/composite_mask.hh | 4 +- modules/{iplt => img}/base/src/data.cc | 2 +- modules/{iplt => img}/base/src/data.hh | 10 +- .../{iplt => img}/base/src/data_algorithm.cc | 2 +- .../{iplt => img}/base/src/data_algorithm.hh | 16 +- .../{iplt => img}/base/src/data_observer.cc | 2 +- .../{iplt => img}/base/src/data_observer.hh | 8 +- modules/{iplt => img}/base/src/data_types.hh | 4 +- modules/{iplt => img}/base/src/debug.hh | 0 modules/{iplt => img}/base/src/dllexport.hh | 0 modules/{iplt => img}/base/src/extent.cc | 4 +- modules/{iplt => img}/base/src/extent.hh | 14 +- .../{iplt => img}/base/src/extent_iterator.cc | 2 +- .../{iplt => img}/base/src/extent_iterator.hh | 6 +- modules/{iplt => img}/base/src/extent_mask.cc | 2 +- modules/{iplt => img}/base/src/extent_mask.hh | 4 +- modules/{iplt => img}/base/src/function.hh | 4 +- .../{iplt => img}/base/src/function_base.cc | 2 +- .../{iplt => img}/base/src/function_base.hh | 4 +- modules/{iplt => img}/base/src/function_fw.hh | 4 +- .../{iplt => img}/base/src/function_impl.cc | 2 +- .../{iplt => img}/base/src/function_impl.hh | 4 +- modules/{iplt => img}/base/src/image.hh | 2 +- .../{iplt => img}/base/src/image_factory.cc | 2 +- .../{iplt => img}/base/src/image_factory.hh | 16 +- modules/{iplt => img}/base/src/image_fw.hh | 4 +- .../{iplt => img}/base/src/image_handle.cc | 4 +- .../{iplt => img}/base/src/image_handle.hh | 78 +++---- .../{iplt => img}/base/src/image_handle_fw.hh | 2 +- modules/{iplt => img}/base/src/image_impl.cc | 2 +- modules/{iplt => img}/base/src/image_impl.hh | 4 +- modules/{iplt => img}/base/src/image_list.cc | 2 +- modules/{iplt => img}/base/src/image_list.hh | 16 +- modules/{iplt => img}/base/src/image_state.hh | 4 +- .../base/src/image_state/CMakeLists.txt | 4 +- .../base/src/image_state/binop.cc | 4 +- .../base/src/image_state/binop.hh | 2 +- .../base/src/image_state/dispatch.hh | 2 +- .../base/src/image_state/dispatch_fw.hh | 2 +- .../base/src/image_state/image_state.hh | 0 .../src/image_state/image_state_algorithm.cc | 4 +- .../src/image_state/image_state_algorithm.hh | 24 +- .../base/src/image_state/image_state_base.cc | 2 +- .../base/src/image_state/image_state_base.hh | 6 +- .../src/image_state/image_state_base_fw.hh | 2 +- .../base/src/image_state/image_state_def.hh | 4 +- .../src/image_state/image_state_factory.cc | 4 +- .../src/image_state/image_state_factory.hh | 8 +- .../base/src/image_state/image_state_fft.cc | 4 +- .../base/src/image_state/image_state_fft.hh | 2 +- .../image_state_frequency_domain.hh | 12 +- .../base/src/image_state/image_state_fw.hh | 2 +- .../image_state_half_frequency_domain.hh | 12 +- .../base/src/image_state/image_state_impl.cc | 2 +- .../base/src/image_state/image_state_impl.hh | 6 +- .../base/src/image_state/image_state_inst.hh | 2 +- .../image_state/image_state_spatial_domain.hh | 14 +- .../src/image_state/image_state_visitor.hh | 58 ++--- .../src/image_state/image_state_visitor_fw.hh | 2 +- .../base/src/image_state/index.cc | 2 +- .../base/src/image_state/index.hh | 14 +- .../base/src/image_state/test_inst.cc | 2 +- .../base/src/image_state/type_fw.hh | 4 +- .../base/src/image_state/value_holder.cc | 4 +- .../base/src/image_state/value_holder.hh | 8 +- .../{iplt => img}/base/src/image_state_fw.hh | 4 +- .../{iplt => img}/base/src/inverted_mask.cc | 2 +- .../{iplt => img}/base/src/inverted_mask.hh | 4 +- modules/{iplt => img}/base/src/map.cc | 10 +- modules/{iplt => img}/base/src/map.hh | 12 +- modules/{iplt => img}/base/src/mask.cc | 2 +- modules/{iplt => img}/base/src/mask.hh | 10 +- modules/{iplt => img}/base/src/mask_base.cc | 2 +- modules/{iplt => img}/base/src/mask_base.hh | 6 +- .../{iplt => img}/base/src/mask_base_fw.hh | 2 +- modules/{iplt => img}/base/src/mask_op.cc | 2 +- modules/{iplt => img}/base/src/mask_op.hh | 12 +- .../{iplt => img}/base/src/mask_visitor.hh | 4 +- .../{iplt => img}/base/src/module_config.hh | 16 +- .../{iplt => img}/base/src/normalizer_fw.hh | 2 +- .../{iplt => img}/base/src/normalizer_impl.hh | 12 +- modules/{iplt => img}/base/src/null_data.hh | 4 +- .../{iplt => img}/base/src/null_function.hh | 4 +- modules/{iplt => img}/base/src/observable.hh | 4 +- modules/{iplt => img}/base/src/paste_impl.cc | 2 +- modules/{iplt => img}/base/src/paste_impl.hh | 4 +- modules/{iplt => img}/base/src/peak.cc | 2 +- modules/{iplt => img}/base/src/peak.hh | 8 +- modules/{iplt => img}/base/src/phase.cc | 2 +- modules/{iplt => img}/base/src/phase.hh | 10 +- .../{iplt => img}/base/src/physical_units.cc | 2 +- .../{iplt => img}/base/src/physical_units.hh | 2 +- .../{iplt => img}/base/src/pixel_sampling.cc | 2 +- .../{iplt => img}/base/src/pixel_sampling.hh | 10 +- modules/{iplt => img}/base/src/point.cc | 4 +- modules/{iplt => img}/base/src/point.hh | 14 +- modules/{iplt => img}/base/src/point_list.cc | 4 +- modules/{iplt => img}/base/src/point_list.hh | 6 +- .../{iplt => img}/base/src/polygon_mask.cc | 2 +- .../{iplt => img}/base/src/polygon_mask.hh | 6 +- modules/{iplt => img}/base/src/progress.cc | 2 +- modules/{iplt => img}/base/src/progress.hh | 6 +- .../img/base/src/raster_image/CMakeLists.txt | 9 + .../base/src/raster_image/raster_image.cc | 12 +- .../base/src/raster_image/raster_image.hh | 12 +- modules/{iplt => img}/base/src/size.cc | 4 +- modules/{iplt => img}/base/src/size.hh | 14 +- .../{iplt => img}/base/src/spherical_mask.cc | 2 +- .../{iplt => img}/base/src/spherical_mask.hh | 6 +- modules/{iplt => img}/base/src/util.cc | 2 +- modules/{iplt => img}/base/src/util.hh | 6 +- modules/{iplt => img}/base/src/value_util.hh | 14 +- modules/{iplt => img}/base/src/vecmat.hh | 8 +- modules/{iplt => img}/base/src/version.cc | 2 +- modules/{iplt => img}/base/src/version.hh | 8 +- .../{iplt => img}/base/tests/CMakeLists.txt | 6 +- .../{iplt => img}/base/tests/simple_test.cc | 4 +- .../tests/single_test_image_handle_mem.cc | 12 +- modules/{iplt => img}/base/tests/test_data.cc | 10 +- modules/{iplt => img}/base/tests/test_data.hh | 0 .../{iplt => img}/base/tests/test_domains.cc | 10 +- .../{iplt => img}/base/tests/test_extent.cc | 6 +- .../{iplt => img}/base/tests/test_extent.hh | 0 .../{iplt => img}/base/tests/test_function.cc | 6 +- .../{iplt => img}/base/tests/test_function.hh | 0 .../{iplt => img}/base/tests/test_image.cc | 12 +- .../{iplt => img}/base/tests/test_image.hh | 0 .../base/tests/test_image_factory.cc | 8 +- .../base/tests/test_image_factory.hh | 0 .../base/tests/test_image_impl.cc | 6 +- .../base/tests/test_image_impl.hh | 0 .../base/tests/test_image_state.cc | 18 +- .../base/tests/test_image_state.hh | 0 .../base/tests/test_image_state_visitor.cc | 6 +- .../base/tests/test_image_state_visitor.hh | 0 .../{iplt => img}/base/tests/test_index.cc | 6 +- .../{iplt => img}/base/tests/test_index.hh | 0 .../{iplt => img}/base/tests/test_point.cc | 4 +- .../{iplt => img}/base/tests/test_point.hh | 0 .../{iplt => img}/base/tests/test_sampling.cc | 8 +- .../{iplt => img}/base/tests/test_sampling.hh | 0 modules/{iplt => img}/base/tests/test_size.cc | 4 +- modules/{iplt => img}/base/tests/test_size.hh | 0 .../base/tests/test_transform.hh | 0 .../{iplt => img}/base/tests/test_utils.hh | 6 +- .../base/tests/test_value_holder.cc | 10 +- .../base/tests/test_value_holder.hh | 0 modules/{iplt => img}/base/tests/tests.cc | 4 +- modules/io/pymod/CMakeLists.txt | 2 +- modules/io/pymod/__init__.py | 4 +- modules/io/pymod/export_map_io.cc | 32 +-- modules/io/pymod/wrap_io.cc | 4 +- modules/io/src/CMakeLists.txt | 24 +- modules/io/src/{iplt => img}/CMakeLists.txt | 4 +- .../io/src/{iplt => img}/convert_vax_data.c | 0 .../io/src/{iplt => img}/convert_vax_data.h | 0 modules/io/src/{iplt => img}/image_format.cc | 2 +- modules/io/src/{iplt => img}/image_format.hh | 2 +- .../{iplt => img}/image_format_conversion.cc | 0 .../io/src/{iplt => img}/image_io_plugin.hh | 10 +- modules/io/src/{iplt => img}/jpk_util.hh | 0 modules/io/src/{iplt => img}/load_map.cc | 22 +- modules/io/src/{iplt => img}/load_map.hh | 22 +- .../src/{iplt => img}/map_io_dat_handler.cc | 50 ++--- .../src/{iplt => img}/map_io_dat_handler.hh | 8 +- .../src/{iplt => img}/map_io_dm3_handler.cc | 42 ++-- .../src/{iplt => img}/map_io_dm3_handler.hh | 8 +- .../io/src/{iplt => img}/map_io_dx_handler.cc | 26 +-- .../io/src/{iplt => img}/map_io_dx_handler.hh | 8 +- .../io/src/{iplt => img}/map_io_handler.hh | 14 +- .../src/{iplt => img}/map_io_jpk_handler.cc | 28 +-- .../src/{iplt => img}/map_io_jpk_handler.hh | 8 +- .../src/{iplt => img}/map_io_mrc_handler.cc | 90 ++++---- .../src/{iplt => img}/map_io_mrc_handler.hh | 8 +- .../{iplt => img}/map_io_nanoscope_handler.cc | 20 +- .../{iplt => img}/map_io_nanoscope_handler.hh | 8 +- .../src/{iplt => img}/map_io_png_handler.cc | 56 ++--- .../src/{iplt => img}/map_io_png_handler.hh | 8 +- .../src/{iplt => img}/map_io_situs_handler.cc | 44 ++-- .../src/{iplt => img}/map_io_situs_handler.hh | 8 +- .../src/{iplt => img}/map_io_spi_handler.cc | 48 ++-- .../src/{iplt => img}/map_io_spi_handler.hh | 10 +- .../src/{iplt => img}/map_io_tiff_handler.cc | 212 +++++++++--------- .../src/{iplt => img}/map_io_tiff_handler.hh | 14 +- modules/io/src/{iplt => img}/tiff_util.cc | 0 modules/io/src/{iplt => img}/tiff_util.hh | 16 +- modules/io/src/io_manager.cc | 28 +-- modules/io/src/io_manager.hh | 10 +- .../iplt/base/src/raster_image/CMakeLists.txt | 9 - scripts/dng_cl.in | 2 +- scripts/gipltng.in | 2 +- scripts/init.py | 2 +- scripts/init_cl.py | 2 +- scripts/init_iplt.py | 6 +- 450 files changed, 1975 insertions(+), 1975 deletions(-) rename examples/{iplt => img}/circle.png (100%) rename examples/{iplt => img}/create_split_image.py (92%) rename examples/{iplt => img}/fft_li.py (79%) create mode 100644 examples/img/modulate_image.py rename examples/{iplt => img}/spoke_pattern.py (88%) rename examples/{iplt => img}/square.png (100%) rename examples/{iplt => img}/tone1.png (100%) rename examples/{iplt => img}/tone2.png (100%) rename examples/{iplt => img}/tone3.png (100%) rename examples/{iplt => img}/tone4.png (100%) rename examples/{iplt => img}/tone5.png (100%) rename examples/{iplt => img}/view_phase_diff.py (61%) delete mode 100644 examples/iplt/modulate_image.py rename modules/gui/src/data_viewer/{iplt2qt.cc => img2qt.cc} (92%) rename modules/gui/src/data_viewer/{iplt2qt.hh => img2qt.hh} (88%) rename modules/{iplt => img}/CMakeLists.txt (89%) rename modules/{iplt => img}/alg/CMakeLists.txt (100%) rename modules/{iplt => img}/alg/pymod/CMakeLists.txt (51%) rename modules/{iplt => img}/alg/pymod/__init__.py (97%) rename modules/{iplt => img}/alg/pymod/export_filter.cc (98%) rename modules/{iplt => img}/alg/pymod/export_normalizer.cc (96%) rename modules/{iplt => img}/alg/pymod/export_polar.cc (79%) rename modules/{iplt => img}/alg/pymod/export_transcendentals.cc (94%) rename modules/{iplt => img}/alg/pymod/wrap_alg.cc (84%) rename modules/{iplt => img}/alg/pymod/wrap_tf.cc (95%) rename modules/{iplt => img}/alg/src/CMakeLists.txt (87%) rename modules/{iplt => img}/alg/src/alg_mirror.cc (97%) rename modules/{iplt => img}/alg/src/alg_mirror.hh (90%) rename modules/{iplt => img}/alg/src/alg_shift.cc (97%) rename modules/{iplt => img}/alg/src/alg_shift.hh (92%) rename modules/{iplt => img}/alg/src/alg_transform.cc (97%) rename modules/{iplt => img}/alg/src/alg_transform.hh (92%) rename modules/{iplt => img}/alg/src/anisotropic.cc (99%) rename modules/{iplt => img}/alg/src/anisotropic.hh (94%) rename modules/{iplt => img}/alg/src/auto_correlate.cc (97%) rename modules/{iplt => img}/alg/src/auto_correlate.hh (85%) rename modules/{iplt => img}/alg/src/clear.hh (91%) rename modules/{iplt => img}/alg/src/clip_min_max.hh (98%) rename modules/{iplt => img}/alg/src/conjugate.hh (90%) rename modules/{iplt => img}/alg/src/convolute.cc (97%) rename modules/{iplt => img}/alg/src/convolute.hh (86%) rename modules/{iplt => img}/alg/src/correlate.cc (96%) rename modules/{iplt => img}/alg/src/correlate.hh (85%) rename modules/{iplt => img}/alg/src/cross_correlate.cc (97%) rename modules/{iplt => img}/alg/src/cross_correlate.hh (87%) rename modules/{iplt => img}/alg/src/custom_transformer.cc (98%) rename modules/{iplt => img}/alg/src/custom_transformer.hh (91%) rename modules/{iplt => img}/alg/src/density_slice.cc (98%) rename modules/{iplt => img}/alg/src/density_slice.hh (86%) rename modules/{iplt => img}/alg/src/dft.cc (96%) rename modules/{iplt => img}/alg/src/dft.hh (86%) rename modules/{iplt => img}/alg/src/discrete_shrink.cc (98%) rename modules/{iplt => img}/alg/src/discrete_shrink.hh (87%) rename modules/{iplt => img}/alg/src/fft.cc (98%) rename modules/{iplt => img}/alg/src/fft.hh (81%) rename modules/{iplt => img}/alg/src/fftw_helper.hh (100%) rename modules/{iplt => img}/alg/src/fill.hh (93%) rename modules/{iplt => img}/alg/src/filter.hh (100%) rename modules/{iplt => img}/alg/src/fourier_filters.cc (91%) rename modules/{iplt => img}/alg/src/fourier_filters.hh (90%) rename modules/{iplt => img}/alg/src/fractional_shift.cc (96%) rename modules/{iplt => img}/alg/src/fractional_shift.hh (91%) rename modules/{iplt => img}/alg/src/gaussian.cc (99%) rename modules/{iplt => img}/alg/src/gaussian.hh (88%) rename modules/{iplt => img}/alg/src/gaussian_gradient_magnitude.cc (99%) rename modules/{iplt => img}/alg/src/gaussian_gradient_magnitude.hh (88%) rename modules/{iplt => img}/alg/src/gaussian_laplacian.cc (99%) rename modules/{iplt => img}/alg/src/gaussian_laplacian.hh (88%) rename modules/{iplt => img}/alg/src/highest_peak_search_3d.cc (90%) rename modules/{iplt => img}/alg/src/highest_peak_search_3d.hh (81%) rename modules/{iplt => img}/alg/src/histogram.cc (98%) rename modules/{iplt => img}/alg/src/histogram.hh (85%) rename modules/{iplt => img}/alg/src/levenberg_marquardt.h (98%) rename modules/{iplt => img}/alg/src/line_average.cc (96%) rename modules/{iplt => img}/alg/src/line_average.hh (80%) rename modules/{iplt => img}/alg/src/line_iterator.cc (98%) rename modules/{iplt => img}/alg/src/line_iterator.hh (91%) rename modules/{iplt => img}/alg/src/local_sigma_threshold.cc (96%) rename modules/{iplt => img}/alg/src/local_sigma_threshold.hh (85%) rename modules/{iplt => img}/alg/src/mask_image.cc (95%) rename modules/{iplt => img}/alg/src/mask_image.hh (85%) rename modules/{iplt => img}/alg/src/module_config.hh (73%) rename modules/{iplt => img}/alg/src/negate.hh (93%) rename modules/{iplt => img}/alg/src/norm.hh (100%) rename modules/{iplt => img}/alg/src/norm_linear.cc (98%) rename modules/{iplt => img}/alg/src/norm_linear.hh (88%) rename modules/{iplt => img}/alg/src/norm_log.cc (98%) rename modules/{iplt => img}/alg/src/norm_log.hh (88%) rename modules/{iplt => img}/alg/src/norm_od.cc (97%) rename modules/{iplt => img}/alg/src/norm_od.hh (89%) rename modules/{iplt => img}/alg/src/normalizer.cc (97%) rename modules/{iplt => img}/alg/src/normalizer.hh (88%) rename modules/{iplt => img}/alg/src/normalizer_factory.cc (96%) rename modules/{iplt => img}/alg/src/normalizer_factory.hh (60%) rename modules/{iplt => img}/alg/src/numeric.h (99%) rename modules/{iplt => img}/alg/src/polar.cc (95%) rename modules/{iplt => img}/alg/src/polar.hh (95%) rename modules/{iplt => img}/alg/src/power_spectrum.cc (98%) rename modules/{iplt => img}/alg/src/power_spectrum.hh (87%) rename modules/{iplt => img}/alg/src/randomize.cc (97%) rename modules/{iplt => img}/alg/src/randomize.hh (83%) rename modules/{iplt => img}/alg/src/rscrosscorr.cc (58%) rename modules/{iplt => img}/alg/src/rscrosscorr.hh (58%) rename modules/{iplt => img}/alg/src/smooth_mask_image.cc (94%) rename modules/{iplt => img}/alg/src/smooth_mask_image.hh (84%) rename modules/{iplt => img}/alg/src/stat.cc (98%) rename modules/{iplt => img}/alg/src/stat.hh (89%) rename modules/{iplt => img}/alg/src/stat_min_max.cc (97%) rename modules/{iplt => img}/alg/src/stat_min_max.hh (86%) rename modules/{iplt => img}/alg/src/threshold.cc (97%) rename modules/{iplt => img}/alg/src/threshold.hh (92%) rename modules/{iplt => img}/alg/src/transcendentals.hh (94%) rename modules/{iplt => img}/alg/src/transform.hh (100%) rename modules/{iplt => img}/alg/src/transform_fw.hh (100%) rename modules/{iplt => img}/alg/src/transformation_base.cc (98%) rename modules/{iplt => img}/alg/src/transformation_base.hh (88%) rename modules/{iplt => img}/alg/src/transformations.cc (98%) rename modules/{iplt => img}/alg/src/transformations.hh (85%) rename modules/{iplt => img}/alg/tests/CMakeLists.txt (85%) rename modules/{iplt => img}/alg/tests/test_circular_mask.cc (92%) rename modules/{iplt => img}/alg/tests/test_clear.cc (91%) rename modules/{iplt => img}/alg/tests/test_conj.cc (92%) rename modules/{iplt => img}/alg/tests/test_convolute.cc (89%) rename modules/{iplt => img}/alg/tests/test_discrete_shrink.cc (91%) rename modules/{iplt => img}/alg/tests/test_fft.cc (99%) rename modules/{iplt => img}/alg/tests/test_fill.cc (91%) rename modules/{iplt => img}/alg/tests/test_filter.cc (97%) rename modules/{iplt => img}/alg/tests/test_histogram.cc (93%) rename modules/{iplt => img}/alg/tests/test_mirror.cc (91%) rename modules/{iplt => img}/alg/tests/test_negate.cc (90%) rename modules/{iplt => img}/alg/tests/test_power_spectrum.cc (93%) rename modules/{iplt => img}/alg/tests/test_shift.cc (91%) rename modules/{iplt => img}/alg/tests/test_stat.cc (94%) rename modules/{iplt => img}/alg/tests/test_transform.cc (94%) rename modules/{iplt => img}/alg/tests/test_utils.hh (94%) rename modules/{iplt => img}/alg/tests/tests.cc (95%) rename modules/{iplt => img}/alg/tests/tests.hh (100%) rename modules/{iplt => img}/base/CMakeLists.txt (100%) rename modules/{iplt => img}/base/pymod/CMakeLists.txt (66%) rename modules/{iplt => img}/base/pymod/__init__.py (98%) rename modules/{iplt => img}/base/pymod/export_data.cc (96%) rename modules/{iplt => img}/base/pymod/export_data_algorithm.cc (98%) rename modules/{iplt => img}/base/pymod/export_extent.cc (99%) rename modules/{iplt => img}/base/pymod/export_function.cc (96%) rename modules/{iplt => img}/base/pymod/export_image_handle.cc (98%) rename modules/{iplt => img}/base/pymod/export_image_list.cc (95%) rename modules/{iplt => img}/base/pymod/export_map.cc (96%) rename modules/{iplt => img}/base/pymod/export_mask.cc (96%) rename modules/{iplt => img}/base/pymod/export_peak.cc (96%) rename modules/{iplt => img}/base/pymod/export_phase.cc (96%) rename modules/{iplt => img}/base/pymod/export_point.cc (93%) rename modules/{iplt => img}/base/pymod/export_progress.cc (75%) rename modules/{iplt => img}/base/pymod/export_raster_image.cc (94%) rename modules/{iplt => img}/base/pymod/export_size.cc (94%) rename modules/{iplt => img}/base/pymod/wrap_extent_iterator.hh (92%) rename modules/{iplt/base/pymod/wrap_iplt.cc => img/base/pymod/wrap_img.cc} (94%) rename modules/{iplt => img}/base/src/CMakeLists.txt (68%) rename modules/{iplt => img}/base/src/algorithm.hh (97%) rename modules/{iplt => img}/base/src/base.hh (98%) rename modules/{iplt => img}/base/src/circle_mask.cc (98%) rename modules/{iplt => img}/base/src/circle_mask.hh (96%) rename modules/{iplt => img}/base/src/composite_mask.cc (98%) rename modules/{iplt => img}/base/src/composite_mask.hh (96%) rename modules/{iplt => img}/base/src/data.cc (98%) rename modules/{iplt => img}/base/src/data.hh (97%) rename modules/{iplt => img}/base/src/data_algorithm.cc (98%) rename modules/{iplt => img}/base/src/data_algorithm.hh (90%) rename modules/{iplt => img}/base/src/data_observer.cc (98%) rename modules/{iplt => img}/base/src/data_observer.hh (95%) rename modules/{iplt => img}/base/src/data_types.hh (97%) rename modules/{iplt => img}/base/src/debug.hh (100%) rename modules/{iplt => img}/base/src/dllexport.hh (100%) rename modules/{iplt => img}/base/src/extent.cc (98%) rename modules/{iplt => img}/base/src/extent.hh (91%) rename modules/{iplt => img}/base/src/extent_iterator.cc (99%) rename modules/{iplt => img}/base/src/extent_iterator.hh (96%) rename modules/{iplt => img}/base/src/extent_mask.cc (99%) rename modules/{iplt => img}/base/src/extent_mask.hh (94%) rename modules/{iplt => img}/base/src/function.hh (96%) rename modules/{iplt => img}/base/src/function_base.cc (99%) rename modules/{iplt => img}/base/src/function_base.hh (98%) rename modules/{iplt => img}/base/src/function_fw.hh (94%) rename modules/{iplt => img}/base/src/function_impl.cc (97%) rename modules/{iplt => img}/base/src/function_impl.hh (95%) rename modules/{iplt => img}/base/src/image.hh (97%) rename modules/{iplt => img}/base/src/image_factory.cc (98%) rename modules/{iplt => img}/base/src/image_factory.hh (82%) rename modules/{iplt => img}/base/src/image_fw.hh (95%) rename modules/{iplt => img}/base/src/image_handle.cc (99%) rename modules/{iplt => img}/base/src/image_handle.hh (88%) rename modules/{iplt => img}/base/src/image_handle_fw.hh (97%) rename modules/{iplt => img}/base/src/image_impl.cc (97%) rename modules/{iplt => img}/base/src/image_impl.hh (95%) rename modules/{iplt => img}/base/src/image_list.cc (99%) rename modules/{iplt => img}/base/src/image_list.hh (91%) rename modules/{iplt => img}/base/src/image_state.hh (97%) rename modules/{iplt => img}/base/src/image_state/CMakeLists.txt (87%) rename modules/{iplt => img}/base/src/image_state/binop.cc (97%) rename modules/{iplt => img}/base/src/image_state/binop.hh (96%) rename modules/{iplt => img}/base/src/image_state/dispatch.hh (99%) rename modules/{iplt => img}/base/src/image_state/dispatch_fw.hh (95%) rename modules/{iplt => img}/base/src/image_state/image_state.hh (100%) rename modules/{iplt => img}/base/src/image_state/image_state_algorithm.cc (93%) rename modules/{iplt => img}/base/src/image_state/image_state_algorithm.hh (96%) rename modules/{iplt => img}/base/src/image_state/image_state_base.cc (96%) rename modules/{iplt => img}/base/src/image_state/image_state_base.hh (98%) rename modules/{iplt => img}/base/src/image_state/image_state_base_fw.hh (95%) rename modules/{iplt => img}/base/src/image_state/image_state_def.hh (96%) rename modules/{iplt => img}/base/src/image_state/image_state_factory.cc (96%) rename modules/{iplt => img}/base/src/image_state/image_state_factory.hh (85%) rename modules/{iplt => img}/base/src/image_state/image_state_fft.cc (97%) rename modules/{iplt => img}/base/src/image_state/image_state_fft.hh (96%) rename modules/{iplt => img}/base/src/image_state/image_state_frequency_domain.hh (92%) rename modules/{iplt => img}/base/src/image_state/image_state_fw.hh (97%) rename modules/{iplt => img}/base/src/image_state/image_state_half_frequency_domain.hh (96%) rename modules/{iplt => img}/base/src/image_state/image_state_impl.cc (99%) rename modules/{iplt => img}/base/src/image_state/image_state_impl.hh (98%) rename modules/{iplt => img}/base/src/image_state/image_state_inst.hh (97%) rename modules/{iplt => img}/base/src/image_state/image_state_spatial_domain.hh (93%) rename modules/{iplt => img}/base/src/image_state/image_state_visitor.hh (90%) rename modules/{iplt => img}/base/src/image_state/image_state_visitor_fw.hh (96%) rename modules/{iplt => img}/base/src/image_state/index.cc (98%) rename modules/{iplt => img}/base/src/image_state/index.hh (83%) rename modules/{iplt => img}/base/src/image_state/test_inst.cc (97%) rename modules/{iplt => img}/base/src/image_state/type_fw.hh (93%) rename modules/{iplt => img}/base/src/image_state/value_holder.cc (98%) rename modules/{iplt => img}/base/src/image_state/value_holder.hh (97%) rename modules/{iplt => img}/base/src/image_state_fw.hh (95%) rename modules/{iplt => img}/base/src/inverted_mask.cc (99%) rename modules/{iplt => img}/base/src/inverted_mask.hh (95%) rename modules/{iplt => img}/base/src/map.cc (83%) rename modules/{iplt => img}/base/src/map.hh (81%) rename modules/{iplt => img}/base/src/mask.cc (97%) rename modules/{iplt => img}/base/src/mask.hh (84%) rename modules/{iplt => img}/base/src/mask_base.cc (98%) rename modules/{iplt => img}/base/src/mask_base.hh (95%) rename modules/{iplt => img}/base/src/mask_base_fw.hh (97%) rename modules/{iplt => img}/base/src/mask_op.cc (97%) rename modules/{iplt => img}/base/src/mask_op.hh (75%) rename modules/{iplt => img}/base/src/mask_visitor.hh (96%) rename modules/{iplt => img}/base/src/module_config.hh (72%) rename modules/{iplt => img}/base/src/normalizer_fw.hh (97%) rename modules/{iplt => img}/base/src/normalizer_impl.hh (92%) rename modules/{iplt => img}/base/src/null_data.hh (97%) rename modules/{iplt => img}/base/src/null_function.hh (94%) rename modules/{iplt => img}/base/src/observable.hh (97%) rename modules/{iplt => img}/base/src/paste_impl.cc (97%) rename modules/{iplt => img}/base/src/paste_impl.hh (94%) rename modules/{iplt => img}/base/src/peak.cc (98%) rename modules/{iplt => img}/base/src/peak.hh (86%) rename modules/{iplt => img}/base/src/phase.cc (98%) rename modules/{iplt => img}/base/src/phase.hh (91%) rename modules/{iplt => img}/base/src/physical_units.cc (97%) rename modules/{iplt => img}/base/src/physical_units.hh (98%) rename modules/{iplt => img}/base/src/pixel_sampling.cc (99%) rename modules/{iplt => img}/base/src/pixel_sampling.hh (91%) rename modules/{iplt => img}/base/src/point.cc (98%) rename modules/{iplt => img}/base/src/point.hh (89%) rename modules/{iplt => img}/base/src/point_list.cc (96%) rename modules/{iplt => img}/base/src/point_list.hh (92%) rename modules/{iplt => img}/base/src/polygon_mask.cc (99%) rename modules/{iplt => img}/base/src/polygon_mask.hh (94%) rename modules/{iplt => img}/base/src/progress.cc (98%) rename modules/{iplt => img}/base/src/progress.hh (95%) create mode 100644 modules/img/base/src/raster_image/CMakeLists.txt rename modules/{iplt => img}/base/src/raster_image/raster_image.cc (98%) rename modules/{iplt => img}/base/src/raster_image/raster_image.hh (94%) rename modules/{iplt => img}/base/src/size.cc (97%) rename modules/{iplt => img}/base/src/size.hh (88%) rename modules/{iplt => img}/base/src/spherical_mask.cc (99%) rename modules/{iplt => img}/base/src/spherical_mask.hh (94%) rename modules/{iplt => img}/base/src/util.cc (97%) rename modules/{iplt => img}/base/src/util.hh (94%) rename modules/{iplt => img}/base/src/value_util.hh (90%) rename modules/{iplt => img}/base/src/vecmat.hh (90%) rename modules/{iplt => img}/base/src/version.cc (97%) rename modules/{iplt => img}/base/src/version.hh (89%) rename modules/{iplt => img}/base/tests/CMakeLists.txt (67%) rename modules/{iplt => img}/base/tests/simple_test.cc (92%) rename modules/{iplt => img}/base/tests/single_test_image_handle_mem.cc (94%) rename modules/{iplt => img}/base/tests/test_data.cc (89%) rename modules/{iplt => img}/base/tests/test_data.hh (100%) rename modules/{iplt => img}/base/tests/test_domains.cc (94%) rename modules/{iplt => img}/base/tests/test_extent.cc (98%) rename modules/{iplt => img}/base/tests/test_extent.hh (100%) rename modules/{iplt => img}/base/tests/test_function.cc (95%) rename modules/{iplt => img}/base/tests/test_function.hh (100%) rename modules/{iplt => img}/base/tests/test_image.cc (98%) rename modules/{iplt => img}/base/tests/test_image.hh (100%) rename modules/{iplt => img}/base/tests/test_image_factory.cc (94%) rename modules/{iplt => img}/base/tests/test_image_factory.hh (100%) rename modules/{iplt => img}/base/tests/test_image_impl.cc (94%) rename modules/{iplt => img}/base/tests/test_image_impl.hh (100%) rename modules/{iplt => img}/base/tests/test_image_state.cc (95%) rename modules/{iplt => img}/base/tests/test_image_state.hh (100%) rename modules/{iplt => img}/base/tests/test_image_state_visitor.cc (96%) rename modules/{iplt => img}/base/tests/test_image_state_visitor.hh (100%) rename modules/{iplt => img}/base/tests/test_index.cc (94%) rename modules/{iplt => img}/base/tests/test_index.hh (100%) rename modules/{iplt => img}/base/tests/test_point.cc (96%) rename modules/{iplt => img}/base/tests/test_point.hh (100%) rename modules/{iplt => img}/base/tests/test_sampling.cc (94%) rename modules/{iplt => img}/base/tests/test_sampling.hh (100%) rename modules/{iplt => img}/base/tests/test_size.cc (97%) rename modules/{iplt => img}/base/tests/test_size.hh (100%) rename modules/{iplt => img}/base/tests/test_transform.hh (100%) rename modules/{iplt => img}/base/tests/test_utils.hh (96%) rename modules/{iplt => img}/base/tests/test_value_holder.cc (93%) rename modules/{iplt => img}/base/tests/test_value_holder.hh (100%) rename modules/{iplt => img}/base/tests/tests.cc (96%) rename modules/io/src/{iplt => img}/CMakeLists.txt (93%) rename modules/io/src/{iplt => img}/convert_vax_data.c (100%) rename modules/io/src/{iplt => img}/convert_vax_data.h (100%) rename modules/io/src/{iplt => img}/image_format.cc (72%) rename modules/io/src/{iplt => img}/image_format.hh (98%) rename modules/io/src/{iplt => img}/image_format_conversion.cc (100%) rename modules/io/src/{iplt => img}/image_io_plugin.hh (94%) rename modules/io/src/{iplt => img}/jpk_util.hh (100%) rename modules/io/src/{iplt => img}/load_map.cc (71%) rename modules/io/src/{iplt => img}/load_map.hh (73%) rename modules/io/src/{iplt => img}/map_io_dat_handler.cc (74%) rename modules/io/src/{iplt => img}/map_io_dat_handler.hh (82%) rename modules/io/src/{iplt => img}/map_io_dm3_handler.cc (92%) rename modules/io/src/{iplt => img}/map_io_dm3_handler.hh (79%) rename modules/io/src/{iplt => img}/map_io_dx_handler.cc (91%) rename modules/io/src/{iplt => img}/map_io_dx_handler.hh (90%) rename modules/io/src/{iplt => img}/map_io_handler.hh (80%) rename modules/io/src/{iplt => img}/map_io_jpk_handler.cc (87%) rename modules/io/src/{iplt => img}/map_io_jpk_handler.hh (81%) rename modules/io/src/{iplt => img}/map_io_mrc_handler.cc (90%) rename modules/io/src/{iplt => img}/map_io_mrc_handler.hh (85%) rename modules/io/src/{iplt => img}/map_io_nanoscope_handler.cc (91%) rename modules/io/src/{iplt => img}/map_io_nanoscope_handler.hh (81%) rename modules/io/src/{iplt => img}/map_io_png_handler.cc (80%) rename modules/io/src/{iplt => img}/map_io_png_handler.hh (81%) rename modules/io/src/{iplt => img}/map_io_situs_handler.cc (81%) rename modules/io/src/{iplt => img}/map_io_situs_handler.hh (81%) rename modules/io/src/{iplt => img}/map_io_spi_handler.cc (90%) rename modules/io/src/{iplt => img}/map_io_spi_handler.hh (79%) rename modules/io/src/{iplt => img}/map_io_tiff_handler.cc (70%) rename modules/io/src/{iplt => img}/map_io_tiff_handler.hh (80%) rename modules/io/src/{iplt => img}/tiff_util.cc (100%) rename modules/io/src/{iplt => img}/tiff_util.hh (90%) delete mode 100644 modules/iplt/base/src/raster_image/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index b93777148..ae7b8c217 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ option(ENABLE_GUI "whether the graphical user interface should be enabled" ON) option(ENABLE_GFX "whether graphics support should be enabled" ON) -option(ENABLE_IPLT "whether the image processing module should be compiled" +option(ENABLE_IMG "whether the image processing module should be compiled" ON) option(USE_DOUBLE_PRECISION "whether to compile in double precision" OFF) @@ -72,10 +72,10 @@ else() set(_SHADER OFF) endif() -if (ENABLE_IPLT) - set(_IPLT ON) +if (ENABLE_IMG) + set(_IMG ON) else() - set(_IPLT OFF) + set(_IMG OFF) endif() if (COMPOUND_LIB) @@ -184,7 +184,7 @@ find_package(PNG REQUIRED) find_package(Eigen 2.0.0 REQUIRED) find_package(Python 2.2.1 REQUIRED) -if (ENABLE_IPLT) +if (ENABLE_IMG) find_package(FFTW REQUIRED) find_package(TIFF REQUIRED) endif() @@ -216,7 +216,7 @@ message(STATUS "OpenStructure will be built with the following options:\n" " Graphical interface (-DENABLE_UI) : ${_UI}\n" " OpenGL support (-DENABLE_GFX) : ${_OPENGL}\n" - " Image Processing support (-DENABLE_IPLT) : ${_IPLT}\n" + " Image Processing support (-DENABLE_IMG) : ${_IMG}\n" " Shader support (-DUSE_SHADER) : ${_SHADER}\n" " Optimize (-DOPTIMIZE) : ${_OPT}\n" " Double Precision (-DUSE_DOUBLE_PRECISION) : ${_DOUBLE_PREC}\n" diff --git a/examples/iplt/circle.png b/examples/img/circle.png similarity index 100% rename from examples/iplt/circle.png rename to examples/img/circle.png diff --git a/examples/iplt/create_split_image.py b/examples/img/create_split_image.py similarity index 92% rename from examples/iplt/create_split_image.py rename to examples/img/create_split_image.py index 370d3d55f..084244455 100644 --- a/examples/iplt/create_split_image.py +++ b/examples/img/create_split_image.py @@ -1,6 +1,6 @@ import sys from math import * -from ost.iplt.alg import * +from ost.img.alg import * from ost.geom import * @@ -30,8 +30,8 @@ def CreateSplitImage(imagelist, start_at_y=True): if(start_angle<7.0*pi/4.0 and end_angle>7.0*pi/4.0): pol.AddNode(Rotate(startpoint,7.0*pi/4.0)) pol.AddNode(Rotate(startpoint,end_angle)) - m=iplt.Mask(pol) - result+=image.Apply(iplt.alg.MaskImage(m)) + m=img.Mask(pol) + result+=image.Apply(img.alg.MaskImage(m)) count+=1 return result diff --git a/examples/iplt/fft_li.py b/examples/img/fft_li.py similarity index 79% rename from examples/iplt/fft_li.py rename to examples/img/fft_li.py index 339591972..f272d4c22 100644 --- a/examples/iplt/fft_li.py +++ b/examples/img/fft_li.py @@ -1,12 +1,12 @@ import sys -import ost.iplt.alg +import ost.img.alg images=io.LoadImageList(sys.argv[1:]) viewers=[] i=1 for im in images: im.CenterSpatialOrigin() - im.ApplyIP(iplt.alg.DFT()) + im.ApplyIP(img.alg.DFT()) v=gui.CreateDataViewer(im) v.SetName(sys.argv[i]) viewers.append(v) diff --git a/examples/img/modulate_image.py b/examples/img/modulate_image.py new file mode 100644 index 000000000..d81fd59cb --- /dev/null +++ b/examples/img/modulate_image.py @@ -0,0 +1,23 @@ +import math +import ost.img.alg + +class modulator(img.RealFunction): + def __init__(self,f): + img.RealFunction.__init__(self) + self.f = f + + def Func(self,point): + return math.sin(point[0]*self.f)*math.sin(point[1]*self.f) + +im = img.CreateImage(img.Size(400,200)) +im.ApplyIP(img.alg.Randomize()) + +im2 = im * modulator( 0.1 ) + +im2.SetSpatialOrigin(img.Point(0,200)) + +im3 = img.CreateImage(img.Size(400,400)) +im3.Paste(im) +im3.Paste(im2) + +v=gui.CreateDataViewer(im3) \ No newline at end of file diff --git a/examples/iplt/spoke_pattern.py b/examples/img/spoke_pattern.py similarity index 88% rename from examples/iplt/spoke_pattern.py rename to examples/img/spoke_pattern.py index 26f8cc05b..7a11e42a1 100644 --- a/examples/iplt/spoke_pattern.py +++ b/examples/img/spoke_pattern.py @@ -1,6 +1,6 @@ import math import sys -import ost.iplt.alg +import ost.img.alg if len(sys.argv)!=2: raise RuntimeError('Wrong number of command line arguments. The name of the output file should be the only argument.') @@ -16,7 +16,7 @@ threshold = 2.0 * Units.A # Threshold for low pass filtering amplitude = 255 # amplitude of the obscillations # Image is created -image=iplt.CreateImage(iplt.Size(size_of_image_x,size_of_image_y)) +image=img.CreateImage(img.Size(size_of_image_x,size_of_image_y)) image.CenterSpatialOrigin() image.SetSpatialSampling(pixel_sampling) @@ -36,10 +36,10 @@ for y in range (start_y,end_y+1): factor=(0.5+outer_bands)*math.pi/half_wedge if float(x)>-half_wedge and float(x)<half_wedge: value=255*math.cos(float(x)*factor) - image.SetReal(iplt.Point(x,y),value) + image.SetReal(img.Point(x,y),value) # Image is low-pass filtered -filter=ost.iplt.alg.GaussianLowPassFilter(threshold) +filter=ost.img.alg.GaussianLowPassFilter(threshold) image.ApplyIP(filter) # Image is saved diff --git a/examples/iplt/square.png b/examples/img/square.png similarity index 100% rename from examples/iplt/square.png rename to examples/img/square.png diff --git a/examples/iplt/tone1.png b/examples/img/tone1.png similarity index 100% rename from examples/iplt/tone1.png rename to examples/img/tone1.png diff --git a/examples/iplt/tone2.png b/examples/img/tone2.png similarity index 100% rename from examples/iplt/tone2.png rename to examples/img/tone2.png diff --git a/examples/iplt/tone3.png b/examples/img/tone3.png similarity index 100% rename from examples/iplt/tone3.png rename to examples/img/tone3.png diff --git a/examples/iplt/tone4.png b/examples/img/tone4.png similarity index 100% rename from examples/iplt/tone4.png rename to examples/img/tone4.png diff --git a/examples/iplt/tone5.png b/examples/img/tone5.png similarity index 100% rename from examples/iplt/tone5.png rename to examples/img/tone5.png diff --git a/examples/iplt/view_phase_diff.py b/examples/img/view_phase_diff.py similarity index 61% rename from examples/iplt/view_phase_diff.py rename to examples/img/view_phase_diff.py index 50bd3c28e..0228a0e02 100644 --- a/examples/iplt/view_phase_diff.py +++ b/examples/img/view_phase_diff.py @@ -1,6 +1,6 @@ import sys import math -import ost.iplt.alg +import ost.img.alg image1=io.LoadImage(sys.argv[1]) image2=io.LoadImage(sys.argv[2]) @@ -8,13 +8,13 @@ if image1.GetExtent() != image2.GetExtent(): raise RuntimeError('The input images should have the same size.') image1.CenterSpatialOrigin() image2.CenterSpatialOrigin() -image1.ApplyIP(ost.iplt.alg.DFT()) -image2.ApplyIP(ost.iplt.alg.DFT()) -ex_it=iplt.ExtentIterator(image1.GetExtent()) -diff_image=iplt.CreateImage(image1.GetExtent()) +image1.ApplyIP(ost.img.alg.DFT()) +image2.ApplyIP(ost.img.alg.DFT()) +ex_it=img.ExtentIterator(image1.GetExtent()) +diff_image=img.CreateImage(image1.GetExtent()) for pixel in ex_it: - phase1=iplt.Phase(image1.GetComplex(pixel)) - phase2=iplt.Phase(image2.GetComplex(pixel)) + phase1=img.Phase(image1.GetComplex(pixel)) + phase2=img.Phase(image2.GetComplex(pixel)) phase_diff=phase1-phase2 diff_image.SetReal(pixel,180.0*float(phase_diff)/math.pi) v=gui.CreateDataViewer(diff_image) diff --git a/examples/iplt/modulate_image.py b/examples/iplt/modulate_image.py deleted file mode 100644 index f39bd0936..000000000 --- a/examples/iplt/modulate_image.py +++ /dev/null @@ -1,23 +0,0 @@ -import math -import ost.iplt.alg - -class modulator(iplt.RealFunction): - def __init__(self,f): - iplt.RealFunction.__init__(self) - self.f = f - - def Func(self,point): - return math.sin(point[0]*self.f)*math.sin(point[1]*self.f) - -im = iplt.CreateImage(iplt.Size(400,200)) -im.ApplyIP(iplt.alg.Randomize()) - -im2 = im * modulator( 0.1 ) - -im2.SetSpatialOrigin(iplt.Point(0,200)) - -im3 = iplt.CreateImage(iplt.Size(400,400)) -im3.Paste(im) -im3.Paste(im2) - -v=gui.CreateDataViewer(im3) \ No newline at end of file diff --git a/examples/map/gfx_mapiso.py b/examples/map/gfx_mapiso.py index d7ecdde05..e5cb2135c 100644 --- a/examples/map/gfx_mapiso.py +++ b/examples/map/gfx_mapiso.py @@ -1,7 +1,7 @@ import math,random -from ost import iplt -mh=iplt.CreateMap(iplt.Size(100, 25, 25)) -for p in iplt.ExtentIterator(mh.GetExtent()): +from ost import img +mh=img.CreateMap(img.Size(100, 25, 25)) +for p in img.ExtentIterator(mh.GetExtent()): val=5*math.sin(0.4*math.sqrt(p[0]*p[0]+p[1]*p[1]))+7*math.cos(0.6*math.sqrt(p[2]*p[2]+p[1]*p[1])) mh.SetReal(p,val*(1.0+0.0*random.random())) diff --git a/examples/map/gfx_mapslab.py b/examples/map/gfx_mapslab.py index 258aff10e..54ec25a73 100644 --- a/examples/map/gfx_mapslab.py +++ b/examples/map/gfx_mapslab.py @@ -1,15 +1,15 @@ import math,random -from ost import iplt +from ost import img vmax=-10000.0 vmin=+10000.0 -mh=iplt.CreateMap(iplt.Size(32,32,32)) -for p in iplt.ExtentIterator(mh.GetExtent()): +mh=img.CreateMap(img.Size(32,32,32)) +for p in img.ExtentIterator(mh.GetExtent()): val=5*math.sin(0.4*math.sqrt(p[0]*p[0]+p[1]*p[1]))+7*math.cos(0.6*math.sqrt(p[2]*p[2]+p[1]*p[1])) mh.SetReal(p,val) vmin=min(vmin,val) vmax=max(vmax,val) print vmin, vmax -for p in iplt.ExtentIterator(mh.GetExtent()): +for p in img.ExtentIterator(mh.GetExtent()): mh.SetReal(p,(mh.GetReal(p)-vmin)/(vmax-vmin)) pl = gfx.PrimList("box") diff --git a/modules/base/pymod/__init__.py b/modules/base/pymod/__init__.py index 2bc9effd1..08f9f9ca5 100644 --- a/modules/base/pymod/__init__.py +++ b/modules/base/pymod/__init__.py @@ -26,6 +26,6 @@ except ImportError: try: - from ost import iplt + from ost import img except ImportError: pass diff --git a/modules/config/CMakeLists.txt b/modules/config/CMakeLists.txt index 76b81fa45..7293ce38c 100644 --- a/modules/config/CMakeLists.txt +++ b/modules/config/CMakeLists.txt @@ -18,10 +18,10 @@ if (PROFILE) else() set(profiling_enabled 0) endif() -if (ENABLE_IPLT) - set(iplt_enabled 1) +if (ENABLE_IMG) + set(img_enabled 1) else() - set(iplt_enabled 0) + set(img_enabled 0) endif() if (_DOUBLE_PREC) set(double_prec 1) diff --git a/modules/config/config.hh.in b/modules/config/config.hh.in index 9e73c84fe..292d504bd 100644 --- a/modules/config/config.hh.in +++ b/modules/config/config.hh.in @@ -26,7 +26,7 @@ #define OST_SHADER_SUPPORT_ENABLED @shader_support@ #define OST_PROFILING_ENABLED @profiling_enabled@ #define OST_ANIMATIONS_ENABLED @animations_enabled@ -#define OST_IPLT_ENABLED @iplt_enabled@ +#define OST_IMG_ENABLED @img_enabled@ #define OST_DOUBLE_PRECISION @double_prec@ #define OST_STATIC_PROPERTY_WORKAROUND @static_props@ #endif diff --git a/modules/gfx/pymod/CMakeLists.txt b/modules/gfx/pymod/CMakeLists.txt index c02935294..71c9ac3d7 100644 --- a/modules/gfx/pymod/CMakeLists.txt +++ b/modules/gfx/pymod/CMakeLists.txt @@ -12,7 +12,7 @@ set(OST_GFX_PYMOD_SOURCES export_color_ops.cc ) -if (ENABLE_IPLT) +if (ENABLE_IMG) set(OST_GFX_PYMOD_SOURCES ${OST_GFX_PYMOD_SOURCES} export_map.cc) endif() diff --git a/modules/gfx/pymod/color_by_def.hh b/modules/gfx/pymod/color_by_def.hh index 69d74bff2..1c4643acd 100644 --- a/modules/gfx/pymod/color_by_def.hh +++ b/modules/gfx/pymod/color_by_def.hh @@ -27,7 +27,7 @@ using namespace ost::gfx; namespace ost_gfx { -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED inline void color_by_01(GfxObj* go, const mol::EntityView& ev, const String& prop, @@ -37,7 +37,7 @@ inline void color_by_01(GfxObj* go, } inline void color_by_02(GfxObj* go, - const ::iplt::MapHandle& mh, + const ::img::MapHandle& mh, const String& prop, const Gradient& g, float minv, float maxv) { @@ -46,7 +46,7 @@ inline void color_by_02(GfxObj* go, inline void color_by_11(GfxObj* go, - const ::iplt::MapHandle& mh, + const ::img::MapHandle& mh, const String& prop, const Gradient& g) { @@ -54,7 +54,7 @@ inline void color_by_11(GfxObj* go, } inline void color_by_12(GfxObj* go, - const ::iplt::MapHandle& mh, + const ::img::MapHandle& mh, const String& prop, const Color& c1, const Color& c2) { @@ -63,7 +63,7 @@ inline void color_by_12(GfxObj* go, inline void color_by_04(GfxObj* go, - const ::iplt::MapHandle& mh, + const ::img::MapHandle& mh, const String& prop, const Color& c1, const Color& c2, float minv, float maxv) { @@ -140,7 +140,7 @@ inline void color_by_10(GfxObj* go, .def("ColorBy",ost_gfx::color_by_09)\ .def("ColorBy",ost_gfx::color_by_10) -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED # define COLOR_BY_DEF_MAP() \ .def("ColorBy",ost_gfx::color_by_01)\ .def("ColorBy",ost_gfx::color_by_02)\ diff --git a/modules/gfx/pymod/export_color_ops.cc b/modules/gfx/pymod/export_color_ops.cc index c45d9340f..492f5384e 100644 --- a/modules/gfx/pymod/export_color_ops.cc +++ b/modules/gfx/pymod/export_color_ops.cc @@ -27,9 +27,9 @@ #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_IPLT_ENABLED +#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED using namespace boost::python; @@ -107,15 +107,15 @@ void export_ColorOps() .staticmethod("FromInfo") ; -#if OST_IPLT_ENABLED - class_<MapHandleColorOp, bases<GradientColorOp> >("MapHandleColorOp", init<const String&, const String&, const gfx::Gradient&, float, float, const iplt::MapHandle&>()) - .def(init<const String&, int, const String&, const gfx::Gradient&, float, float, const iplt::MapHandle&>()) +#if OST_IMG_ENABLED + class_<MapHandleColorOp, bases<GradientColorOp> >("MapHandleColorOp", init<const String&, const String&, const gfx::Gradient&, float, float, const img::MapHandle&>()) + .def(init<const String&, int, const String&, const gfx::Gradient&, float, float, const img::MapHandle&>()) .def("SetMapHandle",&MapHandleColorOp::SetMapHandle) //.def("GetMapHandle",&MapHandleColorOp::GetMapHandle) .def("FromInfo",&MapHandleColorOp::FromInfo) .staticmethod("FromInfo") ; -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED } diff --git a/modules/gfx/pymod/export_entity.cc b/modules/gfx/pymod/export_entity.cc index 3417de210..f0542b0c4 100644 --- a/modules/gfx/pymod/export_entity.cc +++ b/modules/gfx/pymod/export_entity.cc @@ -160,14 +160,14 @@ void ent_apply_52(Entity* e, GradientLevelColorOp& glco){ e->Apply(glco); } -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED void ent_apply_61(Entity* e, MapHandleColorOp& mhco, bool store){ e->Apply(mhco,store); } void ent_apply_62(Entity* e, MapHandleColorOp& mhco){ e->Apply(mhco); } -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED template<class T1, class T2> struct PairToTupleConverter { @@ -276,10 +276,10 @@ void export_Entity() .def("Apply",&ent_apply_42) .def("Apply",&ent_apply_51) .def("Apply",&ent_apply_52) -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED .def("Apply",&ent_apply_61) .def("Apply",&ent_apply_62) -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED ; //register_ptr_to_python<EntityP>(); diff --git a/modules/gfx/pymod/export_map.cc b/modules/gfx/pymod/export_map.cc index 58fd7e091..37207916c 100644 --- a/modules/gfx/pymod/export_map.cc +++ b/modules/gfx/pymod/export_map.cc @@ -51,7 +51,7 @@ void ms_color_by_04(MapSlab *s, const Color& c1, const Color& c2) void export_Map() { class_<MapIso, bases<GfxObj>, boost::shared_ptr<MapIso>, - boost::noncopyable>("MapIso", init<const String&, const ::iplt::MapHandle&, float, optional<uint> >()) + boost::noncopyable>("MapIso", init<const String&, const ::img::MapHandle&, float, optional<uint> >()) .def("SetLevel",&MapIso::SetLevel) .def("GetLevel",&MapIso::GetLevel) .def("GetMean", &MapIso::GetMean) @@ -61,7 +61,7 @@ void export_Map() ; class_<MapSlab, bases<GfxObj>, boost::shared_ptr<MapSlab>, - boost::noncopyable>("MapSlab",init<const String&,const ::iplt::MapHandle&, const geom::Plane>()) + boost::noncopyable>("MapSlab",init<const String&,const ::img::MapHandle&, const geom::Plane>()) .def("SetPlane",&MapSlab::SetPlane) .def("GetPlane",&MapSlab::GetPlane) .def("ColorBy", ms_color_by_01) diff --git a/modules/gfx/pymod/wrap_gfx.cc b/modules/gfx/pymod/wrap_gfx.cc index 91fdc4d46..c020f0e0b 100644 --- a/modules/gfx/pymod/wrap_gfx.cc +++ b/modules/gfx/pymod/wrap_gfx.cc @@ -32,7 +32,7 @@ extern void export_GfxObj(); extern void export_Entity(); extern void export_Surface(); extern void export_primitives(); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED extern void export_Map(); #endif extern void export_SymmetryNode(); @@ -71,7 +71,7 @@ BOOST_PYTHON_MODULE(_gfx) export_Entity(); export_Surface(); export_RenderOptions(); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED export_Map(); #endif export_SymmetryNode(); diff --git a/modules/gfx/src/CMakeLists.txt b/modules/gfx/src/CMakeLists.txt index 2739e5609..dce1c04fa 100644 --- a/modules/gfx/src/CMakeLists.txt +++ b/modules/gfx/src/CMakeLists.txt @@ -79,7 +79,7 @@ tabulated_trig.hh ) -if (ENABLE_IPLT) +if (ENABLE_IMG) list(APPEND OST_GFX_HEADERS color_ops/map_handle_color_op.hh) endif() @@ -139,7 +139,7 @@ render_options/cartoon_render_options.cc render_options/trace_render_options.cc ) -if (ENABLE_IPLT) +if (ENABLE_IMG) set(OST_GFX_MAP_IMPL_HEADERS map_iso_gen.hh map_iso_gen_s.hh @@ -185,8 +185,8 @@ if (USE_SHADER) endif() set(OST_GFX_DEPENDENCIES "conop;seq") -if (ENABLE_IPLT) - set(OST_GFX_DEPENDENCIES "${OST_GFX_DEPENDENCIES};iplt;iplt_alg") +if (ENABLE_IMG) + set(OST_GFX_DEPENDENCIES "${OST_GFX_DEPENDENCIES};img;img_alg") endif() module(NAME gfx SOURCES ${OST_GFX_SOURCES} ${OST_GFX_MAP_SOURCES} diff --git a/modules/gfx/src/color_ops/map_handle_color_op.cc b/modules/gfx/src/color_ops/map_handle_color_op.cc index e184011c1..6e0af785a 100644 --- a/modules/gfx/src/color_ops/map_handle_color_op.cc +++ b/modules/gfx/src/color_ops/map_handle_color_op.cc @@ -29,12 +29,12 @@ MapHandleColorOp::MapHandleColorOp() : GradientColorOp(), mh_(){ } -MapHandleColorOp::MapHandleColorOp(const String& selection, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const iplt::MapHandle& mh) : +MapHandleColorOp::MapHandleColorOp(const String& selection, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const img::MapHandle& mh) : GradientColorOp(selection, property, gradient, minv, maxv), mh_(mh){ } -MapHandleColorOp::MapHandleColorOp(const String& selection, int mask, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const iplt::MapHandle& mh) : +MapHandleColorOp::MapHandleColorOp(const String& selection, int mask, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const img::MapHandle& mh) : GradientColorOp(selection, mask, property, gradient, minv, maxv), mh_(mh){ } @@ -59,11 +59,11 @@ void MapHandleColorOp::ApplyTo(GfxObjP& objP) const{ } } -void MapHandleColorOp::SetMapHandle(const iplt::MapHandle& mh){ +void MapHandleColorOp::SetMapHandle(const img::MapHandle& mh){ mh_ = mh; } -const iplt::MapHandle& MapHandleColorOp::GetMapHandle() const{ +const img::MapHandle& MapHandleColorOp::GetMapHandle() const{ return mh_; } @@ -87,7 +87,7 @@ gfx::MapHandleColorOp MapHandleColorOp::FromInfo(info::InfoGroup& group){ float minv = gop.GetMinV(); float maxv = gop.GetMaxV(); //TODO load map handle - return gfx::MapHandleColorOp(selection, mask, property, gradient, minv, maxv, iplt::MapHandle()); + return gfx::MapHandleColorOp(selection, mask, property, gradient, minv, maxv, img::MapHandle()); } }} diff --git a/modules/gfx/src/color_ops/map_handle_color_op.hh b/modules/gfx/src/color_ops/map_handle_color_op.hh index 097fe7b9f..aee4cf6b7 100644 --- a/modules/gfx/src/color_ops/map_handle_color_op.hh +++ b/modules/gfx/src/color_ops/map_handle_color_op.hh @@ -23,7 +23,7 @@ #include <ost/info/info_fw.hh> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> #include <ost/gfx/color_ops/gradient_color_op.hh> @@ -37,20 +37,20 @@ namespace ost { namespace gfx { class DLLEXPORT_OST_GFX MapHandleColorOp: public GradientColorOp { public: MapHandleColorOp(); - MapHandleColorOp(const String& selection, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const iplt::MapHandle& mh); - MapHandleColorOp(const String& selection, int mask, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const iplt::MapHandle& mh); + MapHandleColorOp(const String& selection, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const img::MapHandle& mh); + MapHandleColorOp(const String& selection, int mask, const String& property, const gfx::Gradient& gradient, float minv, float maxv, const img::MapHandle& mh); virtual bool CanApplyTo(const GfxObjP& obj) const; virtual void ApplyTo(GfxObjP& obj) const; - virtual void SetMapHandle(const iplt::MapHandle& mh); - virtual const iplt::MapHandle& GetMapHandle() const; + virtual void SetMapHandle(const img::MapHandle& mh); + virtual const img::MapHandle& GetMapHandle() const; virtual void ToInfo(info::InfoGroup& group) const; static gfx::MapHandleColorOp FromInfo(info::InfoGroup& group); private: - iplt::MapHandle mh_; + img::MapHandle mh_; }; }} diff --git a/modules/gfx/src/entity.cc b/modules/gfx/src/entity.cc index e08dfbce1..5e17ea1d6 100644 --- a/modules/gfx/src/entity.cc +++ b/modules/gfx/src/entity.cc @@ -655,15 +655,15 @@ void Entity::ColorBy(const mol::EntityView& ev, this->Apply(evop); } -#if OST_IPLT_ENABLED -void Entity::ColorBy(const iplt::MapHandle& mh, +#if OST_IMG_ENABLED +void Entity::ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv) { MapHandleColorOp mhop = MapHandleColorOp("",prop,g,minv,maxv,mh); this->Apply(mhop); } -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED void Entity::ColorBy(const String& prop, const Gradient& gradient, @@ -825,7 +825,7 @@ void Entity::Apply(const gfx::EntityViewColorOp& op, bool store) FlagRebuild(); } -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED void Entity::Apply(const gfx::MapHandleColorOp& op, bool store) { if(store){ diff --git a/modules/gfx/src/entity.hh b/modules/gfx/src/entity.hh index a1a081784..4f3d49ab8 100644 --- a/modules/gfx/src/entity.hh +++ b/modules/gfx/src/entity.hh @@ -34,9 +34,9 @@ #include <ost/gfx/color_ops/gradient_level_color_op.hh> #include <ost/gfx/color_ops/entity_view_color_op.hh> -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED #include <ost/gfx/impl/entity_renderer.hh> @@ -166,9 +166,9 @@ public: const String& prop, const Gradient& g, float minv, float maxv); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED // GfxObj property interface - virtual void ColorBy(const iplt::MapHandle& mh, + virtual void ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv); #endif @@ -213,7 +213,7 @@ public: void Apply(const gfx::GradientLevelColorOp& op, bool store=true); void Apply(const gfx::EntityViewColorOp& op, bool store=true); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED void Apply(const gfx::MapHandleColorOp& op, bool store=true); #endif diff --git a/modules/gfx/src/gfx_object.cc b/modules/gfx/src/gfx_object.cc index 08d6cbf0e..392b177b0 100644 --- a/modules/gfx/src/gfx_object.cc +++ b/modules/gfx/src/gfx_object.cc @@ -34,9 +34,9 @@ #include "povray.hh" #include "impl/mapped_property.hh" -#if OST_IPLT_ENABLED -# include <ost/iplt/alg/stat.hh> -#endif // OST_IPLT_ENABLED +#if OST_IMG_ENABLED +# include <ost/img/alg/stat.hh> +#endif // OST_IMG_ENABLED namespace ost { namespace gfx { @@ -622,15 +622,15 @@ void GfxObj::ColorBy(const mol::EntityView& ev, this->ColorBy(ev,prop,g,minv,maxv); } -#if OST_IPLT_ENABLED -void GfxObj::ColorBy(const iplt::MapHandle& mh, +#if OST_IMG_ENABLED +void GfxObj::ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g, float minv, float maxv) { LOGN_VERBOSE("ColorBy not implemented for this gfx object"); } -void GfxObj::ColorBy(const iplt::MapHandle& mh, +void GfxObj::ColorBy(const img::MapHandle& mh, const String& prop, const Color& c1, const Color& c2, float minv, float maxv) { @@ -640,11 +640,11 @@ void GfxObj::ColorBy(const iplt::MapHandle& mh, this->ColorBy(mh,prop,g,minv,maxv); } -void GfxObj::ColorBy(const iplt::MapHandle& mh, +void GfxObj::ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g) { - ost::iplt::alg::Stat stat; + ost::img::alg::Stat stat; mh.Apply(stat); float min = static_cast<float>(stat.GetMinimum()); float max = static_cast<float>(stat.GetMaximum()); @@ -652,11 +652,11 @@ void GfxObj::ColorBy(const iplt::MapHandle& mh, this->ColorBy(mh,prop,g,minmax.first, minmax.second); } -void GfxObj::ColorBy(const iplt::MapHandle& mh, +void GfxObj::ColorBy(const img::MapHandle& mh, const String& prop, const Color& c1, const Color& c2) { - ost::iplt::alg::Stat stat; + ost::img::alg::Stat stat; mh.Apply(stat); float min = static_cast<float>(stat.GetMinimum()); float max = static_cast<float>(stat.GetMaximum()); @@ -664,7 +664,7 @@ void GfxObj::ColorBy(const iplt::MapHandle& mh, this->ColorBy(mh,prop,c1,c2,minmax.first, minmax.second); } -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED void GfxObj::ColorBy(const mol::EntityHandle& eh, const String& prop, diff --git a/modules/gfx/src/gfx_object.hh b/modules/gfx/src/gfx_object.hh index 249004d84..c3d9bd369 100644 --- a/modules/gfx/src/gfx_object.hh +++ b/modules/gfx/src/gfx_object.hh @@ -41,8 +41,8 @@ #include <ost/mol/transform.hh> -#if OST_IPLT_ENABLED -# include <ost/iplt/map.hh> +#if OST_IMG_ENABLED +# include <ost/img/map.hh> #endif #include "gfx_object_fw.hh" @@ -234,21 +234,21 @@ public: void ColorBy(const mol::EntityHandle& ev, const String& prop, const Color& c1, const Color& c2); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED // convenience method - void ColorBy(const iplt::MapHandle& mh, + void ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g); // convenience method - void ColorBy(const iplt::MapHandle& mh, + void ColorBy(const img::MapHandle& mh, const String& prop, const Color& c1, const Color& c2); // dito for maps - virtual void ColorBy(const iplt::MapHandle& mh, + virtual void ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv); // convenience method - void ColorBy(const iplt::MapHandle& mh, + void ColorBy(const img::MapHandle& mh, const String& prop, const Color& c1, const Color& c2, float minv, float maxv); #endif diff --git a/modules/gfx/src/impl/connect_renderer_base.cc b/modules/gfx/src/impl/connect_renderer_base.cc index c94117fa1..51a4afa38 100644 --- a/modules/gfx/src/impl/connect_renderer_base.cc +++ b/modules/gfx/src/impl/connect_renderer_base.cc @@ -262,14 +262,14 @@ void ConnectRendererBase::Apply(const gfx::EntityViewColorOp& op) state_|=DIRTY_VA; } -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED void ConnectRendererBase::Apply(const gfx::MapHandleColorOp& op) { if ((op.GetMask() & MAIN_COLOR)==0) { return; } this->UpdateViews(); - iplt::MapHandle mh = op.GetMapHandle(); + img::MapHandle mh = op.GetMapHandle(); gfx::Gradient g = op.GetGradient(); const String& prop = op.GetProperty(); float minv = op.GetMinV(); diff --git a/modules/gfx/src/impl/connect_renderer_base.hh b/modules/gfx/src/impl/connect_renderer_base.hh index 249bbe844..0d1cf46e5 100644 --- a/modules/gfx/src/impl/connect_renderer_base.hh +++ b/modules/gfx/src/impl/connect_renderer_base.hh @@ -46,7 +46,7 @@ public: virtual void PickAtom(const geom::Line3& line, Real line_width, mol::AtomHandle& picked_atom); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED virtual void Apply(const gfx::MapHandleColorOp& op); #endif diff --git a/modules/gfx/src/impl/entity_renderer.hh b/modules/gfx/src/impl/entity_renderer.hh index 1a9c74a58..4b58eee6a 100644 --- a/modules/gfx/src/impl/entity_renderer.hh +++ b/modules/gfx/src/impl/entity_renderer.hh @@ -38,9 +38,9 @@ #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_IPLT_ENABLED +#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED #include <ost/gfx/impl/entity_renderer_fw.hh> namespace ost { namespace gfx { namespace impl { @@ -135,7 +135,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_IPLT_ENABLED +#if OST_IMG_ENABLED virtual void Apply(const gfx::MapHandleColorOp& op)=0; #endif diff --git a/modules/gfx/src/impl/map_iso_gen.cc b/modules/gfx/src/impl/map_iso_gen.cc index 78da0099d..06e5fd1e6 100644 --- a/modules/gfx/src/impl/map_iso_gen.cc +++ b/modules/gfx/src/impl/map_iso_gen.cc @@ -27,7 +27,7 @@ #include <ost/log.hh> #include <ost/geom/geom.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/image_state.hh> //#define MAP_ISO_DEBUG @@ -87,35 +87,35 @@ IsosurfaceGenerator::IsosurfaceGenerator(): */ namespace { -inline uint gen_vertex_0(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_1(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_2(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_3(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_4(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_5(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_6(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_7(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_8(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_9(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_A(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); -inline uint gen_vertex_B(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_0(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_1(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_2(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_3(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_4(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_5(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_6(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_7(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_8(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_9(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_A(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); +inline uint gen_vertex_B(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level); } -void IsosurfaceGenerator::Generate(const iplt::MapHandle& mh, IndexedVertexArray& va, float level) +void IsosurfaceGenerator::Generate(const img::MapHandle& mh, IndexedVertexArray& va, float level) { #ifdef MAP_ISO_DEBUG va.Add(geom::Vec3(0.0,0.0,0.0),geom::Vec3(),Color(1.0,1.0,1.0)); #endif - iplt::ImageStateBasePtr is=mh.ImageStatePtr(); - iplt::RealSpatialImageState* rsis=dynamic_cast<iplt::RealSpatialImageState*>(is.get()); + img::ImageStateBasePtr is=mh.ImageStatePtr(); + img::RealSpatialImageState* rsis=dynamic_cast<img::RealSpatialImageState*>(is.get()); assert(rsis); // TODO: use *start to *end instead 0 to *count int ucount=mh.GetSize()[0]; int vcount=mh.GetSize()[1]; int wcount=mh.GetSize()[2]; - iplt::Point s=mh.GetExtent().GetStart(); + img::Point s=mh.GetExtent().GetStart(); uint vertex_id[12]; // storage for vertex ids for the last xy plane @@ -181,17 +181,17 @@ void IsosurfaceGenerator::Generate(const iplt::MapHandle& mh, IndexedVertexArray int us=s[0]+u, vs=s[1]+v, ws=s[2]+w; // determine cube bitpattern unsigned int pattern = 0; - if(static_cast<float>(rsis->Value(iplt::Point(us,vs,ws)))<level) pattern|=1<<0; - if(static_cast<float>(rsis->Value(iplt::Point(us,vs+1,ws)))<level) pattern|=1<<1; - if(static_cast<float>(rsis->Value(iplt::Point(us+1,vs+1,ws)))<level) pattern|=1<<2; - if(static_cast<float>(rsis->Value(iplt::Point(us+1,vs,ws)))<level) pattern|=1<<3; - if(static_cast<float>(rsis->Value(iplt::Point(us,vs,ws+1)))<level) pattern|=1<<4; - if(static_cast<float>(rsis->Value(iplt::Point(us,vs+1,ws+1)))<level) pattern|=1<<5; - if(static_cast<float>(rsis->Value(iplt::Point(us+1,vs+1,ws+1)))<level) pattern|=1<<6; - if(static_cast<float>(rsis->Value(iplt::Point(us+1,vs,ws+1)))<level) pattern|=1<<7; + if(static_cast<float>(rsis->Value(img::Point(us,vs,ws)))<level) pattern|=1<<0; + if(static_cast<float>(rsis->Value(img::Point(us,vs+1,ws)))<level) pattern|=1<<1; + if(static_cast<float>(rsis->Value(img::Point(us+1,vs+1,ws)))<level) pattern|=1<<2; + if(static_cast<float>(rsis->Value(img::Point(us+1,vs,ws)))<level) pattern|=1<<3; + if(static_cast<float>(rsis->Value(img::Point(us,vs,ws+1)))<level) pattern|=1<<4; + if(static_cast<float>(rsis->Value(img::Point(us,vs+1,ws+1)))<level) pattern|=1<<5; + if(static_cast<float>(rsis->Value(img::Point(us+1,vs+1,ws+1)))<level) pattern|=1<<6; + if(static_cast<float>(rsis->Value(img::Point(us+1,vs,ws+1)))<level) pattern|=1<<7; String msg; std::stringstream msgs(msg); - msgs << u << " " << v << " " << w << ": " << pattern << " " << mh.GetReal(iplt::Point(u,v,w)) << std::endl; + msgs << u << " " << v << " " << w << ": " << pattern << " " << mh.GetReal(img::Point(u,v,w)) << std::endl; LOG_VERBOSE(msgs); /* @@ -256,10 +256,10 @@ static Color def_color(1.0,1.0,1.0); -uint gen_vertex_0(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_0(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v,w))); - float v1=static_cast<float>(mh->Value(iplt::Point(u,v+1,w))); + float v0=static_cast<float>(mh->Value(img::Point(u,v,w))); + float v1=static_cast<float>(mh->Value(img::Point(u,v+1,w))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u), static_cast<float>(v)+static_cast<float>((level-v0)/(v1-v0)), @@ -269,10 +269,10 @@ uint gen_vertex_0(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_1(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_1(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v+1,w))); - float v1=static_cast<float>(mh->Value(iplt::Point(u+1,v+1,w))); + float v0=static_cast<float>(mh->Value(img::Point(u,v+1,w))); + float v1=static_cast<float>(mh->Value(img::Point(u+1,v+1,w))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u)+static_cast<float>((level-v0)/(v1-v0)), static_cast<float>(v+1), @@ -282,10 +282,10 @@ uint gen_vertex_1(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_2(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_2(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u+1,v,w))); - float v1=static_cast<float>(mh->Value(iplt::Point(u+1,v+1,w))); + float v0=static_cast<float>(mh->Value(img::Point(u+1,v,w))); + float v1=static_cast<float>(mh->Value(img::Point(u+1,v+1,w))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u+1), static_cast<float>(v)+static_cast<float>((level-v0)/(v1-v0)), @@ -295,9 +295,9 @@ uint gen_vertex_2(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_3(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_3(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v,w))); float v1=static_cast<float>(mh->Value(iplt::Point(u+1,v,w))); + float v0=static_cast<float>(mh->Value(img::Point(u,v,w))); float v1=static_cast<float>(mh->Value(img::Point(u+1,v,w))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u)+static_cast<float>((level-v0)/(v1-v0)), static_cast<float>(v), @@ -307,9 +307,9 @@ uint gen_vertex_3(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_4(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_4(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v,w))); float v1=static_cast<float>(mh->Value(iplt::Point(u,v,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u,v,w))); float v1=static_cast<float>(mh->Value(img::Point(u,v,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u), static_cast<float>(v), @@ -319,9 +319,9 @@ uint gen_vertex_4(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_5(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_5(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v+1,w))); float v1=static_cast<float>(mh->Value(iplt::Point(u,v+1,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u,v+1,w))); float v1=static_cast<float>(mh->Value(img::Point(u,v+1,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u), static_cast<float>(v+1), @@ -331,9 +331,9 @@ uint gen_vertex_5(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_6(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_6(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u+1,v+1,w))); float v1 = static_cast<float>(mh->Value(iplt::Point(u+1,v+1,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u+1,v+1,w))); float v1 = static_cast<float>(mh->Value(img::Point(u+1,v+1,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u+1), static_cast<float>(v+1), @@ -343,9 +343,9 @@ uint gen_vertex_6(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_7(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_7(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u+1,v,w))); float v1=static_cast<float>(mh->Value(iplt::Point(u+1,v,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u+1,v,w))); float v1=static_cast<float>(mh->Value(img::Point(u+1,v,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u+1), static_cast<float>(v), @@ -355,9 +355,9 @@ uint gen_vertex_7(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_8(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_8(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v,w+1))); float v1=static_cast<float>(mh->Value(iplt::Point(u,v+1,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u,v,w+1))); float v1=static_cast<float>(mh->Value(img::Point(u,v+1,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u), static_cast<float>(v)+static_cast<float>((level-v0)/(v1-v0)), @@ -367,9 +367,9 @@ uint gen_vertex_8(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_9(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_9(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v+1,w+1))); float v1=static_cast<float>(mh->Value(iplt::Point(u+1,v+1,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u,v+1,w+1))); float v1=static_cast<float>(mh->Value(img::Point(u+1,v+1,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u)+static_cast<float>((level-v0)/(v1-v0)), static_cast<float>(v+1), @@ -379,9 +379,9 @@ uint gen_vertex_9(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_A(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_A(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u+1,v,w+1))); float v1=static_cast<float>(mh->Value(iplt::Point(u+1,v+1,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u+1,v,w+1))); float v1=static_cast<float>(mh->Value(img::Point(u+1,v+1,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u+1), static_cast<float>(v)+static_cast<float>((level-v0)/(v1-v0)), @@ -391,9 +391,9 @@ uint gen_vertex_A(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u return 0; } -uint gen_vertex_B(iplt::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) +uint gen_vertex_B(img::RealSpatialImageState* mh, IndexedVertexArray& va, int u, int v, int w, float level) { - float v0=static_cast<float>(mh->Value(iplt::Point(u,v,w+1))); float v1=static_cast<float>(mh->Value(iplt::Point(u+1,v,w+1))); + float v0=static_cast<float>(mh->Value(img::Point(u,v,w+1))); float v1=static_cast<float>(mh->Value(img::Point(u+1,v,w+1))); if((level>v0 && level<=v1) || (level>v1 && level<=v0)) { return va.Add(mh->FractionalIndexToCoord(geom::Vec3(static_cast<float>(u)+static_cast<float>((level-v0)/(v1-v0)), static_cast<float>(v), diff --git a/modules/gfx/src/impl/map_iso_gen.hh b/modules/gfx/src/impl/map_iso_gen.hh index 2367d634a..9d4fadcb9 100644 --- a/modules/gfx/src/impl/map_iso_gen.hh +++ b/modules/gfx/src/impl/map_iso_gen.hh @@ -25,7 +25,7 @@ #include <vector> #include <ost/geom/geom.hh> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> #include <ost/gfx/map_iso_prop.hh> @@ -53,7 +53,7 @@ public: IsosurfaceGenerator(); - void Generate(const iplt::MapHandle& mh, IndexedVertexArray& va, float level); + void Generate(const img::MapHandle& mh, IndexedVertexArray& va, float level); void AddLF(uint code, IndexedVertexArray& va,unsigned int vertex_id[12]); diff --git a/modules/gfx/src/impl/map_iso_gen_o.cc b/modules/gfx/src/impl/map_iso_gen_o.cc index a279b9cdf..4db2b2fff 100644 --- a/modules/gfx/src/impl/map_iso_gen_o.cc +++ b/modules/gfx/src/impl/map_iso_gen_o.cc @@ -36,7 +36,7 @@ IsosurfaceGeneratorO& IsosurfaceGeneratorO::Instance() IsosurfaceGeneratorO::IsosurfaceGeneratorO() {} -void IsosurfaceGeneratorO::Generate(const iplt::MapHandle& mh, +void IsosurfaceGeneratorO::Generate(const img::MapHandle& mh, IndexedVertexArray& va, float level) { } diff --git a/modules/gfx/src/impl/map_iso_gen_o.hh b/modules/gfx/src/impl/map_iso_gen_o.hh index aaf56f0fc..eff033c11 100644 --- a/modules/gfx/src/impl/map_iso_gen_o.hh +++ b/modules/gfx/src/impl/map_iso_gen_o.hh @@ -26,7 +26,7 @@ #include <vector> #include <ost/geom/geom.hh> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> #include <ost/gfx/map_iso_prop.hh> #include "map_iso_gen.hh" // for AddLFList @@ -42,7 +42,7 @@ public: IsosurfaceGeneratorO(); - void Generate(const iplt::MapHandle& mh, IndexedVertexArray& va, float level); + void Generate(const img::MapHandle& mh, IndexedVertexArray& va, float level); }; }}} diff --git a/modules/gfx/src/impl/map_iso_gen_s.cc b/modules/gfx/src/impl/map_iso_gen_s.cc index edd42bcb2..aa796891b 100644 --- a/modules/gfx/src/impl/map_iso_gen_s.cc +++ b/modules/gfx/src/impl/map_iso_gen_s.cc @@ -22,7 +22,7 @@ #include <ost/profile.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/image_state.hh> #include <ost/gfx/glext_include.hh> #include <ost/gfx/map_iso_prop.hh> @@ -67,13 +67,13 @@ typedef boost::shared_array<float> XYSlab; typedef boost::shared_array<unsigned char> CSlab; typedef boost::shared_array<uint> VSlab; -void set_slab(iplt::RealSpatialImageState* mh, XYSlab& slab, uint ucount, +void set_slab(img::RealSpatialImageState* mh, XYSlab& slab, uint ucount, uint vcount, uint w) { for(uint v=0;v<vcount-1;++v) { uint off=v*ucount; for(uint u=0;u<ucount-1;++u,++off) { - slab[off]=mh->Value(iplt::Point(u,v,w)); + slab[off]=mh->Value(img::Point(u,v,w)); } slab[off]=0.0; } @@ -154,7 +154,7 @@ BSlab process_edges(const XYSlab& slab1, const XYSlab& slab2, return bslab; } -void process_vids(const iplt::MapHandle& mh, IndexedVertexArray& va, +void process_vids(const img::MapHandle& mh, IndexedVertexArray& va, const BSlab& bslab, VSlab& vidu, VSlab& vidv, VSlab& vidw, uint ucount, uint vcount, uint w) { @@ -232,7 +232,7 @@ void assign_lf(IndexedVertexArray& va, const BSlab& bslab, } // anon ns -void IsosurfaceGeneratorS::Generate(const iplt::MapHandle& mh, +void IsosurfaceGeneratorS::Generate(const img::MapHandle& mh, IndexedVertexArray& va, float level) { uint ucount=mh.GetSize()[0]+1; @@ -313,8 +313,8 @@ void IsosurfaceGeneratorS::Generate(const iplt::MapHandle& mh, } // profile #endif - iplt::ImageStateBasePtr is=mh.ImageStatePtr(); - iplt::RealSpatialImageState* rsis=dynamic_cast<iplt::RealSpatialImageState*>(is.get()); + img::ImageStateBasePtr is=mh.ImageStatePtr(); + img::RealSpatialImageState* rsis=dynamic_cast<img::RealSpatialImageState*>(is.get()); assert(rsis); set_slab(rsis,slab2,ucount,vcount,0); set_slab(rsis,slab1,ucount,vcount,1); diff --git a/modules/gfx/src/impl/map_iso_gen_s.hh b/modules/gfx/src/impl/map_iso_gen_s.hh index fd09c2289..30e9adfa0 100644 --- a/modules/gfx/src/impl/map_iso_gen_s.hh +++ b/modules/gfx/src/impl/map_iso_gen_s.hh @@ -26,7 +26,7 @@ #include <vector> #include <ost/geom/geom.hh> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> #include <ost/gfx/map_iso_prop.hh> #include "map_iso_gen.hh" // for AddLFList @@ -42,7 +42,7 @@ public: IsosurfaceGeneratorS(); - void Generate(const iplt::MapHandle& mh, IndexedVertexArray& va, float level); + void Generate(const img::MapHandle& mh, IndexedVertexArray& va, float level); private: uint slab_tex_[2]; diff --git a/modules/gfx/src/impl/map_octree.cc b/modules/gfx/src/impl/map_octree.cc index e25b00332..be5f7a8db 100644 --- a/modules/gfx/src/impl/map_octree.cc +++ b/modules/gfx/src/impl/map_octree.cc @@ -25,7 +25,7 @@ namespace ost { namespace gfx { namespace impl { -MapOctree::MapOctree(const iplt::ImageHandle& map): +MapOctree::MapOctree(const img::ImageHandle& map): map_(map) { this->BuildOctree(); @@ -33,7 +33,7 @@ MapOctree::MapOctree(const iplt::ImageHandle& map): uint32_t MapOctree::GetNumNodesForLevel(uint8_t level) const { - iplt::Size size=map_.GetExtent().GetSize(); + img::Size size=map_.GetExtent().GetSize(); OcRangeVector range_vec(size[0]-1, size[1]-1, size[2]-1); uint16_t mask=0; for (unsigned char i=0; i<level; ++i) { @@ -45,24 +45,24 @@ uint32_t MapOctree::GetNumNodesForLevel(uint8_t level) const void MapOctree::BuildOctree() { - iplt::Size size=map_.GetExtent().GetSize(); + img::Size size=map_.GetExtent().GetSize(); OcRangeVector range_vec(size[0]-1, size[1]-1, size[2]-1); - iplt::RealSpatialImageState* p=NULL; - p=dynamic_cast<iplt::RealSpatialImageState*>(map_.ImageStatePtr().get()); + img::RealSpatialImageState* p=NULL; + p=dynamic_cast<img::RealSpatialImageState*>(map_.ImageStatePtr().get()); assert(p && "Octree only supports real spatial images"); OctreeNode dummy; this->BuildOctreeRec(range_vec, 0, p, map_.GetExtent(), dummy); } std::pair<float,float> MapOctree::BuildOctreeRec(const OcRangeVector& range_vec, uint16_t level, - iplt::RealSpatialImageState* map, - const iplt::Extent& ext, + img::RealSpatialImageState* map, + const img::Extent& ext, OctreeNode& parent) { - static iplt::Point OFFSET[]={ - iplt::Point(0, 0, 1), iplt::Point(0, 1, 1), iplt::Point(1, 0, 1), - iplt::Point(1, 1, 1), iplt::Point(1, 1, 0), iplt::Point(0, 1, 0), - iplt::Point(1, 0, 0) + static img::Point OFFSET[]={ + img::Point(0, 0, 1), img::Point(0, 1, 1), img::Point(1, 0, 1), + img::Point(1, 1, 1), img::Point(1, 1, 0), img::Point(0, 1, 0), + img::Point(1, 0, 0) }; // determine highest-order bit in all 3 directions char highest_order_bit=-1; @@ -76,11 +76,11 @@ std::pair<float,float> MapOctree::BuildOctreeRec(const OcRangeVector& range_vec, if (highest_order_bit==-1) { parent.SetLeaf(); - iplt::Point mend=map->GetExtent().GetEnd(); + img::Point mend=map->GetExtent().GetEnd(); float val=map->Value(ext.GetStart()); std::pair<float, float> minmax(val, val); for (int i=0; i<7; ++i) { - iplt::Point p=OFFSET[i]+ext.GetStart(); + img::Point p=OFFSET[i]+ext.GetStart(); if (mend[0]>=p[0] && mend[1]>=p[1] && mend[2]>=p[2]) { val=map->Value(p); if (val<minmax.first) { @@ -147,9 +147,9 @@ std::pair<float,float> MapOctree::BuildOctreeRec(const OcRangeVector& range_vec, for (int j=0; j<=int(branch_y); ++j) { for (int k=0; k<=int(branch_z); ++k) { std::pair<float, float> local_minmax; - iplt::Extent ext(iplt::Point(range_x[i][0], range_y[j][0], + img::Extent ext(img::Point(range_x[i][0], range_y[j][0], range_z[k][0]), - iplt::Point(range_x[i][1], range_y[j][1], + img::Point(range_x[i][1], range_y[j][1], range_z[k][1])); #if !defined(NDEBUG) if (!map_.GetExtent().Contains(ext)) { diff --git a/modules/gfx/src/impl/map_octree.hh b/modules/gfx/src/impl/map_octree.hh index e0e2a1c46..8e453647d 100644 --- a/modules/gfx/src/impl/map_octree.hh +++ b/modules/gfx/src/impl/map_octree.hh @@ -19,8 +19,8 @@ #ifndef OST_GFX_IMPL_MAP_OCTREE_HH #define OST_GFX_IMPL_MAP_OCTREE_HH -#include <ost/iplt/image_handle.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/image_handle.hh> +#include <ost/img/image_state.hh> #include <ost/gfx/module_config.hh> /* Author: Marco Biasini @@ -107,7 +107,7 @@ typedef std::vector<OctreeNode> OcNodeList; /// maximum value of the voxels it encloses. class DLLEXPORT_OST_GFX MapOctree { public: - MapOctree(const iplt::ImageHandle& map); + MapOctree(const img::ImageHandle& map); uint32_t GetNumNodesForLevel(uint8_t level) const; /// \brief depth-first visit of octree nodes @@ -117,9 +117,9 @@ public: if (levels_.empty()) { return; } - iplt::Extent ext=map_.GetExtent(); - iplt::RealSpatialImageState* map=NULL; - map=dynamic_cast<iplt::RealSpatialImageState*>(map_.ImageStatePtr().get()); + img::Extent ext=map_.GetExtent(); + img::RealSpatialImageState* map=NULL; + map=dynamic_cast<img::RealSpatialImageState*>(map_.ImageStatePtr().get()); assert(levels_[0].size()==1); if (f.VisitNode(levels_[0][0], 0, ext)) { this->VisitDFRec<F>(levels_[0][0], f, 1, ext, map); @@ -140,8 +140,8 @@ protected: template <typename F> void VisitDFRec(const OctreeNode& node, F& f, uint8_t level, - const iplt::Extent& ext, - iplt::RealSpatialImageState* map) const + const img::Extent& ext, + img::RealSpatialImageState* map) const { if (node.GetChildCount()==0) { return; } uint32_t c=node.GetFirstChild(); @@ -189,13 +189,13 @@ protected: for (int j=0; j<cy; ++j) { for (int k=0; k<cz; ++k, ++c) { if (node.IsLeaf()) { - f.VisitLeaf(map, iplt::Point(range_x[i][0], range_y[j][0], + f.VisitLeaf(map, img::Point(range_x[i][0], range_y[j][0], range_z[k][0])); } else { const OctreeNode& cn=levels_[level][c]; - iplt::Extent ext(iplt::Point(range_x[i][0], range_y[j][0], + img::Extent ext(img::Point(range_x[i][0], range_y[j][0], range_z[k][0]), - iplt::Point(range_x[i][1], range_y[j][1], + img::Point(range_x[i][1], range_y[j][1], range_z[k][1])); if (f.VisitNode(cn, level, ext)) { this->VisitDFRec<F>(cn, f, level+1, ext, map); @@ -209,11 +209,11 @@ private: void BuildOctree(); std::pair<float, float> BuildOctreeRec(const OcRangeVector& range_vec, uint16_t level, - iplt::RealSpatialImageState* map, - const iplt::Extent& ext, + img::RealSpatialImageState* map, + const img::Extent& ext, OctreeNode& parent); - iplt::ImageHandle map_; + img::ImageHandle map_; std::vector<OcNodeList> levels_; }; diff --git a/modules/gfx/src/impl/mapped_property.cc b/modules/gfx/src/impl/mapped_property.cc index 5b211ebae..7238b36d7 100644 --- a/modules/gfx/src/impl/mapped_property.cc +++ b/modules/gfx/src/impl/mapped_property.cc @@ -23,10 +23,10 @@ namespace ost { namespace gfx { namespace impl { -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED namespace { -float InterpolatedValue(const iplt::ImageHandle& mh, const geom::Vec3& xyz) +float InterpolatedValue(const img::ImageHandle& mh, const geom::Vec3& xyz) { geom::Vec3 uvw=mh.CoordToIndex(xyz); float x=fmod(float(uvw[0]), float(1.0)); @@ -38,14 +38,14 @@ float InterpolatedValue(const iplt::ImageHandle& mh, const geom::Vec3& xyz) float value=0.0; if(u<mh.GetSize()[0]-1 && v<mh.GetSize()[1]-1 && w<mh.GetSize()[2]-1) { - value=mh.GetReal(ost::iplt::Point(u,v,w))*(1.0-x)*(1.0-y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u+1,v,w))*(x)*(1.0-y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u,v+1,w))*(1.0-x)*(y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u,v,w+1))*(1.0-x)*(1.0-y)*(z)+ - mh.GetReal(ost::iplt::Point(u+1,v,w+1))*(x)*(1.0-y)*(z)+ - mh.GetReal(ost::iplt::Point(u,v+1,w+1))*(1.0-x)*(y)*(z)+ - mh.GetReal(ost::iplt::Point(u+1,v+1,w))*(x)*(y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u+1,v+1,w+1))*(x)*(y)*(z); + value=mh.GetReal(ost::img::Point(u,v,w))*(1.0-x)*(1.0-y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u+1,v,w))*(x)*(1.0-y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u,v+1,w))*(1.0-x)*(y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u,v,w+1))*(1.0-x)*(1.0-y)*(z)+ + mh.GetReal(ost::img::Point(u+1,v,w+1))*(x)*(1.0-y)*(z)+ + mh.GetReal(ost::img::Point(u,v+1,w+1))*(1.0-x)*(y)*(z)+ + mh.GetReal(ost::img::Point(u+1,v+1,w))*(x)*(y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u+1,v+1,w+1))*(x)*(y)*(z); } return static_cast<float>(value); } @@ -84,15 +84,15 @@ Color DLLEXPORT_OST_GFX MappedProperty(const mol::EntityView& ev, return nrvo; } -#if OST_IPLT_ENABLED -float DLLEXPORT_OST_GFX MappedProperty(const iplt::MapHandle& mh, +#if OST_IMG_ENABLED +float DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, const String& prop, const geom::Vec3& pos) { return InterpolatedValue(mh,pos); } -Color DLLEXPORT_OST_GFX MappedProperty(const iplt::MapHandle& mh, +Color DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, const String& prop, const Gradient& g, float minv, float maxv, const geom::Vec3& pos) diff --git a/modules/gfx/src/impl/mapped_property.hh b/modules/gfx/src/impl/mapped_property.hh index 50ea8cbc9..d98ec7f5c 100644 --- a/modules/gfx/src/impl/mapped_property.hh +++ b/modules/gfx/src/impl/mapped_property.hh @@ -24,8 +24,8 @@ */ #include <ost/mol/mol.hh> -#if OST_IPLT_ENABLED -#include <ost/iplt/map.hh> +#if OST_IMG_ENABLED +#include <ost/img/map.hh> #endif #include <ost/gfx/module_config.hh> @@ -50,11 +50,11 @@ 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_IPLT_ENABLED -float DLLEXPORT_OST_GFX MappedProperty(const iplt::MapHandle& mh, +#if OST_IMG_ENABLED +float DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, const String& prop, const geom::Vec3& pos); -Color DLLEXPORT_OST_GFX MappedProperty(const iplt::MapHandle& mh, +Color DLLEXPORT_OST_GFX MappedProperty(const img::MapHandle& mh, const String& prop, const Gradient& g, float minv, float maxv, const geom::Vec3& pos); diff --git a/modules/gfx/src/impl/octree_isocont.cc b/modules/gfx/src/impl/octree_isocont.cc index cd9899c72..1eea253b8 100644 --- a/modules/gfx/src/impl/octree_isocont.cc +++ b/modules/gfx/src/impl/octree_isocont.cc @@ -25,18 +25,18 @@ namespace ost { namespace gfx { namespace impl { -void OctreeIsocont::VisitLeaf(iplt::RealSpatialImageState* map, - const iplt::Point& point) +void OctreeIsocont::VisitLeaf(img::RealSpatialImageState* map, + const img::Point& point) { // if we get here we already know that we have to isocontour the damn // thing. - iplt::Point end=map->GetExtent().GetEnd(); + img::Point end=map->GetExtent().GetEnd(); if (point[0]>=end[0] || point[1]>=end[1] || point[2]>=end[2]) { return; } uint8_t pattern=0; for (int i=0; i<8; ++i) { - iplt::Point p=point+POINT_OFFSETS[i]; + img::Point p=point+POINT_OFFSETS[i]; if (map->Value(p)<level_) { pattern|=1<<i; } @@ -71,11 +71,11 @@ void OctreeIsocont::VisitLeaf(iplt::RealSpatialImageState* map, } -VertexID OctreeIsocont::GetOrGenVert(iplt::RealSpatialImageState* map, - const iplt::Point& p, +VertexID OctreeIsocont::GetOrGenVert(img::RealSpatialImageState* map, + const img::Point& p, EdgeDesc* desc) { - iplt::Extent ext=map->GetExtent(); + img::Extent ext=map->GetExtent(); uint32_t key=desc->GetKey(p, ext); EdgeMap::iterator k=edge_map_.find(key); if (k!=edge_map_.end()) { @@ -85,8 +85,8 @@ VertexID OctreeIsocont::GetOrGenVert(iplt::RealSpatialImageState* map, } return id; } - iplt::Point p1=p+OctreeIsocont::POINT_OFFSETS[desc->c1]; - iplt::Point p2=p+OctreeIsocont::POINT_OFFSETS[desc->c2]; + img::Point p1=p+OctreeIsocont::POINT_OFFSETS[desc->c1]; + img::Point p2=p+OctreeIsocont::POINT_OFFSETS[desc->c2]; geom::Vec3 vert1=map->IndexToCoord(p1); geom::Vec3 vert2=map->IndexToCoord(p2); float val1=map->Value(p1); @@ -99,24 +99,24 @@ VertexID OctreeIsocont::GetOrGenVert(iplt::RealSpatialImageState* map, } EdgeDesc OctreeIsocont::EDGE_DESC[12]={ - EdgeDesc(1, iplt::Point(0, 0, 0), 0, 1, true), - EdgeDesc(2, iplt::Point(1, 0, 0), 1, 2, false), - EdgeDesc(1, iplt::Point(0, 1, 0), 2, 3, false), - EdgeDesc(2, iplt::Point(0, 0, 0), 3, 0, true), - EdgeDesc(1, iplt::Point(0, 0, 1), 4, 5, false), - EdgeDesc(2, iplt::Point(1, 0, 1), 5, 6, false), - EdgeDesc(1, iplt::Point(0, 1, 1), 6, 7, false), - EdgeDesc(2, iplt::Point(0, 0, 1), 7, 4, false), - EdgeDesc(3, iplt::Point(0, 0, 0), 0, 4, true), - EdgeDesc(3, iplt::Point(1, 0, 0), 1, 5, false), - EdgeDesc(3, iplt::Point(1, 1, 0), 2, 6, false), - EdgeDesc(3, iplt::Point(0, 1, 0), 3, 7, false), + EdgeDesc(1, img::Point(0, 0, 0), 0, 1, true), + EdgeDesc(2, img::Point(1, 0, 0), 1, 2, false), + EdgeDesc(1, img::Point(0, 1, 0), 2, 3, false), + EdgeDesc(2, img::Point(0, 0, 0), 3, 0, true), + EdgeDesc(1, img::Point(0, 0, 1), 4, 5, false), + EdgeDesc(2, img::Point(1, 0, 1), 5, 6, false), + EdgeDesc(1, img::Point(0, 1, 1), 6, 7, false), + EdgeDesc(2, img::Point(0, 0, 1), 7, 4, false), + EdgeDesc(3, img::Point(0, 0, 0), 0, 4, true), + EdgeDesc(3, img::Point(1, 0, 0), 1, 5, false), + EdgeDesc(3, img::Point(1, 1, 0), 2, 6, false), + EdgeDesc(3, img::Point(0, 1, 0), 3, 7, false), }; -iplt::Point OctreeIsocont::POINT_OFFSETS[]={ - iplt::Point(0, 0, 0), iplt::Point(1, 0, 0), iplt::Point(1, 1, 0), - iplt::Point(0, 1, 0), iplt::Point(0, 0, 1), iplt::Point(1, 0, 1), - iplt::Point(1, 1, 1), iplt::Point(0, 1, 1) +img::Point OctreeIsocont::POINT_OFFSETS[]={ + img::Point(0, 0, 0), img::Point(1, 0, 0), img::Point(1, 1, 0), + img::Point(0, 1, 0), img::Point(0, 0, 1), img::Point(1, 0, 1), + img::Point(1, 1, 1), img::Point(0, 1, 1) }; int8_t OctreeIsocont::TRIANGLES[256][16]={ diff --git a/modules/gfx/src/impl/octree_isocont.hh b/modules/gfx/src/impl/octree_isocont.hh index b7e5f80b2..913de29c9 100644 --- a/modules/gfx/src/impl/octree_isocont.hh +++ b/modules/gfx/src/impl/octree_isocont.hh @@ -24,8 +24,8 @@ */ #include <boost/unordered_map.hpp> -#include <ost/iplt/image_handle.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/image_handle.hh> +#include <ost/img/image_state.hh> #include <ost/gfx/module_config.hh> #include <ost/gfx/vertex_array.hh> #include <ost/gfx/impl/map_octree.hh> @@ -33,17 +33,17 @@ namespace ost { namespace gfx { namespace impl { struct EdgeDesc { - EdgeDesc(uint8_t d, const iplt::Point& o, + EdgeDesc(uint8_t d, const img::Point& o, uint8_t ac1, uint8_t ac2, bool l): dir(d), off(o), c1(ac1), c2(ac2), lv(l) { } - uint32_t GetKey(const iplt::Point& p, iplt::Extent& ext) + uint32_t GetKey(const img::Point& p, img::Extent& ext) { - iplt::Point k=p+off; + img::Point k=p+off; return 4*ext.Point2Offset(k)+dir; } uint8_t dir; - iplt::Point off; + img::Point off; uint8_t c1; uint8_t c2; bool lv; @@ -54,7 +54,7 @@ struct EdgeDesc { struct DLLEXPORT_OST_GFX OctreeIsocont { private: static uint16_t EDGE_FLAGS[]; - static iplt::Point POINT_OFFSETS[]; + static img::Point POINT_OFFSETS[]; static int8_t TRIANGLES[256][16]; static EdgeDesc EDGE_DESC[12]; public: @@ -63,14 +63,14 @@ public: va_(va), level_(level), triangles_(triangles) { } bool VisitNode(const impl::OctreeNode& node, uint8_t level, - const iplt::Extent& ext) + const img::Extent& ext) { return (node.GetMin()<level_ && level_<=node.GetMax()); } - void VisitLeaf(iplt::RealSpatialImageState* map, - const iplt::Point& point); + void VisitLeaf(img::RealSpatialImageState* map, + const img::Point& point); - VertexID GetOrGenVert(iplt::RealSpatialImageState* map, const iplt::Point& p, + VertexID GetOrGenVert(img::RealSpatialImageState* map, const img::Point& p, EdgeDesc* desc); private: IndexedVertexArray& va_; diff --git a/modules/gfx/src/impl/trace_renderer_base.cc b/modules/gfx/src/impl/trace_renderer_base.cc index 3783de35f..ca2e991c1 100644 --- a/modules/gfx/src/impl/trace_renderer_base.cc +++ b/modules/gfx/src/impl/trace_renderer_base.cc @@ -217,11 +217,11 @@ void TraceRendererBase::PickBond(const geom::Line3& line, Real line_width, // don't to anything } -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED void TraceRendererBase::Apply(const gfx::MapHandleColorOp& op) { this->UpdateViews(); - iplt::MapHandle mh = op.GetMapHandle(); + img::MapHandle mh = op.GetMapHandle(); gfx::Gradient g = op.GetGradient(); const String& prop = op.GetProperty(); float minv = op.GetMinV(); diff --git a/modules/gfx/src/impl/trace_renderer_base.hh b/modules/gfx/src/impl/trace_renderer_base.hh index 2873980a9..68172d62f 100644 --- a/modules/gfx/src/impl/trace_renderer_base.hh +++ b/modules/gfx/src/impl/trace_renderer_base.hh @@ -50,7 +50,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_IPLT_ENABLED +#if OST_IMG_ENABLED virtual void Apply(const gfx::MapHandleColorOp& op); #endif diff --git a/modules/gfx/src/map_iso.cc b/modules/gfx/src/map_iso.cc index 2f0ffbb71..f0c07cf64 100644 --- a/modules/gfx/src/map_iso.cc +++ b/modules/gfx/src/map_iso.cc @@ -24,7 +24,7 @@ #include <ost/profile.hh> #include <ost/profile.hh> #include <ost/base.hh> -#include <ost/iplt/alg/stat.hh> +#include <ost/img/alg/stat.hh> #include "gl_helper.hh" #include "glext_include.hh" @@ -45,7 +45,7 @@ namespace ost { namespace gfx { -MapIso::MapIso(const String& name, const iplt::MapHandle& mh, float level): +MapIso::MapIso(const String& name, const img::MapHandle& mh, float level): GfxObj(name), mh_(mh), octree_(mh), @@ -65,7 +65,7 @@ MapIso::MapIso(const String& name, const iplt::MapHandle& mh, float level): Rebuild(); } -MapIso::MapIso(const String& name, const iplt::MapHandle& mh, +MapIso::MapIso(const String& name, const img::MapHandle& mh, float level, uint a): GfxObj(name), mh_(mh), @@ -138,7 +138,7 @@ struct OctreeDebugger { level_(level), scale_(scale) { } bool VisitNode(const impl::OctreeNode& node, uint8_t level, - const iplt::Extent& ext) + const img::Extent& ext) { if (node.GetMin()>level_ || node.GetMax()<level_) { return false; @@ -185,8 +185,8 @@ struct OctreeDebugger { glEnd(); } - void VisitLeaf(iplt::RealSpatialImageState* map, - const iplt::Point& point) + void VisitLeaf(img::RealSpatialImageState* map, + const img::Point& point) { glColor3f(1.0, 1.0, 0.0); geom::Vec3 s=CompMultiply(point.ToVec3(), scale_); @@ -211,8 +211,8 @@ void MapIso::CustomRenderGL(RenderPass pass) case STANDARD_RENDER_PASS: va_.RenderGL(); if (debug_octree_) { - OctreeDebugger d(level_, mh_.IndexToCoord(iplt::Point(1,1,1))- - mh_.IndexToCoord(iplt::Point(0,0,0))); + OctreeDebugger d(level_, mh_.IndexToCoord(img::Point(1,1,1))- + mh_.IndexToCoord(img::Point(0,0,0))); glPushAttrib(GL_ENABLE_BIT); glDisable(GL_LIGHTING); octree_.VisitDF(d); @@ -264,14 +264,14 @@ float MapIso::GetLevel() const float MapIso::GetStdDev() const { - iplt::alg::Stat stat; + img::alg::Stat stat; mh_.Apply(stat); return stat.GetStandardDeviation(); } float MapIso::GetMean() const { - iplt::alg::Stat stat; + img::alg::Stat stat; mh_.Apply(stat); return static_cast<float>(stat.GetMean()); } diff --git a/modules/gfx/src/map_iso.hh b/modules/gfx/src/map_iso.hh index e166d260d..445559158 100644 --- a/modules/gfx/src/map_iso.hh +++ b/modules/gfx/src/map_iso.hh @@ -25,7 +25,7 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> #include <ost/gfx/impl/map_octree.hh> #include "gfx_object.hh" #include "map_iso_prop.hh" @@ -35,7 +35,7 @@ namespace ost { namespace gfx { class MapIso; typedef boost::shared_ptr<MapIso> MapIsoP; -/// \brief isocontour rendering for \ref iplt::ImageHandle "3D image data" +/// \brief isocontour rendering for \ref img::ImageHandle "3D image data" /// /// Two render modes are supported: gfx::RenderMode::SIMPLE renders the map in /// wireframe mode, gfx::RenderMode::FILL renders a shaded isocontoured map. @@ -43,9 +43,9 @@ typedef boost::shared_ptr<MapIso> MapIsoP; /// \sa gfx::MapSlab class DLLEXPORT_OST_GFX MapIso: public GfxObj { public: - MapIso(const ost::String& name, const iplt::MapHandle& mh,float level); + MapIso(const ost::String& name, const img::MapHandle& mh,float level); - MapIso(const ost::String& name, const iplt::MapHandle& mh, + MapIso(const ost::String& name, const img::MapHandle& mh, float level, uint a); virtual geom::AlignedCuboid GetBoundingBox() const; @@ -82,7 +82,7 @@ protected: virtual void CustomPreRenderGL(bool flag); private: - iplt::MapHandle mh_; + img::MapHandle mh_; impl::MapOctree octree_; float level_; bool normals_calculated_; diff --git a/modules/gfx/src/map_slab.cc b/modules/gfx/src/map_slab.cc index a01e63fe6..60775444c 100644 --- a/modules/gfx/src/map_slab.cc +++ b/modules/gfx/src/map_slab.cc @@ -23,7 +23,7 @@ #include <ost/log.hh> #include <ost/profile.hh> -#include <ost/iplt/alg/stat.hh> +#include <ost/img/alg/stat.hh> #include "gl_helper.hh" @@ -33,7 +33,7 @@ namespace { - float InterpolatedValue(const ost::iplt::ImageHandle& mh, const geom::Vec3& xyz) + float InterpolatedValue(const ost::img::ImageHandle& mh, const geom::Vec3& xyz) { geom::Vec3 uvw=mh.CoordToIndex(xyz); float x=fmod(float(uvw[0]), float(1.0)); @@ -45,14 +45,14 @@ namespace { float value=0.0; if(u<mh.GetSize()[0]-1 && v<mh.GetSize()[1]-1 && w<mh.GetSize()[2]-1) { - value=mh.GetReal(ost::iplt::Point(u,v,w))*(1.0-x)*(1.0-y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u+1,v,w))*(x)*(1.0-y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u,v+1,w))*(1.0-x)*(y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u,v,w+1))*(1.0-x)*(1.0-y)*(z)+ - mh.GetReal(ost::iplt::Point(u+1,v,w+1))*(x)*(1.0-y)*(z)+ - mh.GetReal(ost::iplt::Point(u,v+1,w+1))*(1.0-x)*(y)*(z)+ - mh.GetReal(ost::iplt::Point(u+1,v+1,w))*(x)*(y)*(1.0-z)+ - mh.GetReal(ost::iplt::Point(u+1,v+1,w+1))*(x)*(y)*(z); + value=mh.GetReal(ost::img::Point(u,v,w))*(1.0-x)*(1.0-y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u+1,v,w))*(x)*(1.0-y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u,v+1,w))*(1.0-x)*(y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u,v,w+1))*(1.0-x)*(1.0-y)*(z)+ + mh.GetReal(ost::img::Point(u+1,v,w+1))*(x)*(1.0-y)*(z)+ + mh.GetReal(ost::img::Point(u,v+1,w+1))*(1.0-x)*(y)*(z)+ + mh.GetReal(ost::img::Point(u+1,v+1,w))*(x)*(y)*(1.0-z)+ + mh.GetReal(ost::img::Point(u+1,v+1,w+1))*(x)*(y)*(z); } return static_cast<float>(value); } @@ -62,7 +62,7 @@ namespace ost { namespace gfx { -MapSlab::MapSlab(const String& name, const iplt::MapHandle& mh, const geom::Plane& p): +MapSlab::MapSlab(const String& name, const img::MapHandle& mh, const geom::Plane& p): GfxObj(name), mh_(mh), plane_(p), @@ -78,7 +78,7 @@ MapSlab::MapSlab(const String& name, const iplt::MapHandle& mh, const geom::Plan grad_.SetColorAt(0.0, Color(0,0,0)); grad_.SetColorAt(1.0, Color(1,1,1)); Rebuild(); - iplt::alg::Stat stat; + img::alg::Stat stat; mh_.Apply(stat); minv_ = stat.GetMinimum(); maxv_ = stat.GetMaximum(); @@ -155,7 +155,7 @@ void MapSlab::ColorBy(const Gradient& g, float minv, float maxv) void MapSlab::ColorBy(const Gradient& g) { grad_=g; - ost::iplt::alg::Stat stat; + ost::img::alg::Stat stat; mh_.Apply(stat); minv_=stat.GetMinimum(); maxv_=stat.GetMaximum(); diff --git a/modules/gfx/src/map_slab.hh b/modules/gfx/src/map_slab.hh index cc2654fb5..fc93c46d3 100644 --- a/modules/gfx/src/map_slab.hh +++ b/modules/gfx/src/map_slab.hh @@ -28,7 +28,7 @@ #include <ost/geom/geom.hh> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> #include <ost/gfx/gl_include.hh> #include "gfx_object.hh" @@ -38,9 +38,9 @@ namespace ost { namespace gfx { class MapSlab; typedef boost::shared_ptr<MapSlab> MapSlabP; -/// \brief Render slice of \ref iplt::ImageHandle "3d image" +/// \brief Render slice of \ref img::ImageHandle "3d image" /// -/// A slab is a planar slice through a \ref iplt::ImageHandle "3D map". Its +/// A slab is a planar slice through a \ref img::ImageHandle "3D map". Its /// orientation is defined by a \ref geom::Plane "plane". The value range and /// coloring of the slab can be adjusted with the ColorBy() methods. class DLLEXPORT_OST_GFX MapSlab: public GfxObj { @@ -59,7 +59,7 @@ public: /// \param name is the name of the object /// \param mh is a 3D image /// \param p is the plane that is intersected with \a mh - MapSlab(const ost::String& name, const iplt::MapHandle& mh, + MapSlab(const ost::String& name, const img::MapHandle& mh, const geom::Plane& p); virtual geom::AlignedCuboid GetBoundingBox() const; @@ -94,7 +94,7 @@ protected: void Rebuild(); private: - iplt::MapHandle mh_; + img::MapHandle mh_; geom::Plane plane_; uint usize_; uint vsize_; diff --git a/modules/gfx/src/surface.cc b/modules/gfx/src/surface.cc index 103d7032b..9ded3f6a0 100644 --- a/modules/gfx/src/surface.cc +++ b/modules/gfx/src/surface.cc @@ -183,8 +183,8 @@ void Surface::ColorBy(const mol::EntityView& ev, EntityViewColorOp evop = EntityViewColorOp(prop, g,minv,maxv,ev); this->Apply(evop); } -#if OST_IPLT_ENABLED -void Surface::ColorBy(const iplt::MapHandle& mh, +#if OST_IMG_ENABLED +void Surface::ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv) { @@ -192,7 +192,7 @@ void Surface::ColorBy(const iplt::MapHandle& mh, this->Apply(mhop); } -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED namespace { @@ -333,13 +333,13 @@ void Surface::Apply(const gfx::EntityViewColorOp& op, bool store){ FlagRefresh(); } -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED void Surface::Apply(const gfx::MapHandleColorOp& op, bool store){ if(store){ MapHandleColorOp* op_ptr = new MapHandleColorOp(op); this->AppendColorOp(op_ptr); } - const iplt::MapHandle& mh = op.GetMapHandle(); + const img::MapHandle& mh = op.GetMapHandle(); const String& prop = op.GetProperty(); const Gradient& g = op.GetGradient(); float minv = op.GetMinV(); @@ -349,7 +349,7 @@ void Surface::Apply(const gfx::MapHandleColorOp& op, bool store){ } FlagRefresh(); } -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED void Surface::CleanColorOps(){ GfxObj::CleanColorOps(); diff --git a/modules/gfx/src/surface.hh b/modules/gfx/src/surface.hh index 6a93ecb98..186d41dc2 100644 --- a/modules/gfx/src/surface.hh +++ b/modules/gfx/src/surface.hh @@ -38,9 +38,9 @@ #include <ost/gfx/color_ops/gradient_level_color_op.hh> #include <ost/gfx/color_ops/entity_view_color_op.hh> -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED #include <ost/gfx/color_ops/map_handle_color_op.hh> -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED namespace ost { namespace gfx { @@ -69,12 +69,12 @@ public: virtual void ColorBy(const mol::EntityView& ev, const String& prop, const Gradient& g, float minv, float maxv); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED // GfxObj property interface - virtual void ColorBy(const iplt::MapHandle& mh, + virtual void ColorBy(const img::MapHandle& mh, const String& prop, const Gradient& g,float minv, float maxv); -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED // map property to color gradient from minv to maxv void ColorBy(const String& prop, @@ -103,7 +103,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_IPLT_ENABLED +#if OST_IMG_ENABLED void Apply(const gfx::MapHandleColorOp& op, bool store=true); #endif diff --git a/modules/gfx/tests/test_map_octree.cc b/modules/gfx/tests/test_map_octree.cc index d468788af..819b38618 100644 --- a/modules/gfx/tests/test_map_octree.cc +++ b/modules/gfx/tests/test_map_octree.cc @@ -22,8 +22,8 @@ */ #include <boost/test/unit_test.hpp> -#include <ost/iplt/image_handle.hh> -#include <ost/iplt/image_factory.hh> +#include <ost/img/image_handle.hh> +#include <ost/img/image_factory.hh> #include <ost/gfx/impl/map_octree.hh> using boost::unit_test_framework::test_suite; @@ -37,7 +37,7 @@ struct Pow2Vis { leaf_count(0), node_count(0) { } bool VisitNode(const OctreeNode& node, uint8_t level, - const iplt::Extent& ext) + const img::Extent& ext) { BOOST_CHECK_EQUAL(level, 0); BOOST_CHECK_EQUAL(node.GetMax(), 64.0f); @@ -45,8 +45,8 @@ struct Pow2Vis { node_count++; return true; } - void VisitLeaf(iplt::RealSpatialImageState* map, - const iplt::Point& point) + void VisitLeaf(img::RealSpatialImageState* map, + const img::Point& point) { leaf_count++; } @@ -59,7 +59,7 @@ struct NonPow2Vis { leaf_count(0), node_count(0) { } bool VisitNode(const OctreeNode& node, uint8_t level, - const iplt::Extent& ext) + const img::Extent& ext) { node_count++; if (level==0) { @@ -70,12 +70,12 @@ struct NonPow2Vis { if (level==1) { switch(node_count) { case 2: - BOOST_CHECK_EQUAL(ext, iplt::Extent(iplt::Point(0,0,0), - iplt::Point(3,1,1))); + BOOST_CHECK_EQUAL(ext, img::Extent(img::Point(0,0,0), + img::Point(3,1,1))); break; case 5: - BOOST_CHECK_EQUAL(ext, iplt::Extent(iplt::Point(4,0,0), - iplt::Point(4,1,1))); + BOOST_CHECK_EQUAL(ext, img::Extent(img::Point(4,0,0), + img::Point(4,1,1))); break; default: BOOST_FAIL("unexpected node"); @@ -83,71 +83,71 @@ struct NonPow2Vis { } return true; } - void VisitLeaf(iplt::RealSpatialImageState* map, - const iplt::Point& point) + void VisitLeaf(img::RealSpatialImageState* map, + const img::Point& point) { leaf_count++; // z-coordinate of pixels change fastest, followed by y and then x. switch (leaf_count) { case 1: - BOOST_CHECK_EQUAL(point, iplt::Point(0,0,0)); + BOOST_CHECK_EQUAL(point, img::Point(0,0,0)); break; case 2: - BOOST_CHECK_EQUAL(point, iplt::Point(0,0,1)); + BOOST_CHECK_EQUAL(point, img::Point(0,0,1)); break; case 3: - BOOST_CHECK_EQUAL(point, iplt::Point(0,1,0)); + BOOST_CHECK_EQUAL(point, img::Point(0,1,0)); break; case 4: - BOOST_CHECK_EQUAL(point, iplt::Point(0,1,1)); + BOOST_CHECK_EQUAL(point, img::Point(0,1,1)); break; case 5: - BOOST_CHECK_EQUAL(point, iplt::Point(1,0,0)); + BOOST_CHECK_EQUAL(point, img::Point(1,0,0)); break; case 6: - BOOST_CHECK_EQUAL(point, iplt::Point(1,0,1)); + BOOST_CHECK_EQUAL(point, img::Point(1,0,1)); break; case 7: - BOOST_CHECK_EQUAL(point, iplt::Point(1,1,0)); + BOOST_CHECK_EQUAL(point, img::Point(1,1,0)); break; case 8: - BOOST_CHECK_EQUAL(point, iplt::Point(1,1,1)); + BOOST_CHECK_EQUAL(point, img::Point(1,1,1)); break; case 9: - BOOST_CHECK_EQUAL(point, iplt::Point(2,0,0)); + BOOST_CHECK_EQUAL(point, img::Point(2,0,0)); break; case 10: - BOOST_CHECK_EQUAL(point, iplt::Point(2,0,1)); + BOOST_CHECK_EQUAL(point, img::Point(2,0,1)); break; case 11: - BOOST_CHECK_EQUAL(point, iplt::Point(2,1,0)); + BOOST_CHECK_EQUAL(point, img::Point(2,1,0)); break; case 12: - BOOST_CHECK_EQUAL(point, iplt::Point(2,1,1)); + BOOST_CHECK_EQUAL(point, img::Point(2,1,1)); break; case 13: - BOOST_CHECK_EQUAL(point, iplt::Point(3,0,0)); + BOOST_CHECK_EQUAL(point, img::Point(3,0,0)); break; case 14: - BOOST_CHECK_EQUAL(point, iplt::Point(3,0,1)); + BOOST_CHECK_EQUAL(point, img::Point(3,0,1)); break; case 15: - BOOST_CHECK_EQUAL(point, iplt::Point(3,1,0)); + BOOST_CHECK_EQUAL(point, img::Point(3,1,0)); break; case 16: - BOOST_CHECK_EQUAL(point, iplt::Point(3,1,1)); + BOOST_CHECK_EQUAL(point, img::Point(3,1,1)); break; case 17: - BOOST_CHECK_EQUAL(point, iplt::Point(4,0,0)); + BOOST_CHECK_EQUAL(point, img::Point(4,0,0)); break; case 18: - BOOST_CHECK_EQUAL(point, iplt::Point(4,0,1)); + BOOST_CHECK_EQUAL(point, img::Point(4,0,1)); break; case 19: - BOOST_CHECK_EQUAL(point, iplt::Point(4,1,0)); + BOOST_CHECK_EQUAL(point, img::Point(4,1,0)); break; case 20: - BOOST_CHECK_EQUAL(point, iplt::Point(4,1,1)); + BOOST_CHECK_EQUAL(point, img::Point(4,1,1)); break; default: BOOST_FAIL("should never get here"); @@ -163,15 +163,15 @@ BOOST_AUTO_TEST_SUITE(gfx) BOOST_AUTO_TEST_CASE(octree_power_of_two) { - iplt::ImageHandle img=iplt::CreateImage(iplt::Size(2, 2, 2)); - img.SetReal(iplt::Point(0, 0, 0), 1.0f); - img.SetReal(iplt::Point(1, 0, 0), 2.0f); - img.SetReal(iplt::Point(1, 1, 0), 4.0f); - img.SetReal(iplt::Point(1, 0, 1), 8.0f); - img.SetReal(iplt::Point(1, 1, 1), 16.0f); - img.SetReal(iplt::Point(0, 1, 1), 32.0f); - img.SetReal(iplt::Point(0, 1, 0), 64.0f); - img.SetReal(iplt::Point(0, 0, 1), 0.5f); + img::ImageHandle img=img::CreateImage(img::Size(2, 2, 2)); + img.SetReal(img::Point(0, 0, 0), 1.0f); + img.SetReal(img::Point(1, 0, 0), 2.0f); + img.SetReal(img::Point(1, 1, 0), 4.0f); + img.SetReal(img::Point(1, 0, 1), 8.0f); + img.SetReal(img::Point(1, 1, 1), 16.0f); + img.SetReal(img::Point(0, 1, 1), 32.0f); + img.SetReal(img::Point(0, 1, 0), 64.0f); + img.SetReal(img::Point(0, 0, 1), 0.5f); Pow2Vis v; MapOctree octree(img); octree.VisitDF(v); @@ -181,15 +181,15 @@ BOOST_AUTO_TEST_CASE(octree_power_of_two) BOOST_AUTO_TEST_CASE(octree_non_power_of_two) { - iplt::ImageHandle img=iplt::CreateImage(iplt::Size(5, 2, 2)); - img.SetReal(iplt::Point(0, 0, 0), 1.0f); - img.SetReal(iplt::Point(1, 0, 0), 2.0f); - img.SetReal(iplt::Point(1, 1, 0), 4.0f); - img.SetReal(iplt::Point(1, 0, 1), 8.0f); - img.SetReal(iplt::Point(1, 1, 1), 16.0f); - img.SetReal(iplt::Point(0, 1, 1), 32.0f); - img.SetReal(iplt::Point(0, 1, 0), 64.0f); - img.SetReal(iplt::Point(0, 0, 1), 0.5f); + img::ImageHandle img=img::CreateImage(img::Size(5, 2, 2)); + img.SetReal(img::Point(0, 0, 0), 1.0f); + img.SetReal(img::Point(1, 0, 0), 2.0f); + img.SetReal(img::Point(1, 1, 0), 4.0f); + img.SetReal(img::Point(1, 0, 1), 8.0f); + img.SetReal(img::Point(1, 1, 1), 16.0f); + img.SetReal(img::Point(0, 1, 1), 32.0f); + img.SetReal(img::Point(0, 1, 0), 64.0f); + img.SetReal(img::Point(0, 0, 1), 0.5f); NonPow2Vis v; MapOctree octree(img); octree.VisitDF(v); diff --git a/modules/gui/pymod/CMakeLists.txt b/modules/gui/pymod/CMakeLists.txt index 8665442c9..b39ad8df5 100644 --- a/modules/gui/pymod/CMakeLists.txt +++ b/modules/gui/pymod/CMakeLists.txt @@ -55,7 +55,7 @@ loader_manager_widget.py immutable_loader_info_handler.py line_trace_widget.py ) -if (ENABLE_IPLT) +if (ENABLE_IMG) list(APPEND OST_GUI_PYMOD_SOURCES data_viewer_proxy.cc export_data_viewer.cc diff --git a/modules/gui/pymod/data_viewer_proxy.cc b/modules/gui/pymod/data_viewer_proxy.cc index 2cf0d5240..23551d127 100644 --- a/modules/gui/pymod/data_viewer_proxy.cc +++ b/modules/gui/pymod/data_viewer_proxy.cc @@ -27,10 +27,10 @@ #include "data_viewer_proxy.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { DataViewerProxy::DataViewerProxy(DataViewer* v): - ost::gui::SipHandler<ost::iplt::gui::DataViewer>(v) + ost::gui::SipHandler<ost::img::gui::DataViewer>(v) {} diff --git a/modules/gui/pymod/data_viewer_proxy.hh b/modules/gui/pymod/data_viewer_proxy.hh index 7e34d2962..aaf21719c 100644 --- a/modules/gui/pymod/data_viewer_proxy.hh +++ b/modules/gui/pymod/data_viewer_proxy.hh @@ -29,9 +29,9 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/point.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/normalizer_impl.hh> +#include <ost/img/point.hh> +#include <ost/img/extent.hh> +#include <ost/img/normalizer_impl.hh> #include <ost/gui/data_viewer/overlay_base_fw.hh> #include <ost/gui/data_viewer/overlay_manager_fw.hh> @@ -43,7 +43,7 @@ class QWidget; class QString; -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { // fw decl class DataViewer; diff --git a/modules/gui/pymod/export_data_viewer.cc b/modules/gui/pymod/export_data_viewer.cc index d5ddbfd2d..e3ddea39f 100644 --- a/modules/gui/pymod/export_data_viewer.cc +++ b/modules/gui/pymod/export_data_viewer.cc @@ -29,9 +29,9 @@ #include <ost/gui/data_viewer/overlay_manager.hh> using namespace boost::python; -using namespace ost::iplt; +using namespace ost::img; using namespace ost; -using namespace ost::iplt::gui; +using namespace ost::img::gui; namespace { diff --git a/modules/gui/pymod/export_gosty.cc b/modules/gui/pymod/export_gosty.cc index fd1971d10..a29bbab70 100644 --- a/modules/gui/pymod/export_gosty.cc +++ b/modules/gui/pymod/export_gosty.cc @@ -33,9 +33,9 @@ using namespace boost::python; #include "gl_win_proxy.hh" #include "scene_win_proxy.hh" #include "sequence_viewer_proxy.hh" -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED #include "data_viewer_proxy.hh" -using namespace ost::iplt::gui; +using namespace ost::img::gui; #endif using namespace ost; @@ -68,12 +68,12 @@ SequenceViewerProxy app_get_seq_viewer(GostyApp* app) return SequenceViewerProxy(app->GetSequenceViewer()); } -#if OST_IPLT_ENABLED -DataViewerProxyPtr app_create_data_viewer1(GostyApp* app, const ost::iplt::Data& d, const QString& name) +#if OST_IMG_ENABLED +DataViewerProxyPtr app_create_data_viewer1(GostyApp* app, const ost::img::Data& d, const QString& name) { return DataViewerProxyPtr(new DataViewerProxy(app->CreateDataViewer(d,name))); } -DataViewerProxyPtr app_create_data_viewer2(GostyApp* app, const ost::iplt::Data& d) +DataViewerProxyPtr app_create_data_viewer2(GostyApp* app, const ost::img::Data& d) { return DataViewerProxyPtr(new DataViewerProxy(app->CreateDataViewer(d))); } @@ -107,7 +107,7 @@ void export_Gosty() .add_property("seq_viewer", &app_get_seq_viewer) .def("GetToolOptionsWin", &app_get_tool_options_win) .add_property("tool_options_win", &app_get_tool_options_win) - #if OST_IPLT_ENABLED + #if OST_IMG_ENABLED .def("CreateDataViewer", &app_create_data_viewer1) .def("CreateDataViewer", &app_create_data_viewer2) #endif diff --git a/modules/gui/pymod/wrap_gui.cc b/modules/gui/pymod/wrap_gui.cc index f0f5955a0..15a615e95 100644 --- a/modules/gui/pymod/wrap_gui.cc +++ b/modules/gui/pymod/wrap_gui.cc @@ -44,7 +44,7 @@ void export_FileLoader(); void export_Widget(); -#ifdef OST_IPLT_ENABLED +#ifdef OST_IMG_ENABLED void export_data_viewer(); #endif @@ -116,7 +116,7 @@ BOOST_PYTHON_MODULE(_gui) export_FileLoader(); export_Widget(); - #if OST_IPLT_ENABLED + #if OST_IMG_ENABLED export_data_viewer(); #endif } diff --git a/modules/gui/src/CMakeLists.txt b/modules/gui/src/CMakeLists.txt index 22c03248a..6857779b6 100644 --- a/modules/gui/src/CMakeLists.txt +++ b/modules/gui/src/CMakeLists.txt @@ -94,7 +94,7 @@ plot_viewer_proxy.hh plot_viewer_proxy_fw.hh ) -if (ENABLE_IPLT) +if (ENABLE_IMG) set(OST_GUI_DATA_VIEWER_HEADERS argand.hh data_viewer.hh @@ -104,7 +104,7 @@ if (ENABLE_IPLT) drawing_functions.hh fft_panel.hh info_panel.hh - iplt2qt.hh + img2qt.hh mask_overlay.hh null_overlay.hh overlay.hh @@ -323,7 +323,7 @@ tools/tool_manager.hh tools/tool_options_widget.hh tools/tool_options_win.hh ) -if (ENABLE_IPLT) +if (ENABLE_IMG) list(APPEND OST_GUI_TOOLS_HEADERS map_tool.hh) list(APPEND OST_GUI_SOURCES tools/map_tool.cc @@ -335,7 +335,7 @@ if (ENABLE_IPLT) data_viewer/drawing_functions.cc data_viewer/fft_panel.cc data_viewer/info_panel.cc - data_viewer/iplt2qt.cc + data_viewer/img2qt.cc data_viewer/mask_overlay.cc data_viewer/null_overlay.cc data_viewer/overlay_base.cc diff --git a/modules/gui/src/data_viewer/argand.cc b/modules/gui/src/data_viewer/argand.cc index 65d7dfb6c..7c536a360 100644 --- a/modules/gui/src/data_viewer/argand.cc +++ b/modules/gui/src/data_viewer/argand.cc @@ -29,7 +29,7 @@ #include "argand.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { Argand::Argand(const Data& data, QWidget* p): QWidget(p), diff --git a/modules/gui/src/data_viewer/argand.hh b/modules/gui/src/data_viewer/argand.hh index 2cb17efa0..cc337c661 100644 --- a/modules/gui/src/data_viewer/argand.hh +++ b/modules/gui/src/data_viewer/argand.hh @@ -29,13 +29,13 @@ #include <QPixmap> #include <ost/base.hh> -#include <ost/iplt/data.hh> -#include <ost/iplt/data_observer.hh> -#include <ost/iplt/extent.hh> +#include <ost/img/data.hh> +#include <ost/img/data_observer.hh> +#include <ost/img/extent.hh> #include <ost/gui/module_config.hh> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI Argand: public QWidget, public DataObserver { diff --git a/modules/gui/src/data_viewer/data_viewer.cc b/modules/gui/src/data_viewer/data_viewer.cc index a25d8109b..a02a2f862 100644 --- a/modules/gui/src/data_viewer/data_viewer.cc +++ b/modules/gui/src/data_viewer/data_viewer.cc @@ -37,10 +37,10 @@ #include <QApplication> #include <QDesktopWidget> -//#include <ost/iplt/io/io_manager.hh> +//#include <ost/img/io/io_manager.hh> #include <ost/message.hh> -//#include <ost/iplt/alg/fft.hh> -#include <ost/iplt/alg/norm.hh> +//#include <ost/img/alg/fft.hh> +#include <ost/img/alg/norm.hh> #include <ost/gui/dock_widget.hh> #include "data_viewer.hh" @@ -48,7 +48,7 @@ #include "overlay_base.hh" #include "overlay_manager.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { namespace { int ipow(int base, unsigned int exponent){ diff --git a/modules/gui/src/data_viewer/data_viewer.hh b/modules/gui/src/data_viewer/data_viewer.hh index 7d2efc4cc..c53ffcb0d 100644 --- a/modules/gui/src/data_viewer/data_viewer.hh +++ b/modules/gui/src/data_viewer/data_viewer.hh @@ -28,9 +28,9 @@ #include <map> #include <ost/base.hh> -#include <ost/iplt/data.hh> -#include <ost/iplt/data_observer.hh> -#include <ost/iplt/alg/norm.hh> +#include <ost/img/data.hh> +#include <ost/img/data_observer.hh> +#include <ost/img/alg/norm.hh> #include <ost/gui/main_window.hh> @@ -51,7 +51,7 @@ namespace gui { class GostyApp; } //ns -namespace iplt { namespace gui { +namespace img { namespace gui { //fw decl class DataViewerPanel; diff --git a/modules/gui/src/data_viewer/data_viewer_panel.cc b/modules/gui/src/data_viewer/data_viewer_panel.cc index eb6cf5504..b3fd252dd 100644 --- a/modules/gui/src/data_viewer/data_viewer_panel.cc +++ b/modules/gui/src/data_viewer/data_viewer_panel.cc @@ -19,7 +19,7 @@ //------------------------------------------------------------------------------ #include "data_viewer_panel.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { DataViewerPanel::DataViewerPanel(const Data& d, QWidget* p): DataViewerPanelBase(d,p) diff --git a/modules/gui/src/data_viewer/data_viewer_panel.hh b/modules/gui/src/data_viewer/data_viewer_panel.hh index dcca4e356..93633bb6f 100644 --- a/modules/gui/src/data_viewer/data_viewer_panel.hh +++ b/modules/gui/src/data_viewer/data_viewer_panel.hh @@ -23,7 +23,7 @@ #include <ost/gui/module_config.hh> #include "data_viewer_panel_base.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI DataViewerPanel: public DataViewerPanelBase { diff --git a/modules/gui/src/data_viewer/data_viewer_panel_base.cc b/modules/gui/src/data_viewer/data_viewer_panel_base.cc index d3c4b08e8..ecb6636d1 100644 --- a/modules/gui/src/data_viewer/data_viewer_panel_base.cc +++ b/modules/gui/src/data_viewer/data_viewer_panel_base.cc @@ -22,8 +22,8 @@ Authors: Ansgar Philippsen, Johan Hebert, Andreas Schenk */ -#include <ost/iplt/alg/norm.hh> -#include <ost/iplt/alg/stat_min_max.hh> +#include <ost/img/alg/norm.hh> +#include <ost/img/alg/stat_min_max.hh> //#include "bitmaps/move.xpm" //#include "bitmaps/crosshair.xpm" @@ -37,12 +37,12 @@ #include <QPixmapCache> #include <ost/message.hh> -#include "iplt2qt.hh" +#include "img2qt.hh" #include "data_viewer_panel_base.hh" #define USE_PIXMAP_CACHE -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { DataViewerPanelBase::DataViewerPanelBase(const Data& data,QWidget* parent): QWidget(parent), @@ -801,7 +801,7 @@ void DataViewerPanelBase::extract_ri() std::min(w,std::max(0,br.x()-1)),std::min(h,std::max(0,br.y()-1))); }else{ if(zoom_level_==0) { - iplt2qt(GetObservedData(),image_, + img2qt(GetObservedData(),image_, zoom_level_, geom::Vec3(center_x_+offset_x_, center_y_+offset_y_, 0.0), slab_, diff --git a/modules/gui/src/data_viewer/data_viewer_panel_base.hh b/modules/gui/src/data_viewer/data_viewer_panel_base.hh index 01468fcec..875436dfe 100644 --- a/modules/gui/src/data_viewer/data_viewer_panel_base.hh +++ b/modules/gui/src/data_viewer/data_viewer_panel_base.hh @@ -37,17 +37,17 @@ #include <ost/base.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/raster_image/raster_image.hh> +#include <ost/img/extent.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/raster_image/raster_image.hh> #include <ost/gui/module_config.hh> #include <ost/gui/data_viewer/viewer_normalizer.hh> -#include <ost/iplt/normalizer_impl.hh> +#include <ost/img/normalizer_impl.hh> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI DataViewerPanelBase: public QWidget, diff --git a/modules/gui/src/data_viewer/draw_overlay.cc b/modules/gui/src/data_viewer/draw_overlay.cc index f892ac6a7..088010304 100644 --- a/modules/gui/src/data_viewer/draw_overlay.cc +++ b/modules/gui/src/data_viewer/draw_overlay.cc @@ -26,7 +26,7 @@ #include "data_viewer_panel.hh" #include "draw_overlay.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { DrawOverlay::DrawOverlay(ImageHandle imagehandle): Overlay("DrawOverlay"), diff --git a/modules/gui/src/data_viewer/draw_overlay.hh b/modules/gui/src/data_viewer/draw_overlay.hh index 4413f786c..8c9ef182b 100644 --- a/modules/gui/src/data_viewer/draw_overlay.hh +++ b/modules/gui/src/data_viewer/draw_overlay.hh @@ -25,12 +25,12 @@ #ifndef IPLT_GUI_DRAW_OVERLAY_H #define IPLT_GUI_DRAW_OVERLAY_H -#include <ost/iplt/image_handle.hh> +#include <ost/img/image_handle.hh> #include <ost/gui/module_config.hh> #include "overlay_base.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { // fw decl class DataViewerPanel; diff --git a/modules/gui/src/data_viewer/drawing_functions.cc b/modules/gui/src/data_viewer/drawing_functions.cc index 4616ec47c..221809596 100644 --- a/modules/gui/src/data_viewer/drawing_functions.cc +++ b/modules/gui/src/data_viewer/drawing_functions.cc @@ -26,7 +26,7 @@ #include <deque> #include "drawing_functions.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { using namespace geom; diff --git a/modules/gui/src/data_viewer/drawing_functions.hh b/modules/gui/src/data_viewer/drawing_functions.hh index 7f4e566b5..4bc62784c 100644 --- a/modules/gui/src/data_viewer/drawing_functions.hh +++ b/modules/gui/src/data_viewer/drawing_functions.hh @@ -31,7 +31,7 @@ #include <ost/geom/geom.hh> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { DLLEXPORT void DrawDiagonalCross(QPainter& pnt, const QPoint& p, int s); DLLEXPORT void DrawCross(QPainter& pnt, const QPoint& p, int s); diff --git a/modules/gui/src/data_viewer/fft_panel.cc b/modules/gui/src/data_viewer/fft_panel.cc index a6864c3ac..d764d5f9c 100644 --- a/modules/gui/src/data_viewer/fft_panel.cc +++ b/modules/gui/src/data_viewer/fft_panel.cc @@ -23,13 +23,13 @@ */ #include <QInputDialog> -#include <ost/iplt/alg/fft.hh> +#include <ost/img/alg/fft.hh> #include "fft_panel.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { FFTPanel::FFTPanel(const Data& parent_data, QWidget* parent): DataViewerPanelBase(parent_data,parent), diff --git a/modules/gui/src/data_viewer/fft_panel.hh b/modules/gui/src/data_viewer/fft_panel.hh index c7587a229..e1020caa6 100644 --- a/modules/gui/src/data_viewer/fft_panel.hh +++ b/modules/gui/src/data_viewer/fft_panel.hh @@ -27,7 +27,7 @@ #include <ost/gui/module_config.hh> #include "data_viewer_panel_base.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI FFTPanel: public DataViewerPanelBase { diff --git a/modules/gui/src/data_viewer/iplt2qt.cc b/modules/gui/src/data_viewer/img2qt.cc similarity index 92% rename from modules/gui/src/data_viewer/iplt2qt.cc rename to modules/gui/src/data_viewer/img2qt.cc index 90879a79a..d89a24c46 100644 --- a/modules/gui/src/data_viewer/iplt2qt.cc +++ b/modules/gui/src/data_viewer/img2qt.cc @@ -19,16 +19,16 @@ //------------------------------------------------------------------------------ #include <QImage> -#include <ost/iplt/data.hh> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/data.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> #include <ost/stdint.hh> -#include "iplt2qt.hh" +#include "img2qt.hh" -using namespace ost::iplt; +using namespace ost::img; -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { namespace { @@ -95,7 +95,7 @@ private: } // anon ns -void iplt2qt(const Data& d, QImage* img, +void img2qt(const Data& d, QImage* img, int logscale, const geom::Vec3& offset, int z, const NormalizerPtr& norm) { diff --git a/modules/gui/src/data_viewer/iplt2qt.hh b/modules/gui/src/data_viewer/img2qt.hh similarity index 88% rename from modules/gui/src/data_viewer/iplt2qt.hh rename to modules/gui/src/data_viewer/img2qt.hh index 171355cb6..4c8b9bd8b 100644 --- a/modules/gui/src/data_viewer/iplt2qt.hh +++ b/modules/gui/src/data_viewer/img2qt.hh @@ -23,22 +23,22 @@ Author: Ansgar Philippsen */ -#ifndef IPLT_GUI_IPLT2QT_HH -#define IPLT_GUI_IPLT2QT_HH +#ifndef IPLT_GUI_IMG2QT_HH +#define IPLT_GUI_IMG2QT_HH #include <ost/geom/geom.hh> -#include <ost/iplt/normalizer_impl.hh> +#include <ost/img/normalizer_impl.hh> class QImage; -namespace ost { namespace iplt { +namespace ost { namespace img { class Data; namespace gui { -void iplt2qt(const Data& d, QImage* img, +void img2qt(const Data& d, QImage* img, int logscale, const geom::Vec3& offset, int z, const NormalizerPtr& norm); diff --git a/modules/gui/src/data_viewer/info_panel.cc b/modules/gui/src/data_viewer/info_panel.cc index cd8678f61..7bdf2a514 100644 --- a/modules/gui/src/data_viewer/info_panel.cc +++ b/modules/gui/src/data_viewer/info_panel.cc @@ -28,11 +28,11 @@ #include <QVBoxLayout> #include <QGroupBox> -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> #include "info_panel.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { InfoPanelLabel::InfoPanelLabel(const QString& t, QWidget* parent): QLabel(t,parent) diff --git a/modules/gui/src/data_viewer/info_panel.hh b/modules/gui/src/data_viewer/info_panel.hh index d32e774a3..0c40bc31d 100644 --- a/modules/gui/src/data_viewer/info_panel.hh +++ b/modules/gui/src/data_viewer/info_panel.hh @@ -29,13 +29,13 @@ #include <QLabel> #include <QMenu> -#include <ost/iplt/data_types.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/image_fw.hh> +#include <ost/img/data_types.hh> +#include <ost/img/extent.hh> +#include <ost/img/image_fw.hh> #include <ost/gui/module_config.hh> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI InfoPanelLabel: public QLabel { diff --git a/modules/gui/src/data_viewer/mask_overlay.cc b/modules/gui/src/data_viewer/mask_overlay.cc index 9b97f7d87..a10082a34 100644 --- a/modules/gui/src/data_viewer/mask_overlay.cc +++ b/modules/gui/src/data_viewer/mask_overlay.cc @@ -23,12 +23,12 @@ Authors: Ansgar Philippsen, Andreas Schenk */ -#include <ost/iplt/mask_visitor.hh> +#include <ost/img/mask_visitor.hh> #include "data_viewer_panel.hh" #include "mask_overlay.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { MaskOverlay::MaskOverlay(): Overlay("MaskOverlay"), diff --git a/modules/gui/src/data_viewer/mask_overlay.hh b/modules/gui/src/data_viewer/mask_overlay.hh index 8f3127aa4..bb1014cdf 100644 --- a/modules/gui/src/data_viewer/mask_overlay.hh +++ b/modules/gui/src/data_viewer/mask_overlay.hh @@ -26,14 +26,14 @@ #define IPLT_GUI_MASK_OVERLAY_HH_ #include <ost/geom/geom.hh> -#include <ost/iplt/image_handle.hh> -#include <ost/iplt/mask.hh> +#include <ost/img/image_handle.hh> +#include <ost/img/mask.hh> #include <ost/gui/module_config.hh> #include "overlay_base.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { // fw decl class DataViewerPanel; diff --git a/modules/gui/src/data_viewer/null_overlay.cc b/modules/gui/src/data_viewer/null_overlay.cc index 75672a6f1..f7eae6fd7 100644 --- a/modules/gui/src/data_viewer/null_overlay.cc +++ b/modules/gui/src/data_viewer/null_overlay.cc @@ -30,7 +30,7 @@ #include "null_overlay.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { NullOverlay::NullOverlay(): Overlay("Null") diff --git a/modules/gui/src/data_viewer/null_overlay.hh b/modules/gui/src/data_viewer/null_overlay.hh index 03ea5341e..737bf94ec 100644 --- a/modules/gui/src/data_viewer/null_overlay.hh +++ b/modules/gui/src/data_viewer/null_overlay.hh @@ -24,7 +24,7 @@ #include "overlay_base.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT NullOverlay: public Overlay { diff --git a/modules/gui/src/data_viewer/overlay_base.cc b/modules/gui/src/data_viewer/overlay_base.cc index 4e78cac0c..2272e4b0f 100644 --- a/modules/gui/src/data_viewer/overlay_base.cc +++ b/modules/gui/src/data_viewer/overlay_base.cc @@ -25,7 +25,7 @@ #include "overlay_base.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { Overlay::Overlay(const String& name): diff --git a/modules/gui/src/data_viewer/overlay_base.hh b/modules/gui/src/data_viewer/overlay_base.hh index 9ea9a1f74..dd33e9d87 100644 --- a/modules/gui/src/data_viewer/overlay_base.hh +++ b/modules/gui/src/data_viewer/overlay_base.hh @@ -37,7 +37,7 @@ #include <ost/gui/module_config.hh> #include "overlay_base_fw.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { // fw decl class DataViewerPanel; diff --git a/modules/gui/src/data_viewer/overlay_base_fw.hh b/modules/gui/src/data_viewer/overlay_base_fw.hh index 14cb07587..c198b10f5 100644 --- a/modules/gui/src/data_viewer/overlay_base_fw.hh +++ b/modules/gui/src/data_viewer/overlay_base_fw.hh @@ -27,7 +27,7 @@ #include <boost/shared_ptr.hpp> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class Overlay; diff --git a/modules/gui/src/data_viewer/overlay_manager.cc b/modules/gui/src/data_viewer/overlay_manager.cc index b40d1d593..11cc0c7cc 100644 --- a/modules/gui/src/data_viewer/overlay_manager.cc +++ b/modules/gui/src/data_viewer/overlay_manager.cc @@ -28,7 +28,7 @@ #include "overlay_base.hh" #include "data_viewer_panel.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { OverlayManager::OverlayManager(QWidget* ref): ref_(ref),ov_list_(),next_id_(0),active_ov_(),obs_list_() diff --git a/modules/gui/src/data_viewer/overlay_manager.hh b/modules/gui/src/data_viewer/overlay_manager.hh index 9015b085e..1a0a654d8 100644 --- a/modules/gui/src/data_viewer/overlay_manager.hh +++ b/modules/gui/src/data_viewer/overlay_manager.hh @@ -41,7 +41,7 @@ #include "overlay_manager_fw.hh" #include "overlay_manager_observer.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DataViewerPanel; diff --git a/modules/gui/src/data_viewer/overlay_manager_fw.hh b/modules/gui/src/data_viewer/overlay_manager_fw.hh index 14c2b995c..0b7ee9daa 100644 --- a/modules/gui/src/data_viewer/overlay_manager_fw.hh +++ b/modules/gui/src/data_viewer/overlay_manager_fw.hh @@ -27,7 +27,7 @@ #include <boost/shared_ptr.hpp> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class OverlayManager; diff --git a/modules/gui/src/data_viewer/overlay_manager_gui.cc b/modules/gui/src/data_viewer/overlay_manager_gui.cc index d4d78b53b..c947d50cd 100644 --- a/modules/gui/src/data_viewer/overlay_manager_gui.cc +++ b/modules/gui/src/data_viewer/overlay_manager_gui.cc @@ -30,7 +30,7 @@ #include "overlay_manager.hh" #include "overlay.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { //////////////////////////// diff --git a/modules/gui/src/data_viewer/overlay_manager_gui.hh b/modules/gui/src/data_viewer/overlay_manager_gui.hh index 8a3d48dba..83a4b1b63 100644 --- a/modules/gui/src/data_viewer/overlay_manager_gui.hh +++ b/modules/gui/src/data_viewer/overlay_manager_gui.hh @@ -39,7 +39,7 @@ #include <map> #include "overlay_manager_observer.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class OverlayCustomActCheckBox: public QRadioButton { diff --git a/modules/gui/src/data_viewer/overlay_manager_observer.hh b/modules/gui/src/data_viewer/overlay_manager_observer.hh index 21c308cc1..fad9b7198 100644 --- a/modules/gui/src/data_viewer/overlay_manager_observer.hh +++ b/modules/gui/src/data_viewer/overlay_manager_observer.hh @@ -27,7 +27,7 @@ #include "overlay_manager_fw.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { //! Abstract observer base class for the OverlayManager class OverlayManagerObserver { diff --git a/modules/gui/src/data_viewer/pointlist_overlay.cc b/modules/gui/src/data_viewer/pointlist_overlay.cc index 9806a38d1..c031b8eef 100644 --- a/modules/gui/src/data_viewer/pointlist_overlay.cc +++ b/modules/gui/src/data_viewer/pointlist_overlay.cc @@ -28,7 +28,7 @@ #include "data_viewer_panel.hh" #include "pointlist_overlay.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { PointlistOverlay::PointlistOverlay(const String& name): PointlistOverlayBase(name) diff --git a/modules/gui/src/data_viewer/pointlist_overlay.hh b/modules/gui/src/data_viewer/pointlist_overlay.hh index 91484b711..fd107f330 100644 --- a/modules/gui/src/data_viewer/pointlist_overlay.hh +++ b/modules/gui/src/data_viewer/pointlist_overlay.hh @@ -25,13 +25,13 @@ #ifndef IPLT_POINTLIST_OVERLAY_HH #define IPLT_POINTLIST_OVERLAY_HH -#include <ost/iplt/point_list.hh> +#include <ost/img/point_list.hh> #include <ost/gui/module_config.hh> #include "pointlist_overlay_base.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI PointlistOverlay: public PointlistOverlayBase { diff --git a/modules/gui/src/data_viewer/pointlist_overlay_base.cc b/modules/gui/src/data_viewer/pointlist_overlay_base.cc index 34320581d..fe76e291e 100644 --- a/modules/gui/src/data_viewer/pointlist_overlay_base.cc +++ b/modules/gui/src/data_viewer/pointlist_overlay_base.cc @@ -37,7 +37,7 @@ #include "pointlist_overlay_base.hh" #include "strategies.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { PointlistOverlayBaseSettings::PointlistOverlayBaseSettings(const QColor& ac, const QColor& pc, int s1, int s2, QWidget* p): QDialog(p), diff --git a/modules/gui/src/data_viewer/pointlist_overlay_base.hh b/modules/gui/src/data_viewer/pointlist_overlay_base.hh index 67a2a003f..d8433890a 100644 --- a/modules/gui/src/data_viewer/pointlist_overlay_base.hh +++ b/modules/gui/src/data_viewer/pointlist_overlay_base.hh @@ -35,9 +35,9 @@ #include <QVBoxLayout> -#include <ost/iplt/point.hh> +#include <ost/img/point.hh> -#include <ost/iplt/point.hh> +#include <ost/img/point.hh> #include <ost/gui/module_config.hh> #include <ost/gui/data_viewer/overlay_base.hh> @@ -45,7 +45,7 @@ -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI PointlistOverlayBaseSettings: public QDialog { diff --git a/modules/gui/src/data_viewer/strategies.cc b/modules/gui/src/data_viewer/strategies.cc index 70c882a4b..c23b593c6 100644 --- a/modules/gui/src/data_viewer/strategies.cc +++ b/modules/gui/src/data_viewer/strategies.cc @@ -25,7 +25,7 @@ #include "strategies.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { ////////////////////////////// // base diff --git a/modules/gui/src/data_viewer/strategies.hh b/modules/gui/src/data_viewer/strategies.hh index ec6d4e8a3..5d6c99971 100644 --- a/modules/gui/src/data_viewer/strategies.hh +++ b/modules/gui/src/data_viewer/strategies.hh @@ -35,7 +35,7 @@ #include "strategies_fw.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class SymbolDrawingStrategy diff --git a/modules/gui/src/data_viewer/strategies_fw.hh b/modules/gui/src/data_viewer/strategies_fw.hh index b2301f49f..22f03f77c 100644 --- a/modules/gui/src/data_viewer/strategies_fw.hh +++ b/modules/gui/src/data_viewer/strategies_fw.hh @@ -23,7 +23,7 @@ #include <boost/shared_ptr.hpp> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class SymbolDrawingStrategy; diff --git a/modules/gui/src/data_viewer/viewer_normalizer.cc b/modules/gui/src/data_viewer/viewer_normalizer.cc index 3a3c2ddd9..58eb7e0ea 100644 --- a/modules/gui/src/data_viewer/viewer_normalizer.cc +++ b/modules/gui/src/data_viewer/viewer_normalizer.cc @@ -27,11 +27,11 @@ #include <limits> #include <ost/message.hh> -#include <ost/iplt/alg/stat.hh> +#include <ost/img/alg/stat.hh> #include "viewer_normalizer.hh" -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { ViewerNormalizer::ViewerNormalizer(): NormalizerImpl(), diff --git a/modules/gui/src/data_viewer/viewer_normalizer.hh b/modules/gui/src/data_viewer/viewer_normalizer.hh index 6e4eee367..a4223a1c6 100644 --- a/modules/gui/src/data_viewer/viewer_normalizer.hh +++ b/modules/gui/src/data_viewer/viewer_normalizer.hh @@ -28,12 +28,12 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/normalizer_impl.hh> +#include <ost/img/normalizer_impl.hh> #include <ost/gui/module_config.hh> -namespace ost { namespace iplt { namespace gui { +namespace ost { namespace img { namespace gui { class DLLEXPORT_OST_GUI ViewerNormalizer: public NormalizerImpl, public RangeHandler diff --git a/modules/gui/src/file_browser.cc b/modules/gui/src/file_browser.cc index 7bcfa3f28..193908db8 100644 --- a/modules/gui/src/file_browser.cc +++ b/modules/gui/src/file_browser.cc @@ -41,9 +41,9 @@ #include <ost/gui/python_shell/python_interpreter.hh> -#if OST_IPLT_ENABLED -# include <ost/iplt/image_handle.hh> -# include <ost/io/iplt/load_map.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 diff --git a/modules/gui/src/file_loader.cc b/modules/gui/src/file_loader.cc index cc9da598b..49daa6050 100644 --- a/modules/gui/src/file_loader.cc +++ b/modules/gui/src/file_loader.cc @@ -45,18 +45,18 @@ #include <ost/gui/python_shell/python_interpreter.hh> #include <ost/gui/main_area.hh> -#if OST_IPLT_ENABLED - #include <ost/io/iplt/load_map.hh> +#if OST_IMG_ENABLED + #include <ost/io/img/load_map.hh> #include <ost/gfx/map_iso.hh> - #include <ost/iplt/extent.hh> + #include <ost/img/extent.hh> #endif namespace ost { namespace gui { LoaderManagerPtr FileLoader::loader_manager_ = LoaderManagerPtr(); -#if OST_IPLT_ENABLED - QList<iplt::ImageHandle> FileLoader::loaded_images_; +#if OST_IMG_ENABLED + QList<img::ImageHandle> FileLoader::loaded_images_; #endif FileLoader::FileLoader(){} @@ -166,9 +166,9 @@ gfx::GfxObjP FileLoader::TryLoadEntity(const QString& filename) gfx::GfxObjP FileLoader::TryLoadMap(const QString& filename) throw(io::IOException) { //TODO IMPROVE CODE -#if OST_IPLT_ENABLED - iplt::ImageHandle map=io::LoadMap(filename.toStdString()); - ost::iplt::Extent ext = map.GetExtent(); +#if OST_IMG_ENABLED + img::ImageHandle map=io::LoadMap(filename.toStdString()); + ost::img::Extent ext = map.GetExtent(); if(ext.GetSize().GetDepth()>1){ QFileInfo file_info(filename); gfx::MapIsoP map_iso(new gfx::MapIso(file_info.baseName().toStdString(), @@ -180,7 +180,7 @@ gfx::GfxObjP FileLoader::TryLoadMap(const QString& filename) throw(io::IOExcepti //FIXME ImageHandle should not be destroyed at the end of method //therefore hack with list loaded_images_.append(map); - ost::iplt::gui::DataViewer* viewer = GostyApp::Instance()->CreateDataViewer(loaded_images_.last()); + ost::img::gui::DataViewer* viewer = GostyApp::Instance()->CreateDataViewer(loaded_images_.last()); gui::GostyApp::Instance()->GetPerspective()->GetMainArea()->AddWidget(filename,viewer); } #else diff --git a/modules/gui/src/file_loader.hh b/modules/gui/src/file_loader.hh index 0b5c3a3eb..f61ebab28 100644 --- a/modules/gui/src/file_loader.hh +++ b/modules/gui/src/file_loader.hh @@ -45,8 +45,8 @@ private: static LoaderManagerPtr loader_manager_; -#if OST_IPLT_ENABLED - static QList<iplt::ImageHandle> loaded_images_; +#if OST_IMG_ENABLED + static QList<img::ImageHandle> loaded_images_; #endif public: diff --git a/modules/gui/src/gl_win.cc b/modules/gui/src/gl_win.cc index 05ed4d4e3..7e4a6948f 100644 --- a/modules/gui/src/gl_win.cc +++ b/modules/gui/src/gl_win.cc @@ -28,7 +28,7 @@ #include <ost/gui/gosty_app.hh> #include <ost/gui/perspective.hh> -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED # include <ost/gui/tools/map_tool.hh> #endif @@ -82,7 +82,7 @@ GLWin::GLWin(QWidget* p): ToolManager::Instance().AddTool(new SelectionTool); ToolManager::Instance().AddTool(new Manipulator); ToolManager::Instance().AddTool(new MeasureTool); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED ToolManager::Instance().AddTool(new MapTool); #endif QBoxLayout* l=new QVBoxLayout(this); diff --git a/modules/gui/src/gosty_app.cc b/modules/gui/src/gosty_app.cc index 9ad6ef355..8eed58bea 100644 --- a/modules/gui/src/gosty_app.cc +++ b/modules/gui/src/gosty_app.cc @@ -104,10 +104,10 @@ SequenceViewer* GostyApp::GetSequenceViewer() return seq_viewer_; } -#if OST_IPLT_ENABLED -ost::iplt::gui::DataViewer* GostyApp::CreateDataViewer(const ost::iplt::Data& d, const QString& name) +#if OST_IMG_ENABLED +ost::img::gui::DataViewer* GostyApp::CreateDataViewer(const ost::img::Data& d, const QString& name) { - return new ost::iplt::gui::DataViewer(main_,d,name); + return new ost::img::gui::DataViewer(main_,d,name); } #endif diff --git a/modules/gui/src/gosty_app.hh b/modules/gui/src/gosty_app.hh index e420b5726..2bf1e2eee 100644 --- a/modules/gui/src/gosty_app.hh +++ b/modules/gui/src/gosty_app.hh @@ -33,7 +33,7 @@ #include <ost/gui/sequence_viewer/sequence_viewer.hh> #include <ost/gui/main.hh> #include <ost/gui/widget_geom_handler.hh> -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED #include <ost/gui/data_viewer/data_viewer.hh> #endif @@ -99,10 +99,10 @@ public: /// All subsequent calls will return the same SceneWin instance. ToolOptionsWin* GetToolOptionsWin(); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED /// \brief create new DataViewer /// - ost::iplt::gui::DataViewer* CreateDataViewer(const ost::iplt::Data& d, const QString& name=""); + ost::img::gui::DataViewer* CreateDataViewer(const ost::img::Data& d, const QString& name=""); #endif /// \brief give the application time to run the mainloop and process events diff --git a/modules/iplt/CMakeLists.txt b/modules/img/CMakeLists.txt similarity index 89% rename from modules/iplt/CMakeLists.txt rename to modules/img/CMakeLists.txt index 4c774dcb4..224964ef1 100644 --- a/modules/iplt/CMakeLists.txt +++ b/modules/img/CMakeLists.txt @@ -1,4 +1,4 @@ -if (ENABLE_IPLT) +if (ENABLE_IMG) add_subdirectory(base) add_subdirectory(alg) if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ex) diff --git a/modules/iplt/alg/CMakeLists.txt b/modules/img/alg/CMakeLists.txt similarity index 100% rename from modules/iplt/alg/CMakeLists.txt rename to modules/img/alg/CMakeLists.txt diff --git a/modules/iplt/alg/pymod/CMakeLists.txt b/modules/img/alg/pymod/CMakeLists.txt similarity index 51% rename from modules/iplt/alg/pymod/CMakeLists.txt rename to modules/img/alg/pymod/CMakeLists.txt index dc69a8521..c257040e5 100644 --- a/modules/iplt/alg/pymod/CMakeLists.txt +++ b/modules/img/alg/pymod/CMakeLists.txt @@ -1,4 +1,4 @@ -set(OST_IPLT_ALG_PYMOD_SOURCES +set(OST_IMG_ALG_PYMOD_SOURCES wrap_alg.cc export_filter.cc export_normalizer.cc @@ -6,5 +6,5 @@ export_transcendentals.cc export_polar.cc ) -pymod(NAME iplt_alg OUTPUT_DIR ost/iplt/alg CPP ${OST_IPLT_ALG_PYMOD_SOURCES} +pymod(NAME img_alg OUTPUT_DIR ost/img/alg CPP ${OST_IMG_ALG_PYMOD_SOURCES} PY __init__.py) diff --git a/modules/iplt/alg/pymod/__init__.py b/modules/img/alg/pymod/__init__.py similarity index 97% rename from modules/iplt/alg/pymod/__init__.py rename to modules/img/alg/pymod/__init__.py index 86d3fbd33..3ee71fbac 100644 --- a/modules/iplt/alg/pymod/__init__.py +++ b/modules/img/alg/pymod/__init__.py @@ -16,4 +16,4 @@ # along with this library; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #------------------------------------------------------------------------------ -from _iplt_alg import * +from _img_alg import * diff --git a/modules/iplt/alg/pymod/export_filter.cc b/modules/img/alg/pymod/export_filter.cc similarity index 98% rename from modules/iplt/alg/pymod/export_filter.cc rename to modules/img/alg/pymod/export_filter.cc index 7609e2e6f..9b2636c0c 100644 --- a/modules/iplt/alg/pymod/export_filter.cc +++ b/modules/img/alg/pymod/export_filter.cc @@ -27,10 +27,10 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/alg/filter.hh> +#include <ost/img/alg/filter.hh> -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void export_Filter() { diff --git a/modules/iplt/alg/pymod/export_normalizer.cc b/modules/img/alg/pymod/export_normalizer.cc similarity index 96% rename from modules/iplt/alg/pymod/export_normalizer.cc rename to modules/img/alg/pymod/export_normalizer.cc index 8c96cff0a..b36ff9a7a 100644 --- a/modules/iplt/alg/pymod/export_normalizer.cc +++ b/modules/img/alg/pymod/export_normalizer.cc @@ -27,11 +27,11 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/alg/norm.hh> +#include <ost/img/alg/norm.hh> using namespace ost; -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; namespace { Normalizer (*linrange1)(const ConstImageHandle&,Real,Real) = CreateLinearRangeNormalizer; diff --git a/modules/iplt/alg/pymod/export_polar.cc b/modules/img/alg/pymod/export_polar.cc similarity index 79% rename from modules/iplt/alg/pymod/export_polar.cc rename to modules/img/alg/pymod/export_polar.cc index cb9458a6d..385a5dd6c 100644 --- a/modules/iplt/alg/pymod/export_polar.cc +++ b/modules/img/alg/pymod/export_polar.cc @@ -22,19 +22,19 @@ */ #include <boost/python.hpp> -#include <ost/iplt/alg/polar.hh> +#include <ost/img/alg/polar.hh> using namespace boost::python; -using namespace ost::iplt::alg; +using namespace ost::img::alg; void export_Polar() { - class_<Polar, bases<ost::iplt::ModOPAlgorithm> >("Polar" ,init<Real>()) + class_<Polar, bases<ost::img::ModOPAlgorithm> >("Polar" ,init<Real>()) .def(init<>()) ; - class_<Cartesian, bases<ost::iplt::ModOPAlgorithm> >("Cartesian" ,init<>()) + class_<Cartesian, bases<ost::img::ModOPAlgorithm> >("Cartesian" ,init<>()) ; - class_<EllipticPolar, bases<ost::iplt::ModOPAlgorithm> >("EllipticPolar" ,init<Real,Real,Real>()) + class_<EllipticPolar, bases<ost::img::ModOPAlgorithm> >("EllipticPolar" ,init<Real,Real,Real>()) ; } diff --git a/modules/iplt/alg/pymod/export_transcendentals.cc b/modules/img/alg/pymod/export_transcendentals.cc similarity index 94% rename from modules/iplt/alg/pymod/export_transcendentals.cc rename to modules/img/alg/pymod/export_transcendentals.cc index dae14415f..2a9f42cc7 100644 --- a/modules/iplt/alg/pymod/export_transcendentals.cc +++ b/modules/img/alg/pymod/export_transcendentals.cc @@ -25,10 +25,10 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/alg/transcendentals.hh> +#include <ost/img/alg/transcendentals.hh> -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void export_Transcendentals() { diff --git a/modules/iplt/alg/pymod/wrap_alg.cc b/modules/img/alg/pymod/wrap_alg.cc similarity index 84% rename from modules/iplt/alg/pymod/wrap_alg.cc rename to modules/img/alg/pymod/wrap_alg.cc index f55f3d2f3..1f19c80ff 100644 --- a/modules/iplt/alg/pymod/wrap_alg.cc +++ b/modules/img/alg/pymod/wrap_alg.cc @@ -23,38 +23,38 @@ */ #include <boost/python.hpp> -#include <ost/iplt/alg/auto_correlate.hh> -#include <ost/iplt/alg/clear.hh> -#include <ost/iplt/alg/conjugate.hh> -#include <ost/iplt/alg/correlate.hh> -#include <ost/iplt/alg/cross_correlate.hh> -#include <ost/iplt/alg/convolute.hh> -#include <ost/iplt/alg/fft.hh> -#include <ost/iplt/alg/dft.hh> -#include <ost/iplt/alg/fill.hh> -#include <ost/iplt/alg/threshold.hh> -#include <ost/iplt/alg/density_slice.hh> -#include <ost/iplt/alg/histogram.hh> -#include <ost/iplt/alg/negate.hh> -#include <ost/iplt/alg/stat.hh> -#include <ost/iplt/alg/stat_min_max.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/power_spectrum.hh> -#include <ost/iplt/alg/mask_image.hh> -#include <ost/iplt/alg/smooth_mask_image.hh> -#include <ost/iplt/alg/clip_min_max.hh> -#include <ost/iplt/alg/local_sigma_threshold.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/alg/transform.hh> -#include <ost/iplt/alg/discrete_shrink.hh> -#include <ost/iplt/alg/fractional_shift.hh> -#include <ost/iplt/alg/line_average.hh> -#include <ost/iplt/alg/rscrosscorr.hh> -#include <ost/iplt/alg/highest_peak_search_3d.hh> +#include <ost/img/alg/auto_correlate.hh> +#include <ost/img/alg/clear.hh> +#include <ost/img/alg/conjugate.hh> +#include <ost/img/alg/correlate.hh> +#include <ost/img/alg/cross_correlate.hh> +#include <ost/img/alg/convolute.hh> +#include <ost/img/alg/fft.hh> +#include <ost/img/alg/dft.hh> +#include <ost/img/alg/fill.hh> +#include <ost/img/alg/threshold.hh> +#include <ost/img/alg/density_slice.hh> +#include <ost/img/alg/histogram.hh> +#include <ost/img/alg/negate.hh> +#include <ost/img/alg/stat.hh> +#include <ost/img/alg/stat_min_max.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/power_spectrum.hh> +#include <ost/img/alg/mask_image.hh> +#include <ost/img/alg/smooth_mask_image.hh> +#include <ost/img/alg/clip_min_max.hh> +#include <ost/img/alg/local_sigma_threshold.hh> +#include <ost/img/extent.hh> +#include <ost/img/alg/transform.hh> +#include <ost/img/alg/discrete_shrink.hh> +#include <ost/img/alg/fractional_shift.hh> +#include <ost/img/alg/line_average.hh> +#include <ost/img/alg/rscrosscorr.hh> +#include <ost/img/alg/highest_peak_search_3d.hh> using namespace ost; -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; using namespace boost::python; // fw decl @@ -63,8 +63,8 @@ void export_Normalizer(); void export_Transcendentals(); void export_Polar(); -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; namespace { list get_histo_bins(const Histogram& hist) { @@ -108,7 +108,7 @@ void frac_shift5(FractionalShift* s, const Vec3& v) /* Real real_spatial_cross_correlation_1 (const ConstImageHandle& image1, const ConstImageHandle& image2) { - return ost::iplt::alg::RealSpatialCrossCorrelation(image1,image2); + return ost::img::alg::RealSpatialCrossCorrelation(image1,image2); } Real real_spatial_cross_correlation_1 (const ConstImageHandle& image1, const ConstImageHandle& image2) { @@ -117,14 +117,14 @@ Real real_spatial_cross_correlation_1 (const ConstImageHandle& image1, const Con Real real_spatial_cross_correlation_2(const ConstImageHandle& image1, const ConstImageHandle& image2, const Extent& extent) { - return ost::iplt::alg::RealSpatialCrossCorrelation(image1,image2,extent); + return ost::img::alg::RealSpatialCrossCorrelation(image1,image2,extent); } */ } //anon ns -BOOST_PYTHON_MODULE(_iplt_alg) +BOOST_PYTHON_MODULE(_img_alg) { class_<AutoCorrelate, bases<ConstModOPAlgorithm> >("AutoCorrelate",init<>()); diff --git a/modules/iplt/alg/pymod/wrap_tf.cc b/modules/img/alg/pymod/wrap_tf.cc similarity index 95% rename from modules/iplt/alg/pymod/wrap_tf.cc rename to modules/img/alg/pymod/wrap_tf.cc index 02dfc60f2..1b676a42c 100644 --- a/modules/iplt/alg/pymod/wrap_tf.cc +++ b/modules/img/alg/pymod/wrap_tf.cc @@ -25,13 +25,13 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/extent.hh> -#include <ost/iplt/alg/transform.hh> -#include <ost/iplt/alg/discrete_shrink.hh> -#include <ost/iplt/alg/fractional_shift.hh> +#include <ost/img/extent.hh> +#include <ost/img/alg/transform.hh> +#include <ost/img/alg/discrete_shrink.hh> +#include <ost/img/alg/fractional_shift.hh> -using namespace ost::iplt; -namespace tf = iplt::alg; +using namespace ost::img; +namespace tf = img::alg; #if 0 Extent (*transform_extent)(const Extent&,const Transformer&) = tf::Transform; diff --git a/modules/iplt/alg/src/CMakeLists.txt b/modules/img/alg/src/CMakeLists.txt similarity index 87% rename from modules/iplt/alg/src/CMakeLists.txt rename to modules/img/alg/src/CMakeLists.txt index cfcabbcb0..da982b40c 100644 --- a/modules/iplt/alg/src/CMakeLists.txt +++ b/modules/img/alg/src/CMakeLists.txt @@ -1,4 +1,4 @@ -set(OST_IPLT_ALG_SOURCES +set(OST_IMG_ALG_SOURCES anisotropic.cc auto_correlate.cc convolute.cc @@ -38,7 +38,7 @@ polar.cc rscrosscorr.cc line_average.cc) -set(OST_IPLT_ALG_HEADERS +set(OST_IMG_ALG_HEADERS anisotropic.hh auto_correlate.hh clear.hh @@ -94,8 +94,8 @@ rscrosscorr.hh ) -module(NAME iplt_alg SOURCES "${OST_IPLT_ALG_SOURCES}" - HEADERS "${OST_IPLT_ALG_HEADERS}" - HEADER_OUTPUT_DIR ost/iplt/alg - DEPENDS_ON iplt +module(NAME img_alg SOURCES "${OST_IMG_ALG_SOURCES}" + HEADERS "${OST_IMG_ALG_HEADERS}" + HEADER_OUTPUT_DIR ost/img/alg + DEPENDS_ON img LINK ${FFTW_LIBRARIES}) diff --git a/modules/iplt/alg/src/alg_mirror.cc b/modules/img/alg/src/alg_mirror.cc similarity index 97% rename from modules/iplt/alg/src/alg_mirror.cc rename to modules/img/alg/src/alg_mirror.cc index eddaa2f87..0a984c0c2 100644 --- a/modules/iplt/alg/src/alg_mirror.cc +++ b/modules/img/alg/src/alg_mirror.cc @@ -20,7 +20,7 @@ #include "alg_mirror.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { #ifndef NO_EXPL_INST template class TEMPLATE_DEF_EXPORT ImageStateConstModOPAlgorithm<alg::MirrorFnc>; diff --git a/modules/iplt/alg/src/alg_mirror.hh b/modules/img/alg/src/alg_mirror.hh similarity index 90% rename from modules/iplt/alg/src/alg_mirror.hh rename to modules/img/alg/src/alg_mirror.hh index 56697bb80..1826a0e2c 100644 --- a/modules/iplt/alg/src/alg_mirror.hh +++ b/modules/img/alg/src/alg_mirror.hh @@ -21,12 +21,12 @@ #ifndef IPLT_ALG_TRANSFORM_MIRROR_HH #define IPLT_ALG_TRANSFORM_MIRROR_HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/value_util.hh> -#include <ost/iplt/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +#include <ost/img/image_state.hh> +#include <ost/img/value_util.hh> +#include <ost/img/alg/module_config.hh> +namespace ost { namespace img { namespace alg { -struct DLLEXPORT_IPLT_ALG MirrorFnc { +struct DLLEXPORT_IMG_ALG MirrorFnc { MirrorFnc(): planes_(0) {} MirrorFnc(int p): planes_(p) {} diff --git a/modules/iplt/alg/src/alg_shift.cc b/modules/img/alg/src/alg_shift.cc similarity index 97% rename from modules/iplt/alg/src/alg_shift.cc rename to modules/img/alg/src/alg_shift.cc index 575f783d0..48c110086 100644 --- a/modules/iplt/alg/src/alg_shift.cc +++ b/modules/img/alg/src/alg_shift.cc @@ -20,7 +20,7 @@ #include "alg_shift.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { #ifndef NO_EXPL_INST template class TEMPLATE_DEF_EXPORT ImageStateModOPAlgorithm<alg::ShiftFnc>; diff --git a/modules/iplt/alg/src/alg_shift.hh b/modules/img/alg/src/alg_shift.hh similarity index 92% rename from modules/iplt/alg/src/alg_shift.hh rename to modules/img/alg/src/alg_shift.hh index f7aa31641..993f363fb 100644 --- a/modules/iplt/alg/src/alg_shift.hh +++ b/modules/img/alg/src/alg_shift.hh @@ -21,11 +21,11 @@ #ifndef IPLT_ALG_TRANSFORM_SHIFT_HH #define IPLT_ALG_TRANSFORM_SHIFT_HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/value_util.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image_state.hh> +#include <ost/img/value_util.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { @@ -36,7 +36,7 @@ unsigned int absmod(int x, unsigned int y) } // anon ns -class DLLEXPORT_IPLT_ALG ShiftFnc { +class DLLEXPORT_IMG_ALG ShiftFnc { public: ShiftFnc(): shift_() {} ShiftFnc(const Point& s): shift_(s) {} diff --git a/modules/iplt/alg/src/alg_transform.cc b/modules/img/alg/src/alg_transform.cc similarity index 97% rename from modules/iplt/alg/src/alg_transform.cc rename to modules/img/alg/src/alg_transform.cc index d337e25ea..4bc23e362 100644 --- a/modules/iplt/alg/src/alg_transform.cc +++ b/modules/img/alg/src/alg_transform.cc @@ -20,7 +20,7 @@ #include "alg_transform.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { template class TEMPLATE_DEF_EXPORT ImageStateModOPAlgorithm<alg::TransformFnc>; diff --git a/modules/iplt/alg/src/alg_transform.hh b/modules/img/alg/src/alg_transform.hh similarity index 92% rename from modules/iplt/alg/src/alg_transform.hh rename to modules/img/alg/src/alg_transform.hh index 9664f4037..35116a180 100644 --- a/modules/iplt/alg/src/alg_transform.hh +++ b/modules/img/alg/src/alg_transform.hh @@ -21,14 +21,14 @@ #ifndef IPLT_ALG_TRANSFORM_ALG_TRANSFORM_HH #define IPLT_ALG_TRANSFORM_ALG_TRANSFORM__HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/image_state.hh> +#include <ost/img/value_util.hh> #include "transformations.hh" -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -struct DLLEXPORT_IPLT_ALG TransformFnc { +struct DLLEXPORT_IMG_ALG TransformFnc { TransformFnc(): tf_() {} TransformFnc(const Transformation& tf, const Vec3 o=Vec3(0.0,0.0,0.0)): tf_(tf), offset_(o) {} diff --git a/modules/iplt/alg/src/anisotropic.cc b/modules/img/alg/src/anisotropic.cc similarity index 99% rename from modules/iplt/alg/src/anisotropic.cc rename to modules/img/alg/src/anisotropic.cc index 1728bfe37..a9f2cf41e 100644 --- a/modules/iplt/alg/src/anisotropic.cc +++ b/modules/img/alg/src/anisotropic.cc @@ -26,7 +26,7 @@ #include "anisotropic.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { AnisotropicFilter::AnisotropicFilter(Real sigma): GaussianFilter(sigma) diff --git a/modules/iplt/alg/src/anisotropic.hh b/modules/img/alg/src/anisotropic.hh similarity index 94% rename from modules/iplt/alg/src/anisotropic.hh rename to modules/img/alg/src/anisotropic.hh index eecdd26a8..4a9e22a95 100644 --- a/modules/iplt/alg/src/anisotropic.hh +++ b/modules/img/alg/src/anisotropic.hh @@ -27,9 +27,9 @@ #include "gaussian.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG AnisotropicFilter: public GaussianFilter { +class DLLEXPORT_IMG_ALG AnisotropicFilter: public GaussianFilter { public: AnisotropicFilter(Real sigma=1.0); diff --git a/modules/iplt/alg/src/auto_correlate.cc b/modules/img/alg/src/auto_correlate.cc similarity index 97% rename from modules/iplt/alg/src/auto_correlate.cc rename to modules/img/alg/src/auto_correlate.cc index 98333e925..c40e136a2 100644 --- a/modules/iplt/alg/src/auto_correlate.cc +++ b/modules/img/alg/src/auto_correlate.cc @@ -23,7 +23,7 @@ #include "fft.hh" #include "auto_correlate.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { AutoCorrelateFnc::AutoCorrelateFnc() {} diff --git a/modules/iplt/alg/src/auto_correlate.hh b/modules/img/alg/src/auto_correlate.hh similarity index 85% rename from modules/iplt/alg/src/auto_correlate.hh rename to modules/img/alg/src/auto_correlate.hh index 6f946c825..9b72a6dc7 100644 --- a/modules/iplt/alg/src/auto_correlate.hh +++ b/modules/img/alg/src/auto_correlate.hh @@ -21,12 +21,12 @@ #ifndef IPLT_ALG_AUTOCORRELATE_HH #define IPLT_ALG_AUTOCORRELATE_HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG AutoCorrelateFnc { +class DLLEXPORT_IMG_ALG AutoCorrelateFnc { public: AutoCorrelateFnc(); AutoCorrelateFnc(const ConstImageHandle& ref, bool wrap=true); @@ -45,7 +45,7 @@ typedef ImageStateConstModOPAlgorithm<AutoCorrelateFnc> AutoCorrelate; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::AutoCorrelateFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::AutoCorrelateFnc>) }} // ns diff --git a/modules/iplt/alg/src/clear.hh b/modules/img/alg/src/clear.hh similarity index 91% rename from modules/iplt/alg/src/clear.hh rename to modules/img/alg/src/clear.hh index 5bb7d3c35..f44f54f5c 100644 --- a/modules/iplt/alg/src/clear.hh +++ b/modules/img/alg/src/clear.hh @@ -21,11 +21,11 @@ #ifndef IPLT_ALG_CLEAR_HH #define IPLT_ALG_CLEAR_HH -#include <ost/iplt/image.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { diff --git a/modules/iplt/alg/src/clip_min_max.hh b/modules/img/alg/src/clip_min_max.hh similarity index 98% rename from modules/iplt/alg/src/clip_min_max.hh rename to modules/img/alg/src/clip_min_max.hh index 7efa11f6e..50661df05 100644 --- a/modules/iplt/alg/src/clip_min_max.hh +++ b/modules/img/alg/src/clip_min_max.hh @@ -25,7 +25,7 @@ #ifndef CLIP_MIN_MAX_HH_ #define CLIP_MIN_MAX_HH_ -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { diff --git a/modules/iplt/alg/src/conjugate.hh b/modules/img/alg/src/conjugate.hh similarity index 90% rename from modules/iplt/alg/src/conjugate.hh rename to modules/img/alg/src/conjugate.hh index 494e8de4b..640b16195 100644 --- a/modules/iplt/alg/src/conjugate.hh +++ b/modules/img/alg/src/conjugate.hh @@ -21,11 +21,11 @@ #ifndef IPLT_ALG_COMMON_CONJ_HH #define IPLT_ALG_COMMON_CONJ_HH -#include <ost/iplt/image.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { @@ -48,7 +48,7 @@ void do_conj_ip(image_state::ValueHolder<V>& vh) {} } // anon ns -struct DLLEXPORT_IPLT_ALG ConjFnc { +struct DLLEXPORT_IMG_ALG ConjFnc { template <typename T, class D> void VisitState(ImageStateImpl<T,D>& isi) const { do_conj_ip(isi.Data()); diff --git a/modules/iplt/alg/src/convolute.cc b/modules/img/alg/src/convolute.cc similarity index 97% rename from modules/iplt/alg/src/convolute.cc rename to modules/img/alg/src/convolute.cc index fd54a32b4..afb3deed5 100644 --- a/modules/iplt/alg/src/convolute.cc +++ b/modules/img/alg/src/convolute.cc @@ -20,9 +20,9 @@ #include "convolute.hh" -#include <ost/iplt/image_state/dispatch.hh> +#include <ost/img/image_state/dispatch.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { diff --git a/modules/iplt/alg/src/convolute.hh b/modules/img/alg/src/convolute.hh similarity index 86% rename from modules/iplt/alg/src/convolute.hh rename to modules/img/alg/src/convolute.hh index f3e887ba5..06d831e8b 100644 --- a/modules/iplt/alg/src/convolute.hh +++ b/modules/img/alg/src/convolute.hh @@ -21,11 +21,11 @@ #ifndef IPLT_ALG_CONVOLUTE_HH #define IPLT_ALG_CONVOLUTE_HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG ExplicitConvoluteFnc { +class DLLEXPORT_IMG_ALG ExplicitConvoluteFnc { public: ExplicitConvoluteFnc(); // for the image handle level @@ -47,7 +47,7 @@ typedef ImageStateConstModOPAlgorithm<ExplicitConvoluteFnc> ExplicitConvolute; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::ExplicitConvoluteFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::ExplicitConvoluteFnc>) }} // ns diff --git a/modules/iplt/alg/src/correlate.cc b/modules/img/alg/src/correlate.cc similarity index 96% rename from modules/iplt/alg/src/correlate.cc rename to modules/img/alg/src/correlate.cc index 9c44cf405..d9833ee05 100644 --- a/modules/iplt/alg/src/correlate.cc +++ b/modules/img/alg/src/correlate.cc @@ -20,9 +20,9 @@ #include "correlate.hh" -#include <ost/iplt/image_state/dispatch.hh> +#include <ost/img/image_state/dispatch.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { diff --git a/modules/iplt/alg/src/correlate.hh b/modules/img/alg/src/correlate.hh similarity index 85% rename from modules/iplt/alg/src/correlate.hh rename to modules/img/alg/src/correlate.hh index 5c4afd5b6..e328b2818 100644 --- a/modules/iplt/alg/src/correlate.hh +++ b/modules/img/alg/src/correlate.hh @@ -21,12 +21,12 @@ #ifndef IPLT_ALG_CORRELATE_HH #define IPLT_ALG_CORRELATE_HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG ExplicitCorrelateFnc { +class DLLEXPORT_IMG_ALG ExplicitCorrelateFnc { public: ExplicitCorrelateFnc(); ExplicitCorrelateFnc(const ConstImageHandle& ref, bool wrap=true); @@ -45,7 +45,7 @@ typedef ImageStateConstModOPAlgorithm<ExplicitCorrelateFnc> ExplicitCorrelate; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::ExplicitCorrelateFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::ExplicitCorrelateFnc>) }} // ns diff --git a/modules/iplt/alg/src/cross_correlate.cc b/modules/img/alg/src/cross_correlate.cc similarity index 97% rename from modules/iplt/alg/src/cross_correlate.cc rename to modules/img/alg/src/cross_correlate.cc index e838d42f7..506640598 100644 --- a/modules/iplt/alg/src/cross_correlate.cc +++ b/modules/img/alg/src/cross_correlate.cc @@ -28,7 +28,7 @@ #include "conjugate.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { CrossCorrelate::CrossCorrelate(const ConstImageHandle& ref): ConstModIPAlgorithm("CrossCorrelate"), ref_(ref) diff --git a/modules/iplt/alg/src/cross_correlate.hh b/modules/img/alg/src/cross_correlate.hh similarity index 87% rename from modules/iplt/alg/src/cross_correlate.hh rename to modules/img/alg/src/cross_correlate.hh index 11cdb12f3..57f2d1183 100644 --- a/modules/iplt/alg/src/cross_correlate.hh +++ b/modules/img/alg/src/cross_correlate.hh @@ -24,12 +24,12 @@ #ifndef IPLT_ALG_CROSS_CORRELATE_HH #define IPLT_ALG_CROSS_CORRELATE_HH -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG CrossCorrelate: public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG CrossCorrelate: public ConstModIPAlgorithm { public: CrossCorrelate(const ConstImageHandle& ref); diff --git a/modules/iplt/alg/src/custom_transformer.cc b/modules/img/alg/src/custom_transformer.cc similarity index 98% rename from modules/iplt/alg/src/custom_transformer.cc rename to modules/img/alg/src/custom_transformer.cc index 4523e4cde..5f4a70c88 100644 --- a/modules/iplt/alg/src/custom_transformer.cc +++ b/modules/img/alg/src/custom_transformer.cc @@ -20,7 +20,7 @@ #include "custom_transformer.hh" -namespace ost { namespace iplt { namespace tf { +namespace ost { namespace img { namespace tf { namespace { diff --git a/modules/iplt/alg/src/custom_transformer.hh b/modules/img/alg/src/custom_transformer.hh similarity index 91% rename from modules/iplt/alg/src/custom_transformer.hh rename to modules/img/alg/src/custom_transformer.hh index f034dc11f..f12533d81 100644 --- a/modules/iplt/alg/src/custom_transformer.hh +++ b/modules/img/alg/src/custom_transformer.hh @@ -31,9 +31,9 @@ #include "transformer_base.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG CustomTransformerException: public Error { +class DLLEXPORT_IMG_ALG CustomTransformerException: public Error { public: virtual ~CustomTransformerException() throw() {} CustomTransformerException(const String& s): @@ -47,7 +47,7 @@ public: the forward matrix is given, the inverse will be calculated automatically. */ -class DLLEXPORT_IPLT_ALG CustomTransformer: public Transformer { +class DLLEXPORT_IMG_ALG CustomTransformer: public Transformer { public: CustomTransformer(const Mat4& tmat); CustomTransformer(const Mat4& tmat,const Mat4& imat); diff --git a/modules/iplt/alg/src/density_slice.cc b/modules/img/alg/src/density_slice.cc similarity index 98% rename from modules/iplt/alg/src/density_slice.cc rename to modules/img/alg/src/density_slice.cc index 5f0242367..013576478 100644 --- a/modules/iplt/alg/src/density_slice.cc +++ b/modules/img/alg/src/density_slice.cc @@ -19,7 +19,7 @@ //------------------------------------------------------------------------------ #include "density_slice.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { template<typename T> bool between(const T& v, Real rl, const Complex& cl, Real ru, const Complex& cu); diff --git a/modules/iplt/alg/src/density_slice.hh b/modules/img/alg/src/density_slice.hh similarity index 86% rename from modules/iplt/alg/src/density_slice.hh rename to modules/img/alg/src/density_slice.hh index 90cb76138..315de118f 100644 --- a/modules/iplt/alg/src/density_slice.hh +++ b/modules/img/alg/src/density_slice.hh @@ -25,14 +25,14 @@ #ifndef IPLT_ALG_DENSITY_SLICE_HH #define IPLT_ALG_DENSITY_SLICE_HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/image_state/image_state_algorithm.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image_state.hh> +#include <ost/img/image_state/image_state_algorithm.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -struct DLLEXPORT_IPLT_ALG SliceFnc { +struct DLLEXPORT_IMG_ALG SliceFnc { SliceFnc(); explicit SliceFnc(Real l,Real u); explicit SliceFnc(const Complex& l, const Complex& u); @@ -61,7 +61,7 @@ typedef ImageStateConstModIPAlgorithm<SliceFnc> DensitySlice; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<alg::SliceFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<alg::SliceFnc>) }} // ns diff --git a/modules/iplt/alg/src/dft.cc b/modules/img/alg/src/dft.cc similarity index 96% rename from modules/iplt/alg/src/dft.cc rename to modules/img/alg/src/dft.cc index 750628454..10f866cbc 100644 --- a/modules/iplt/alg/src/dft.cc +++ b/modules/img/alg/src/dft.cc @@ -21,7 +21,7 @@ #include "dft.hh" #include "fft.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { DFT::DFT(): ConstModOPAlgorithm("DFT") diff --git a/modules/iplt/alg/src/dft.hh b/modules/img/alg/src/dft.hh similarity index 86% rename from modules/iplt/alg/src/dft.hh rename to modules/img/alg/src/dft.hh index c30433d62..4c6aff95a 100644 --- a/modules/iplt/alg/src/dft.hh +++ b/modules/img/alg/src/dft.hh @@ -21,17 +21,17 @@ #ifndef IPLT_ALG_DFT_HH #define IPLT_ALG_DFT_HH -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { /// \brief Computes Fourier Trasnform honoring the origin of the image /// /// \sa \ref view_phase_diff.py "View Phase Diference Example" /// \sa \ref fft_li.py "View Fourier Transform Example" -class DLLEXPORT_IPLT_ALG DFT: public ConstModOPAlgorithm { +class DLLEXPORT_IMG_ALG DFT: public ConstModOPAlgorithm { public: DFT(); virtual ImageHandle Visit(const ConstImageHandle& h_in) const; diff --git a/modules/iplt/alg/src/discrete_shrink.cc b/modules/img/alg/src/discrete_shrink.cc similarity index 98% rename from modules/iplt/alg/src/discrete_shrink.cc rename to modules/img/alg/src/discrete_shrink.cc index f9b3d7b6a..3398c820b 100644 --- a/modules/iplt/alg/src/discrete_shrink.cc +++ b/modules/img/alg/src/discrete_shrink.cc @@ -23,7 +23,7 @@ #include "discrete_shrink.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { diff --git a/modules/iplt/alg/src/discrete_shrink.hh b/modules/img/alg/src/discrete_shrink.hh similarity index 87% rename from modules/iplt/alg/src/discrete_shrink.hh rename to modules/img/alg/src/discrete_shrink.hh index cc1a12910..cfd13b108 100644 --- a/modules/iplt/alg/src/discrete_shrink.hh +++ b/modules/img/alg/src/discrete_shrink.hh @@ -21,12 +21,12 @@ #ifndef IPLT_ALG_DISCRETE_SHRINK_HH #define IPLT_ALG_DISCRETE_SHRINK_HH -#include <ost/iplt/image.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/image.hh> +#include <ost/img/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { /// \brief shrink image by integral amount /// @@ -35,7 +35,7 @@ namespace ost { namespace iplt { namespace alg { /// changed with SetBlocksize(). The spatial sampling of the image is updated, /// such that the original size is virtually unchanged (assuming, that the /// block size is a divisor of the image size) -struct DLLEXPORT_IPLT_ALG DiscreteShrinkFnc { +struct DLLEXPORT_IMG_ALG DiscreteShrinkFnc { // initialize with blocksize DiscreteShrinkFnc(const Size& blocksize=Size(2,2,2)): bs_(blocksize) {} @@ -55,7 +55,7 @@ typedef ImageStateConstModOPAlgorithm<DiscreteShrinkFnc> DiscreteShrink; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateConstModOPAlgorithm<alg::DiscreteShrinkFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateConstModOPAlgorithm<alg::DiscreteShrinkFnc>) }} // ns diff --git a/modules/iplt/alg/src/fft.cc b/modules/img/alg/src/fft.cc similarity index 98% rename from modules/iplt/alg/src/fft.cc rename to modules/img/alg/src/fft.cc index be1e0b4bc..f38bd69f0 100644 --- a/modules/iplt/alg/src/fft.cc +++ b/modules/img/alg/src/fft.cc @@ -27,13 +27,13 @@ #include <fftw3.h> #include <ost/message.hh> -#include <ost/iplt/value_util.hh> -#include <ost/iplt/image_state/image_state_def.hh> +#include <ost/img/value_util.hh> +#include <ost/img/image_state/image_state_def.hh> #include "fft.hh" -#include <ost/iplt/alg/fftw_helper.hh> +#include <ost/img/alg/fftw_helper.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { template <class D> @@ -313,5 +313,5 @@ ImageStateBasePtr FFTFnc::VisitState(const ImageStateImpl<T,D>& s) const template class TEMPLATE_DEF_EXPORT image_state::ImageStateConstModOPAlgorithm<alg::FFTFnc>; -}} // iplt ns +}} // img ns diff --git a/modules/iplt/alg/src/fft.hh b/modules/img/alg/src/fft.hh similarity index 81% rename from modules/iplt/alg/src/fft.hh rename to modules/img/alg/src/fft.hh index 8bda9624f..59f1774ef 100644 --- a/modules/iplt/alg/src/fft.hh +++ b/modules/img/alg/src/fft.hh @@ -23,20 +23,20 @@ #include <ost/message.hh> -#include <ost/iplt/alg/module_config.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/image_state/image_state_algorithm.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/alg/module_config.hh> +#include <ost/img/image_state.hh> +#include <ost/img/image_state/image_state_algorithm.hh> +#include <ost/img/value_util.hh> #include <ost/message.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { struct FFTException: public Error { FFTException(const String& m): Error(m) {} }; -struct DLLEXPORT_IPLT_ALG FFTFnc { +struct DLLEXPORT_IMG_ALG FFTFnc { FFTFnc(); FFTFnc(bool); @@ -52,7 +52,7 @@ typedef image_state::ImageStateConstModOPAlgorithm<FFTFnc> FFT; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateConstModOPAlgorithm<alg::FFTFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateConstModOPAlgorithm<alg::FFTFnc>) }} // ns diff --git a/modules/iplt/alg/src/fftw_helper.hh b/modules/img/alg/src/fftw_helper.hh similarity index 100% rename from modules/iplt/alg/src/fftw_helper.hh rename to modules/img/alg/src/fftw_helper.hh diff --git a/modules/iplt/alg/src/fill.hh b/modules/img/alg/src/fill.hh similarity index 93% rename from modules/iplt/alg/src/fill.hh rename to modules/img/alg/src/fill.hh index a6e94f214..27f88107f 100644 --- a/modules/iplt/alg/src/fill.hh +++ b/modules/img/alg/src/fill.hh @@ -21,11 +21,11 @@ #ifndef IPLT_ALG_FILL_HH #define IPLT_ALG_FILL_HH -#include <ost/iplt/image.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { diff --git a/modules/iplt/alg/src/filter.hh b/modules/img/alg/src/filter.hh similarity index 100% rename from modules/iplt/alg/src/filter.hh rename to modules/img/alg/src/filter.hh diff --git a/modules/iplt/alg/src/fourier_filters.cc b/modules/img/alg/src/fourier_filters.cc similarity index 91% rename from modules/iplt/alg/src/fourier_filters.cc rename to modules/img/alg/src/fourier_filters.cc index ca54eb2b4..9ea483d86 100644 --- a/modules/iplt/alg/src/fourier_filters.cc +++ b/modules/img/alg/src/fourier_filters.cc @@ -24,11 +24,11 @@ #include <cmath> -#include <ost/iplt/alg/fft.hh> -#include <ost/iplt/data.hh> +#include <ost/img/alg/fft.hh> +#include <ost/img/data.hh> #include "fourier_filters.hh" -namespace ost { namespace iplt { namespace alg { namespace filter_detail { +namespace ost { namespace img { namespace alg { namespace filter_detail { Real calcF(const Point& point, const Vec3& sampl) { @@ -254,17 +254,17 @@ typedef ImageStateConstModIPAlgorithm<ButterworthLPBase> ButterworthLP; }}}} // ns #ifndef NO_EXPL_INST -template class ost::iplt::ImageStateConstModIPAlgorithm<ost::iplt::alg::filter_detail::LPBase>; -template class ost::iplt::ImageStateConstModIPAlgorithm<ost::iplt::alg::filter_detail::HPBase>; -template class ost::iplt::ImageStateConstModIPAlgorithm<ost::iplt::alg::filter_detail::GaussianLPBase>; -template class ost::iplt::ImageStateConstModIPAlgorithm<ost::iplt::alg::filter_detail::GaussianHPBase>; -template class ost::iplt::ImageStateConstModIPAlgorithm<ost::iplt::alg::filter_detail::FermiLPBase>; -template class ost::iplt::ImageStateConstModIPAlgorithm<ost::iplt::alg::filter_detail::ButterworthLPBase>; +template class ost::img::ImageStateConstModIPAlgorithm<ost::img::alg::filter_detail::LPBase>; +template class ost::img::ImageStateConstModIPAlgorithm<ost::img::alg::filter_detail::HPBase>; +template class ost::img::ImageStateConstModIPAlgorithm<ost::img::alg::filter_detail::GaussianLPBase>; +template class ost::img::ImageStateConstModIPAlgorithm<ost::img::alg::filter_detail::GaussianHPBase>; +template class ost::img::ImageStateConstModIPAlgorithm<ost::img::alg::filter_detail::FermiLPBase>; +template class ost::img::ImageStateConstModIPAlgorithm<ost::img::alg::filter_detail::ButterworthLPBase>; #endif -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { void LowPassFilter::Visit(ImageHandle& image) const { diff --git a/modules/iplt/alg/src/fourier_filters.hh b/modules/img/alg/src/fourier_filters.hh similarity index 90% rename from modules/iplt/alg/src/fourier_filters.hh rename to modules/img/alg/src/fourier_filters.hh index 7d4aedfd3..1d8f14cf6 100644 --- a/modules/iplt/alg/src/fourier_filters.hh +++ b/modules/img/alg/src/fourier_filters.hh @@ -26,15 +26,15 @@ #ifndef IPLT_ALG_FILTER_FOURIER_FILTERS_H #define IPLT_ALG_FILTER_FOURIER_FILTERS_H -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/image_state.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { //! Low Pass Filter /*! limit = cutoff in voxel sampling units */ -class DLLEXPORT_IPLT_ALG LowPassFilter : public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG LowPassFilter : public ConstModIPAlgorithm { public: @@ -55,7 +55,7 @@ class DLLEXPORT_IPLT_ALG LowPassFilter : public ConstModIPAlgorithm //! High Pass Filter /*! limit = cutoff in voxel sampling units */ -class DLLEXPORT_IPLT_ALG HighPassFilter : public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG HighPassFilter : public ConstModIPAlgorithm { public: @@ -77,7 +77,7 @@ class DLLEXPORT_IPLT_ALG HighPassFilter : public ConstModIPAlgorithm //! Gaussian Low Pass Filter /*! limit = cutoff in voxel sampling units */ /// \sa \ref spoke_pattern.py "Spoke Pattern Example" -class DLLEXPORT_IPLT_ALG GaussianLowPassFilter : public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG GaussianLowPassFilter : public ConstModIPAlgorithm { public: @@ -98,7 +98,7 @@ class DLLEXPORT_IPLT_ALG GaussianLowPassFilter : public ConstModIPAlgorithm //! Gaussian High Pass Filter /*! limit = cutoff in voxel sampling units */ -class DLLEXPORT_IPLT_ALG GaussianHighPassFilter : public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG GaussianHighPassFilter : public ConstModIPAlgorithm { public: @@ -121,7 +121,7 @@ class DLLEXPORT_IPLT_ALG GaussianHighPassFilter : public ConstModIPAlgorithm //! Fermi Low Pass Filter /*! limit = cutoff in voxel sampling units T = temperature parameter voxel sampling units */ -class DLLEXPORT_IPLT_ALG FermiLowPassFilter : public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG FermiLowPassFilter : public ConstModIPAlgorithm { public: @@ -148,7 +148,7 @@ class DLLEXPORT_IPLT_ALG FermiLowPassFilter : public ConstModIPAlgorithm //! Fermi High Pass Filter /*! limit = cutoff in voxel sampling units T = temperature parameter voxel sampling units */ -class DLLEXPORT_IPLT_ALG FermiHighPassFilter : public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG FermiHighPassFilter : public ConstModIPAlgorithm { public: @@ -175,7 +175,7 @@ class DLLEXPORT_IPLT_ALG FermiHighPassFilter : public ConstModIPAlgorithm //! Butterworth Low Pass Filter /*! limit = passband in voxel sampling units stop = stopband in voxel sampling units */ -class DLLEXPORT_IPLT_ALG ButterworthLowPassFilter : public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG ButterworthLowPassFilter : public ConstModIPAlgorithm { public: @@ -212,7 +212,7 @@ class DLLEXPORT_IPLT_ALG ButterworthLowPassFilter : public ConstModIPAlgorithm //! Butterworth High Pass Filter /*! limit = passband in voxel sampling units stop = stopband in voxel sampling units */ -class DLLEXPORT_IPLT_ALG ButterworthHighPassFilter : public ButterworthLowPassFilter +class DLLEXPORT_IMG_ALG ButterworthHighPassFilter : public ButterworthLowPassFilter { public: ButterworthHighPassFilter(Real limit=1.0,Real stop=1.0): diff --git a/modules/iplt/alg/src/fractional_shift.cc b/modules/img/alg/src/fractional_shift.cc similarity index 96% rename from modules/iplt/alg/src/fractional_shift.cc rename to modules/img/alg/src/fractional_shift.cc index f2ea776a2..9e11a82b0 100644 --- a/modules/iplt/alg/src/fractional_shift.cc +++ b/modules/img/alg/src/fractional_shift.cc @@ -23,10 +23,10 @@ */ #include <cmath> -#include <ost/iplt/alg/fft.hh> +#include <ost/img/alg/fft.hh> #include "fractional_shift.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { FractionalShift::FractionalShift(Real sx, Real sy, Real sz): ModIPAlgorithm("FractionalShift"), diff --git a/modules/iplt/alg/src/fractional_shift.hh b/modules/img/alg/src/fractional_shift.hh similarity index 91% rename from modules/iplt/alg/src/fractional_shift.hh rename to modules/img/alg/src/fractional_shift.hh index 6bdc5373f..8f06e37ee 100644 --- a/modules/iplt/alg/src/fractional_shift.hh +++ b/modules/img/alg/src/fractional_shift.hh @@ -25,11 +25,11 @@ #ifndef FRACTIONAL_SHIFT_HH_ #define FRACTIONAL_SHIFT_HH_ -#include <ost/iplt/algorithm.hh> +#include <ost/img/algorithm.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG FractionalShift: public ModIPAlgorithm +class DLLEXPORT_IMG_ALG FractionalShift: public ModIPAlgorithm { public: FractionalShift(Real sx=0.0, Real sy=0.0, Real sz=0.0); diff --git a/modules/iplt/alg/src/gaussian.cc b/modules/img/alg/src/gaussian.cc similarity index 99% rename from modules/iplt/alg/src/gaussian.cc rename to modules/img/alg/src/gaussian.cc index 9f56550ff..6e930a086 100644 --- a/modules/iplt/alg/src/gaussian.cc +++ b/modules/img/alg/src/gaussian.cc @@ -27,7 +27,7 @@ #include "gaussian.hh" namespace ost { -namespace iplt { +namespace img { namespace alg { GaussianFilterBase::GaussianFilterBase(Real sigma) diff --git a/modules/iplt/alg/src/gaussian.hh b/modules/img/alg/src/gaussian.hh similarity index 88% rename from modules/iplt/alg/src/gaussian.hh rename to modules/img/alg/src/gaussian.hh index 195a712e8..4be921f60 100644 --- a/modules/iplt/alg/src/gaussian.hh +++ b/modules/img/alg/src/gaussian.hh @@ -33,11 +33,11 @@ -#include <ost/iplt/algorithm.hh> +#include <ost/img/algorithm.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/image_state.hh> -#include <ost/iplt/image_state/image_state_visitor.hh> +#include <ost/img/image_state/image_state_visitor.hh> #include <ost/message.hh> @@ -49,7 +49,7 @@ -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { @@ -67,7 +67,7 @@ namespace ost { namespace iplt { namespace alg { */ -class DLLEXPORT_IPLT_ALG GaussianFilterBase +class DLLEXPORT_IMG_ALG GaussianFilterBase { @@ -139,7 +139,7 @@ typedef ImageStateModIPAlgorithm<GaussianFilterBase> GaussianFilter; -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateModIPAlgorithm<alg::GaussianFilterBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,image_state::ImageStateModIPAlgorithm<alg::GaussianFilterBase>) diff --git a/modules/iplt/alg/src/gaussian_gradient_magnitude.cc b/modules/img/alg/src/gaussian_gradient_magnitude.cc similarity index 99% rename from modules/iplt/alg/src/gaussian_gradient_magnitude.cc rename to modules/img/alg/src/gaussian_gradient_magnitude.cc index 527c565ee..15910773b 100644 --- a/modules/iplt/alg/src/gaussian_gradient_magnitude.cc +++ b/modules/img/alg/src/gaussian_gradient_magnitude.cc @@ -27,7 +27,7 @@ #include "gaussian_gradient_magnitude.hh" namespace ost { -namespace iplt { +namespace img { namespace alg { GaussianGradientMagnitudeFilterBase::GaussianGradientMagnitudeFilterBase(Real sigma) diff --git a/modules/iplt/alg/src/gaussian_gradient_magnitude.hh b/modules/img/alg/src/gaussian_gradient_magnitude.hh similarity index 88% rename from modules/iplt/alg/src/gaussian_gradient_magnitude.hh rename to modules/img/alg/src/gaussian_gradient_magnitude.hh index 56b894a04..bd9ce6a7b 100644 --- a/modules/iplt/alg/src/gaussian_gradient_magnitude.hh +++ b/modules/img/alg/src/gaussian_gradient_magnitude.hh @@ -25,14 +25,14 @@ #ifndef IPLT_ALG_FILTER_GAUSSIAN_GRADIENT_MAGNITUDE_H #define IPLT_ALG_FILTER_GAUSSIAN_GRADIENT_MAGNITUDE_H -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/image_state/image_state_visitor.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/image_state/image_state_visitor.hh> #include <ost/message.hh> #include "line_iterator.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { //! First Derivative Gaussian Filter /*! @@ -42,7 +42,7 @@ namespace ost { namespace iplt { namespace alg { I.T.Young, L.J. van Vliet,"Recursive implementation of the Gaussian filter",Signal Processing, 44(1995), 139-151 */ -class DLLEXPORT_IPLT_ALG GaussianGradientMagnitudeFilterBase +class DLLEXPORT_IMG_ALG GaussianGradientMagnitudeFilterBase { public: //! Initialization takes smoothing radius @@ -80,7 +80,7 @@ typedef ImageStateModIPAlgorithm<GaussianGradientMagnitudeFilterBase> GaussianGr } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::GaussianGradientMagnitudeFilterBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::GaussianGradientMagnitudeFilterBase>) }} // namespaces diff --git a/modules/iplt/alg/src/gaussian_laplacian.cc b/modules/img/alg/src/gaussian_laplacian.cc similarity index 99% rename from modules/iplt/alg/src/gaussian_laplacian.cc rename to modules/img/alg/src/gaussian_laplacian.cc index 6e7e82788..f5f5317b0 100644 --- a/modules/iplt/alg/src/gaussian_laplacian.cc +++ b/modules/img/alg/src/gaussian_laplacian.cc @@ -27,7 +27,7 @@ #include "gaussian_laplacian.hh" namespace ost { -namespace iplt { +namespace img { namespace alg { GaussianLaplacianFilterBase::GaussianLaplacianFilterBase(Real sigma) diff --git a/modules/iplt/alg/src/gaussian_laplacian.hh b/modules/img/alg/src/gaussian_laplacian.hh similarity index 88% rename from modules/iplt/alg/src/gaussian_laplacian.hh rename to modules/img/alg/src/gaussian_laplacian.hh index 492602c99..c38e0d151 100644 --- a/modules/iplt/alg/src/gaussian_laplacian.hh +++ b/modules/img/alg/src/gaussian_laplacian.hh @@ -25,14 +25,14 @@ #ifndef IPLT_ALG_FILTER_GAUSSIAN_LAPLACIAN_H #define IPLT_ALG_FILTER_GAUSSIAN_LAPLACIAN_H -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/image_state/image_state_visitor.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/image_state/image_state_visitor.hh> #include <ost/message.hh> #include "line_iterator.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { //! Gaussian Filter /*! @@ -42,7 +42,7 @@ namespace ost { namespace iplt { namespace alg { I.T.Young, L.J. van Vliet,"Recursive implementation of the Gaussian filter",Signal Processing, 44(1995), 139-151 */ -class DLLEXPORT_IPLT_ALG GaussianLaplacianFilterBase +class DLLEXPORT_IMG_ALG GaussianLaplacianFilterBase { public: //! Initialization takes smoothing radius @@ -80,7 +80,7 @@ typedef ImageStateModIPAlgorithm<GaussianLaplacianFilterBase> GaussianLaplacianF } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::GaussianLaplacianFilterBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::GaussianLaplacianFilterBase>) }} // namespaces diff --git a/modules/iplt/alg/src/highest_peak_search_3d.cc b/modules/img/alg/src/highest_peak_search_3d.cc similarity index 90% rename from modules/iplt/alg/src/highest_peak_search_3d.cc rename to modules/img/alg/src/highest_peak_search_3d.cc index aa4bceac2..aaedb0994 100644 --- a/modules/iplt/alg/src/highest_peak_search_3d.cc +++ b/modules/img/alg/src/highest_peak_search_3d.cc @@ -1,10 +1,10 @@ #include <iostream> #include <ost/log.hh> -#include <ost/iplt/alg/stat.hh> +#include <ost/img/alg/stat.hh> #include "highest_peak_search_3d.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace detail { @@ -68,17 +68,17 @@ namespace detail { returns true is the peak has been added, false otherwise */ - bool Add(const iplt::Peak& cand_peak) + bool Add(const img::Peak& cand_peak) { - static iplt::Peak minpeak(iplt::Point(0,0,0),-std::numeric_limits<Real>::max()); + static img::Peak minpeak(img::Point(0,0,0),-std::numeric_limits<Real>::max()); bool insert=true; bool remove_smaller=false; - iplt::PeakList::iterator min_it; + img::PeakList::iterator min_it; if(!list_.empty()) { min_it = list_.begin(); } - for(iplt::PeakList::iterator it=list_.begin();it!=list_.end();++it) + for(img::PeakList::iterator it=list_.begin();it!=list_.end();++it) { if(it->GetValue() < min_it->GetValue()) min_it = it; if (it->GetValue() >= cand_peak.GetValue() && detail::is_within(cand_peak, *it, exclusion_radius_)) { @@ -96,7 +96,7 @@ namespace detail { if (remove_smaller) { - iplt::PeakList::iterator new_end = remove_if(list_.begin(),list_.end(), + img::PeakList::iterator new_end = remove_if(list_.begin(),list_.end(), detail::is_smaller_and_within_radius(cand_peak,exclusion_radius_)); list_.erase(new_end,list_.end()); } @@ -110,14 +110,14 @@ namespace detail { } //! Gets list of peaks from collector - iplt::PeakList GetPeakList() const { return list_; } + img::PeakList GetPeakList() const { return list_; } //! Clears the peak list removing all peaks in the list void ClearPeakList() { list_.clear(); } private: - iplt::PeakList list_; + img::PeakList list_; unsigned int max_num_peaks_; int exclusion_radius_; diff --git a/modules/iplt/alg/src/highest_peak_search_3d.hh b/modules/img/alg/src/highest_peak_search_3d.hh similarity index 81% rename from modules/iplt/alg/src/highest_peak_search_3d.hh rename to modules/img/alg/src/highest_peak_search_3d.hh index dc979b71c..d61c8a847 100644 --- a/modules/iplt/alg/src/highest_peak_search_3d.hh +++ b/modules/img/alg/src/highest_peak_search_3d.hh @@ -1,16 +1,16 @@ -#ifndef OST_IPLT_ALG_HIGHEST_PEAK_SEARCH_3D_H -#define OST_IPLT_ALG_HIGHEST_PEAK_SEARCH_3D_H +#ifndef OST_IMG_ALG_HIGHEST_PEAK_SEARCH_3D_H +#define OST_IMG_ALG_HIGHEST_PEAK_SEARCH_3D_H #include <vector> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/peak.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/peak.hh> +#include <ost/img/image_state.hh> #include "module_config.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG HighestPeakSearch3DBase +class DLLEXPORT_IMG_ALG HighestPeakSearch3DBase { public: @@ -70,7 +70,7 @@ typedef ImageStateNonModAlgorithm<HighestPeakSearch3DBase> HighestPeakSearch3D; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::HighestPeakSearch3DBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::HighestPeakSearch3DBase>) }} // ns #endif // IPLT_ALG_DOCKING_HIGHEST_PEAK_SEARCH_3D_H diff --git a/modules/iplt/alg/src/histogram.cc b/modules/img/alg/src/histogram.cc similarity index 98% rename from modules/iplt/alg/src/histogram.cc rename to modules/img/alg/src/histogram.cc index f6b2e5588..50753ddc5 100644 --- a/modules/iplt/alg/src/histogram.cc +++ b/modules/img/alg/src/histogram.cc @@ -27,7 +27,7 @@ #include "stat.hh" #include "histogram.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { HistogramBase::HistogramBase(): bin_count_(10), diff --git a/modules/iplt/alg/src/histogram.hh b/modules/img/alg/src/histogram.hh similarity index 85% rename from modules/iplt/alg/src/histogram.hh rename to modules/img/alg/src/histogram.hh index 635ff89e7..e8d7210af 100644 --- a/modules/iplt/alg/src/histogram.hh +++ b/modules/img/alg/src/histogram.hh @@ -25,13 +25,13 @@ #include <ost/base.hh> #include <ost/message.hh> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG HistogramError: public Error { +class DLLEXPORT_IMG_ALG HistogramError: public Error { public: virtual ~HistogramError() throw() {} // required for typeinfo visibility HistogramError(const String& s): @@ -40,7 +40,7 @@ public: }; -class DLLEXPORT_IPLT_ALG HistogramBase +class DLLEXPORT_IMG_ALG HistogramBase { public: typedef std::vector<int> Bins; @@ -72,6 +72,6 @@ typedef ImageStateNonModAlgorithm<HistogramBase> Histogram; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::HistogramBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::HistogramBase>) }} // namespaces diff --git a/modules/iplt/alg/src/levenberg_marquardt.h b/modules/img/alg/src/levenberg_marquardt.h similarity index 98% rename from modules/iplt/alg/src/levenberg_marquardt.h rename to modules/img/alg/src/levenberg_marquardt.h index 8966d7764..f2e50c8c1 100644 --- a/modules/iplt/alg/src/levenberg_marquardt.h +++ b/modules/img/alg/src/levenberg_marquardt.h @@ -31,9 +31,9 @@ #include <cmath> -#include <ost/iplt/alg/numeric.h> +#include <ost/img/alg/numeric.h> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { template<typename Function, typename Jacobian, diff --git a/modules/iplt/alg/src/line_average.cc b/modules/img/alg/src/line_average.cc similarity index 96% rename from modules/iplt/alg/src/line_average.cc rename to modules/img/alg/src/line_average.cc index e5920f516..c8b2f2fd2 100644 --- a/modules/iplt/alg/src/line_average.cc +++ b/modules/img/alg/src/line_average.cc @@ -19,9 +19,9 @@ //------------------------------------------------------------------------------ #include "line_average.hh" #include <ost/message.hh> -#include <ost/iplt/alg/line_iterator.hh> +#include <ost/img/alg/line_iterator.hh> -namespace ost {namespace iplt { namespace alg { +namespace ost {namespace img { namespace alg { template <typename T, class D> ImageStateBasePtr LineAverageBase::VisitState(const ImageStateImpl<T,D>& isi) const diff --git a/modules/iplt/alg/src/line_average.hh b/modules/img/alg/src/line_average.hh similarity index 80% rename from modules/iplt/alg/src/line_average.hh rename to modules/img/alg/src/line_average.hh index 43154e783..3067c46f2 100644 --- a/modules/iplt/alg/src/line_average.hh +++ b/modules/img/alg/src/line_average.hh @@ -20,16 +20,16 @@ #ifndef IPLT_ALG_LINE_AVERAGE_HH #define IPLT_ALG_LINE_AVERAGE_HH -#include <ost/iplt/extent.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/image_state/image_state_algorithm.hh> +#include <ost/img/extent.hh> +#include <ost/img/image_state.hh> +#include <ost/img/image_state/image_state_algorithm.hh> #include <ost/dllexport.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { //! computes mean value of columns or lines -class DLLEXPORT_IPLT_ALG LineAverageBase +class DLLEXPORT_IMG_ALG LineAverageBase { public: @@ -38,7 +38,7 @@ class DLLEXPORT_IPLT_ALG LineAverageBase // image state algorithm interface template <typename T, class D> - iplt::ImageStateBasePtr VisitState(const ImageStateImpl<T,D>& s) const; + img::ImageStateBasePtr VisitState(const ImageStateImpl<T,D>& s) const; static String GetAlgorithmName() {return "LineAverage";} @@ -54,7 +54,7 @@ private: typedef image_state::ImageStateConstModOPAlgorithm<alg::LineAverageBase> LineAverage; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::LineAverageBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::LineAverageBase>) }} // ns #endif // IPLT_ALG_LINE_AVERAGE_HH diff --git a/modules/iplt/alg/src/line_iterator.cc b/modules/img/alg/src/line_iterator.cc similarity index 98% rename from modules/iplt/alg/src/line_iterator.cc rename to modules/img/alg/src/line_iterator.cc index 70a621141..f303f4b28 100644 --- a/modules/iplt/alg/src/line_iterator.cc +++ b/modules/img/alg/src/line_iterator.cc @@ -24,11 +24,11 @@ #include "line_iterator.hh" -#include <ost/iplt/extent_iterator.hh> +#include <ost/img/extent_iterator.hh> #include <ost/message.hh> namespace ost { -namespace iplt { +namespace img { namespace alg { diff --git a/modules/iplt/alg/src/line_iterator.hh b/modules/img/alg/src/line_iterator.hh similarity index 91% rename from modules/iplt/alg/src/line_iterator.hh rename to modules/img/alg/src/line_iterator.hh index 4fd4ea923..84a23e1a3 100644 --- a/modules/iplt/alg/src/line_iterator.hh +++ b/modules/img/alg/src/line_iterator.hh @@ -25,10 +25,10 @@ #ifndef IPLT_ALG_FILTER_LINE_ITERATOR_H #define IPLT_ALG_FILTER_LINE_ITERATOR_H -#include <ost/iplt/alg/module_config.hh> -#include <ost/iplt/extent.hh> +#include <ost/img/alg/module_config.hh> +#include <ost/img/extent.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { class ExtentIterator; @@ -38,11 +38,11 @@ namespace alg { /*! generates consecutive lines over given extent */ -class DLLEXPORT_IPLT_ALG LineIterator { +class DLLEXPORT_IMG_ALG LineIterator { public: //! Initialization with extent and flag /*! Flag determines which axes are scanned by the iterator: - (use the iplt::geometry::axis constants) + (use the img::geometry::axis constants) */ diff --git a/modules/iplt/alg/src/local_sigma_threshold.cc b/modules/img/alg/src/local_sigma_threshold.cc similarity index 96% rename from modules/iplt/alg/src/local_sigma_threshold.cc rename to modules/img/alg/src/local_sigma_threshold.cc index 6f585fffe..b8bedca1e 100644 --- a/modules/iplt/alg/src/local_sigma_threshold.cc +++ b/modules/img/alg/src/local_sigma_threshold.cc @@ -19,11 +19,11 @@ //------------------------------------------------------------------------------ #include <iostream> -#include <ost/iplt/value_util.hh> +#include <ost/img/value_util.hh> #include "local_sigma_threshold.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { LocalSigmaThresholdBase::LocalSigmaThresholdBase(): size_(5), diff --git a/modules/iplt/alg/src/local_sigma_threshold.hh b/modules/img/alg/src/local_sigma_threshold.hh similarity index 85% rename from modules/iplt/alg/src/local_sigma_threshold.hh rename to modules/img/alg/src/local_sigma_threshold.hh index d48a43e3b..e3e45c98a 100644 --- a/modules/iplt/alg/src/local_sigma_threshold.hh +++ b/modules/img/alg/src/local_sigma_threshold.hh @@ -20,11 +20,11 @@ #ifndef IPLT_ALG_COMMON_LOCAL_SIGMA_THRES #define IPLT_ALG_COMMON_LOCAL_SIGMA_THRES -#include <ost/iplt/image_state.hh> -#include <ost/iplt/image_state/image_state_algorithm.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image_state.hh> +#include <ost/img/image_state/image_state_algorithm.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { /* Binary threshold based on local standard deviation; for each point, @@ -35,7 +35,7 @@ namespace ost { namespace iplt { namespace alg { The output image is slightly smaller due to the edge being removed */ -class DLLEXPORT_IPLT_ALG LocalSigmaThresholdBase { +class DLLEXPORT_IMG_ALG LocalSigmaThresholdBase { public: LocalSigmaThresholdBase(); LocalSigmaThresholdBase(int size,Real level); @@ -54,7 +54,7 @@ typedef ImageStateConstModOPAlgorithm<LocalSigmaThresholdBase> LocalSigmaThresho } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::LocalSigmaThresholdBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::LocalSigmaThresholdBase>) }} // ns diff --git a/modules/iplt/alg/src/mask_image.cc b/modules/img/alg/src/mask_image.cc similarity index 95% rename from modules/iplt/alg/src/mask_image.cc rename to modules/img/alg/src/mask_image.cc index 95c0631cc..5f1488b3e 100644 --- a/modules/iplt/alg/src/mask_image.cc +++ b/modules/img/alg/src/mask_image.cc @@ -22,11 +22,11 @@ Authors: Andreas Schenk, Ansgar Philippsen */ -#include <ost/iplt/image_state.hh> +#include <ost/img/image_state.hh> #include "mask_image.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { MaskImageBase::MaskImageBase(){} // To make the compiler happy diff --git a/modules/iplt/alg/src/mask_image.hh b/modules/img/alg/src/mask_image.hh similarity index 85% rename from modules/iplt/alg/src/mask_image.hh rename to modules/img/alg/src/mask_image.hh index 1c5e48c47..51d9061c7 100644 --- a/modules/iplt/alg/src/mask_image.hh +++ b/modules/img/alg/src/mask_image.hh @@ -26,13 +26,13 @@ #define MASK_IMAGE_HH_ #include <ost/base.hh> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/mask.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/mask.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG MaskImageBase +class DLLEXPORT_IMG_ALG MaskImageBase { public: MaskImageBase(); // To make the compiler happy @@ -54,7 +54,7 @@ typedef ImageStateConstModIPAlgorithm<MaskImageBase> MaskImage; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<alg::MaskImageBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<alg::MaskImageBase>) }} // namespaces diff --git a/modules/iplt/alg/src/module_config.hh b/modules/img/alg/src/module_config.hh similarity index 73% rename from modules/iplt/alg/src/module_config.hh rename to modules/img/alg/src/module_config.hh index e4ece8b82..5a8966bd2 100644 --- a/modules/iplt/alg/src/module_config.hh +++ b/modules/img/alg/src/module_config.hh @@ -16,20 +16,20 @@ // along with this library; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ -#ifndef OST_IPLT_ALG_MODULE_CONFIG_HH -#define OST_IPLT_ALG_MODULE_CONFIG_HH +#ifndef OST_IMG_ALG_MODULE_CONFIG_HH +#define OST_IMG_ALG_MODULE_CONFIG_HH #include <ost/dllexport.hh> -#if defined(OST_MODULE_OST_IPLT_ALG) -# define DLLEXPORT_IPLT_ALG DLLEXPORT +#if defined(OST_MODULE_OST_IMG_ALG) +# define DLLEXPORT_IMG_ALG DLLEXPORT # if defined(_MSC_VER) -# define OST_IPLT_ALG_EXPLICIT_INST_DECL(c, t) +# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) # else -# define OST_IPLT_ALG_EXPLICIT_INST_DECL(c, t) extern template TEMPLATE_EXPORT c t; +# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) extern template TEMPLATE_EXPORT c t; # endif #else -# define DLLEXPORT_IPLT_ALG DLLIMPORT -# define OST_IPLT_ALG_EXPLICIT_INST_DECL(c, t) extern template c DLLIMPORT t; +# define DLLEXPORT_IMG_ALG DLLIMPORT +# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) extern template c DLLIMPORT t; #endif #endif diff --git a/modules/iplt/alg/src/negate.hh b/modules/img/alg/src/negate.hh similarity index 93% rename from modules/iplt/alg/src/negate.hh rename to modules/img/alg/src/negate.hh index 3594e9762..d2fea6207 100644 --- a/modules/iplt/alg/src/negate.hh +++ b/modules/img/alg/src/negate.hh @@ -21,10 +21,10 @@ #ifndef IPLT_ALG_NEGATE_HH #define IPLT_ALG_NEGATE_HH -#include <ost/iplt/image.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/image.hh> +#include <ost/img/image_state.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { diff --git a/modules/iplt/alg/src/norm.hh b/modules/img/alg/src/norm.hh similarity index 100% rename from modules/iplt/alg/src/norm.hh rename to modules/img/alg/src/norm.hh diff --git a/modules/iplt/alg/src/norm_linear.cc b/modules/img/alg/src/norm_linear.cc similarity index 98% rename from modules/iplt/alg/src/norm_linear.cc rename to modules/img/alg/src/norm_linear.cc index 92d32a582..36948743f 100644 --- a/modules/iplt/alg/src/norm_linear.cc +++ b/modules/img/alg/src/norm_linear.cc @@ -24,7 +24,7 @@ #include "norm_linear.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { LinearNormalizer::LinearNormalizer(): NormalizerImpl(), diff --git a/modules/iplt/alg/src/norm_linear.hh b/modules/img/alg/src/norm_linear.hh similarity index 88% rename from modules/iplt/alg/src/norm_linear.hh rename to modules/img/alg/src/norm_linear.hh index 4d29eee3c..7b1668928 100644 --- a/modules/iplt/alg/src/norm_linear.hh +++ b/modules/img/alg/src/norm_linear.hh @@ -25,12 +25,12 @@ #ifndef IPLT_NORM_LINEAR_H #define IPLT_NORM_LINEAR_H -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +#include <ost/img/normalizer_impl.hh> +#include <ost/img/alg/module_config.hh> +namespace ost { namespace img { namespace alg { //! linear normalization -class DLLEXPORT_IPLT_ALG LinearNormalizer: public NormalizerImpl { +class DLLEXPORT_IMG_ALG LinearNormalizer: public NormalizerImpl { public: // ctor LinearNormalizer(); @@ -51,7 +51,7 @@ private: Real offset_; }; -class DLLEXPORT_IPLT_ALG LinearRangeNormalizer: public LinearNormalizer, public RangeHandler { +class DLLEXPORT_IMG_ALG LinearRangeNormalizer: public LinearNormalizer, public RangeHandler { public: // ctor LinearRangeNormalizer(); diff --git a/modules/iplt/alg/src/norm_log.cc b/modules/img/alg/src/norm_log.cc similarity index 98% rename from modules/iplt/alg/src/norm_log.cc rename to modules/img/alg/src/norm_log.cc index 4673b3518..bfcdbc6c0 100644 --- a/modules/iplt/alg/src/norm_log.cc +++ b/modules/img/alg/src/norm_log.cc @@ -24,7 +24,7 @@ #include "norm_log.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { LogNormalizer::LogNormalizer(): NormalizerImpl(), diff --git a/modules/iplt/alg/src/norm_log.hh b/modules/img/alg/src/norm_log.hh similarity index 88% rename from modules/iplt/alg/src/norm_log.hh rename to modules/img/alg/src/norm_log.hh index 61f8b2b42..586134847 100644 --- a/modules/iplt/alg/src/norm_log.hh +++ b/modules/img/alg/src/norm_log.hh @@ -25,13 +25,13 @@ #ifndef IPLT_NORM_LOG_H #define IPLT_NORM_LOG_H -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { //! log normalization -class DLLEXPORT_IPLT_ALG LogNormalizer: public NormalizerImpl { +class DLLEXPORT_IMG_ALG LogNormalizer: public NormalizerImpl { public: // ctor LogNormalizer(); @@ -53,7 +53,7 @@ private: Real offset_; }; -class DLLEXPORT_IPLT_ALG LogRangeNormalizer: public LogNormalizer, public RangeHandler { +class DLLEXPORT_IMG_ALG LogRangeNormalizer: public LogNormalizer, public RangeHandler { public: // ctor LogRangeNormalizer(); diff --git a/modules/iplt/alg/src/norm_od.cc b/modules/img/alg/src/norm_od.cc similarity index 97% rename from modules/iplt/alg/src/norm_od.cc rename to modules/img/alg/src/norm_od.cc index 5cea31209..622fc93ae 100644 --- a/modules/iplt/alg/src/norm_od.cc +++ b/modules/img/alg/src/norm_od.cc @@ -23,7 +23,7 @@ */ #include "norm_od.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { TransmissionToODNormalizer::TransmissionToODNormalizer(): NormalizerImpl(), diff --git a/modules/iplt/alg/src/norm_od.hh b/modules/img/alg/src/norm_od.hh similarity index 89% rename from modules/iplt/alg/src/norm_od.hh rename to modules/img/alg/src/norm_od.hh index 53241efa1..f4f059fb1 100644 --- a/modules/iplt/alg/src/norm_od.hh +++ b/modules/img/alg/src/norm_od.hh @@ -25,12 +25,12 @@ #define NORM_OD_HH_ -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG TransmissionToODNormalizer: public NormalizerImpl { +class DLLEXPORT_IMG_ALG TransmissionToODNormalizer: public NormalizerImpl { public: // ctor TransmissionToODNormalizer(); diff --git a/modules/iplt/alg/src/normalizer.cc b/modules/img/alg/src/normalizer.cc similarity index 97% rename from modules/iplt/alg/src/normalizer.cc rename to modules/img/alg/src/normalizer.cc index 0252884e3..31d0d10d7 100644 --- a/modules/iplt/alg/src/normalizer.cc +++ b/modules/img/alg/src/normalizer.cc @@ -25,7 +25,7 @@ #include "normalizer.hh" -namespace ost { namespace iplt {namespace alg{ +namespace ost { namespace img {namespace alg{ Normalizer::Normalizer(const NormalizerPtr& ptr): ConstModIPAlgorithm("Normalizer"), diff --git a/modules/iplt/alg/src/normalizer.hh b/modules/img/alg/src/normalizer.hh similarity index 88% rename from modules/iplt/alg/src/normalizer.hh rename to modules/img/alg/src/normalizer.hh index 3b04e0c40..994edbbe3 100644 --- a/modules/iplt/alg/src/normalizer.hh +++ b/modules/img/alg/src/normalizer.hh @@ -25,13 +25,13 @@ #ifndef NORMALIZER_HH_ #define NORMALIZER_HH_ -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt {namespace alg{ +namespace ost { namespace img {namespace alg{ -class DLLEXPORT_IPLT_ALG Normalizer:public ConstModIPAlgorithm +class DLLEXPORT_IMG_ALG Normalizer:public ConstModIPAlgorithm { public: Normalizer(const NormalizerPtr& ptr); diff --git a/modules/iplt/alg/src/normalizer_factory.cc b/modules/img/alg/src/normalizer_factory.cc similarity index 96% rename from modules/iplt/alg/src/normalizer_factory.cc rename to modules/img/alg/src/normalizer_factory.cc index db4ec772e..e017d1914 100644 --- a/modules/iplt/alg/src/normalizer_factory.cc +++ b/modules/img/alg/src/normalizer_factory.cc @@ -24,10 +24,10 @@ Author: Andreas Schenk */ -#include <ost/iplt/alg/stat_min_max.hh> +#include <ost/img/alg/stat_min_max.hh> #include "normalizer_factory.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { Normalizer CreateNoOpNormalizer() { diff --git a/modules/iplt/alg/src/normalizer_factory.hh b/modules/img/alg/src/normalizer_factory.hh similarity index 60% rename from modules/iplt/alg/src/normalizer_factory.hh rename to modules/img/alg/src/normalizer_factory.hh index ae8062146..1c5a56575 100644 --- a/modules/iplt/alg/src/normalizer_factory.hh +++ b/modules/img/alg/src/normalizer_factory.hh @@ -24,7 +24,7 @@ Author: Andreas Schenk */ -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> #include "norm_linear.hh" #include "norm_log.hh" #include "norm_od.hh" @@ -33,16 +33,16 @@ #ifndef NORMALIZER_FACTORY_HH_ #define NORMALIZER_FACTORY_HH_ -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -DLLEXPORT_IPLT_ALG Normalizer CreateNoOpNormalizer(); -DLLEXPORT_IPLT_ALG Normalizer CreateLinearNormalizer(Real scale, Real offset); -DLLEXPORT_IPLT_ALG Normalizer CreateLinearRangeNormalizer(const ConstImageHandle& ih, Real minoutput, Real maxoutput); -DLLEXPORT_IPLT_ALG Normalizer CreateLinearRangeNormalizer(Real mininput,Real maxinput, Real minoutput, Real maxoutput); -DLLEXPORT_IPLT_ALG Normalizer CreateLogNormalizer(Real scale, Real min, Real offset); -DLLEXPORT_IPLT_ALG Normalizer CreateLogRangeNormalizer(const ConstImageHandle& ih, Real minoutput, Real maxoutput); -DLLEXPORT_IPLT_ALG Normalizer CreateLogRangeNormalizer(Real mininput,Real maxinput, Real minoutput, Real maxoutput); -DLLEXPORT_IPLT_ALG Normalizer CreateTransmissionToODNormalizer(Real mininput,Real maxinput, Real maxOD=10.0); +DLLEXPORT_IMG_ALG Normalizer CreateNoOpNormalizer(); +DLLEXPORT_IMG_ALG Normalizer CreateLinearNormalizer(Real scale, Real offset); +DLLEXPORT_IMG_ALG Normalizer CreateLinearRangeNormalizer(const ConstImageHandle& ih, Real minoutput, Real maxoutput); +DLLEXPORT_IMG_ALG Normalizer CreateLinearRangeNormalizer(Real mininput,Real maxinput, Real minoutput, Real maxoutput); +DLLEXPORT_IMG_ALG Normalizer CreateLogNormalizer(Real scale, Real min, Real offset); +DLLEXPORT_IMG_ALG Normalizer CreateLogRangeNormalizer(const ConstImageHandle& ih, Real minoutput, Real maxoutput); +DLLEXPORT_IMG_ALG Normalizer CreateLogRangeNormalizer(Real mininput,Real maxinput, Real minoutput, Real maxoutput); +DLLEXPORT_IMG_ALG Normalizer CreateTransmissionToODNormalizer(Real mininput,Real maxinput, Real maxOD=10.0); }}}//ns diff --git a/modules/iplt/alg/src/numeric.h b/modules/img/alg/src/numeric.h similarity index 99% rename from modules/iplt/alg/src/numeric.h rename to modules/img/alg/src/numeric.h index 6a75a2618..cbd5711c0 100644 --- a/modules/iplt/alg/src/numeric.h +++ b/modules/img/alg/src/numeric.h @@ -53,7 +53,7 @@ // typedef unsigned int uint; // #endif //_WIN32 -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { typedef Eigen::MatrixXf Mat; typedef Eigen::VectorXf Vec; diff --git a/modules/iplt/alg/src/polar.cc b/modules/img/alg/src/polar.cc similarity index 95% rename from modules/iplt/alg/src/polar.cc rename to modules/img/alg/src/polar.cc index e6734dfa9..46debe3c1 100644 --- a/modules/iplt/alg/src/polar.cc +++ b/modules/img/alg/src/polar.cc @@ -18,11 +18,11 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ #include "polar.hh" -#include <ost/iplt/image_state.hh> -#include <ost/iplt/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/algorithm.hh> #include <ost/geom/vecmat2_op.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace detail { @@ -33,7 +33,7 @@ public: static String GetAlgorithmName() {return "Polar";} template <typename T, class D> - ImageStateBasePtr VisitState(const iplt::ImageStateImpl<T,D>& isi) { + ImageStateBasePtr VisitState(const img::ImageStateImpl<T,D>& isi) { Size s=isi.GetExtent().GetSize(); // unsigned int rmax=static_cast<unsigned int>(std::min(s[0],s[1])*0.5); unsigned int rmax=static_cast<unsigned int>(round(sqrt(s[0]*s[0]+s[1]*s[1])*0.5)); diff --git a/modules/iplt/alg/src/polar.hh b/modules/img/alg/src/polar.hh similarity index 95% rename from modules/iplt/alg/src/polar.hh rename to modules/img/alg/src/polar.hh index 74da275f9..28aa496ea 100644 --- a/modules/iplt/alg/src/polar.hh +++ b/modules/img/alg/src/polar.hh @@ -21,7 +21,7 @@ #define IPLT_ALG_POLAR_HH #include <ost/base.hh> -#include <ost/iplt/algorithm.hh> +#include <ost/img/algorithm.hh> /* @@ -29,7 +29,7 @@ */ -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { class DLLEXPORT Polar: public ModOPAlgorithm { diff --git a/modules/iplt/alg/src/power_spectrum.cc b/modules/img/alg/src/power_spectrum.cc similarity index 98% rename from modules/iplt/alg/src/power_spectrum.cc rename to modules/img/alg/src/power_spectrum.cc index 653065f7d..38cd8ecf8 100644 --- a/modules/iplt/alg/src/power_spectrum.cc +++ b/modules/img/alg/src/power_spectrum.cc @@ -23,7 +23,7 @@ #include "fft.hh" #include "power_spectrum.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { PowerSpectrumFnc::PowerSpectrumFnc() {} diff --git a/modules/iplt/alg/src/power_spectrum.hh b/modules/img/alg/src/power_spectrum.hh similarity index 87% rename from modules/iplt/alg/src/power_spectrum.hh rename to modules/img/alg/src/power_spectrum.hh index 1cabffb22..49cffa5eb 100644 --- a/modules/iplt/alg/src/power_spectrum.hh +++ b/modules/img/alg/src/power_spectrum.hh @@ -21,11 +21,11 @@ #ifndef IPLT_ALG_POWERSPECTRUM_HH #define IPLT_ALG_POWERSPECTRUM_HH -#include <ost/iplt/image_state.hh> +#include <ost/img/image_state.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG PowerSpectrumFnc { +class DLLEXPORT_IMG_ALG PowerSpectrumFnc { public: PowerSpectrumFnc(); PowerSpectrumFnc(const ConstImageHandle& ref, bool wrap=true); @@ -44,7 +44,7 @@ typedef ImageStateConstModOPAlgorithm<PowerSpectrumFnc> PowerSpectrum; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::PowerSpectrumFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModOPAlgorithm<alg::PowerSpectrumFnc>) }} // ns diff --git a/modules/iplt/alg/src/randomize.cc b/modules/img/alg/src/randomize.cc similarity index 97% rename from modules/iplt/alg/src/randomize.cc rename to modules/img/alg/src/randomize.cc index 48a747712..9dd063ca2 100644 --- a/modules/iplt/alg/src/randomize.cc +++ b/modules/img/alg/src/randomize.cc @@ -20,7 +20,7 @@ #include "randomize.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { template class TEMPLATE_DEF_EXPORT ImageStateConstModIPAlgorithm<alg::RandomizeFnc>; diff --git a/modules/iplt/alg/src/randomize.hh b/modules/img/alg/src/randomize.hh similarity index 83% rename from modules/iplt/alg/src/randomize.hh rename to modules/img/alg/src/randomize.hh index 8ba3eaedb..06d088ecd 100644 --- a/modules/iplt/alg/src/randomize.hh +++ b/modules/img/alg/src/randomize.hh @@ -21,12 +21,12 @@ #ifndef IPLT_ALG_RANDOMIZE_HH #define IPLT_ALG_RANDOMIZE_HH -#include <ost/iplt/image_state.hh> -#include <ost/iplt/value_util.hh> -#include <ost/iplt/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +#include <ost/img/image_state.hh> +#include <ost/img/value_util.hh> +#include <ost/img/alg/module_config.hh> +namespace ost { namespace img { namespace alg { -struct DLLEXPORT_IPLT_ALG RandomizeFnc { +struct DLLEXPORT_IMG_ALG RandomizeFnc { template <typename T, class D> void VisitState(ImageStateImpl<T,D>& s) const { @@ -43,7 +43,7 @@ typedef ImageStateConstModIPAlgorithm<RandomizeFnc> Randomize; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<alg::RandomizeFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateConstModIPAlgorithm<alg::RandomizeFnc>) }} // ns diff --git a/modules/iplt/alg/src/rscrosscorr.cc b/modules/img/alg/src/rscrosscorr.cc similarity index 58% rename from modules/iplt/alg/src/rscrosscorr.cc rename to modules/img/alg/src/rscrosscorr.cc index 73a7efef4..e45488241 100644 --- a/modules/iplt/alg/src/rscrosscorr.cc +++ b/modules/img/alg/src/rscrosscorr.cc @@ -1,10 +1,10 @@ -#include <ost/iplt/image_state.hh> +#include <ost/img/image_state.hh> -namespace ost { namespace iplt { namespace alg { -Real RealSpatialCrossCorrelation(const iplt::ConstImageHandle& image1, const iplt::ConstImageHandle& image2, const iplt::Extent& extent) +namespace ost { namespace img { namespace alg { +Real RealSpatialCrossCorrelation(const img::ConstImageHandle& image1, const img::ConstImageHandle& image2, const img::Extent& extent) { - iplt::Extent image1_overlap=Overlap(image1.GetExtent(),extent); - iplt::Extent image2_overlap=Overlap(image2.GetExtent(),extent); + img::Extent image1_overlap=Overlap(image1.GetExtent(),extent); + img::Extent image2_overlap=Overlap(image2.GetExtent(),extent); if ( (image1.IsReal() && image2.IsReal())!=true ) { @@ -21,10 +21,10 @@ Real RealSpatialCrossCorrelation(const iplt::ConstImageHandle& image1, const ipl } else { ImageStateBasePtr base_is_pointer_image1 = image1.ImageStatePtr(); - boost::shared_ptr<iplt::RealSpatialImageState> image1_pointer = boost::dynamic_pointer_cast<iplt::RealSpatialImageState>(base_is_pointer_image1); + boost::shared_ptr<img::RealSpatialImageState> image1_pointer = boost::dynamic_pointer_cast<img::RealSpatialImageState>(base_is_pointer_image1); ImageStateBasePtr base_is_pointer_image2 = image2.ImageStatePtr(); - boost::shared_ptr<iplt::RealSpatialImageState> image2_pointer = boost::dynamic_pointer_cast<iplt::RealSpatialImageState>(base_is_pointer_image2); + boost::shared_ptr<img::RealSpatialImageState> image2_pointer = boost::dynamic_pointer_cast<img::RealSpatialImageState>(base_is_pointer_image2); Real corr=0.0; Real sum1=0.0; @@ -44,7 +44,7 @@ Real RealSpatialCrossCorrelation(const iplt::ConstImageHandle& image1, const ipl } } -Real RealSpatialCrossCorrelation(const iplt::ConstImageHandle& image1, const iplt::ConstImageHandle& image2) +Real RealSpatialCrossCorrelation(const img::ConstImageHandle& image1, const img::ConstImageHandle& image2) { return RealSpatialCrossCorrelation(image1, image2, image2.GetExtent()); } diff --git a/modules/iplt/alg/src/rscrosscorr.hh b/modules/img/alg/src/rscrosscorr.hh similarity index 58% rename from modules/iplt/alg/src/rscrosscorr.hh rename to modules/img/alg/src/rscrosscorr.hh index c38384898..4a4e7a297 100644 --- a/modules/iplt/alg/src/rscrosscorr.hh +++ b/modules/img/alg/src/rscrosscorr.hh @@ -1,19 +1,19 @@ #ifndef IPLT_ALG_REAL_SPACE_CROSSCORR_HH #define IPLT_ALG_REAL_SPACE_CROSSCORR_HH -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { //! Computes cross correlation of images /*! Both input images must be Real Spatial their extent should be the same. */ -Real DLLEXPORT_IPLT_ALG RealSpatialCrossCorrelation(const ConstImageHandle& image1, const ConstImageHandle& image2); +Real DLLEXPORT_IMG_ALG RealSpatialCrossCorrelation(const ConstImageHandle& image1, const ConstImageHandle& image2); //! Computes cross correlation of images /*! the cross correlation is computed only within the given extent. Both input images must be Real Spatial and their overlap with the given extent should be the same. */ -Real DLLEXPORT_IPLT_ALG RealSpatialCrossCorrelation(const ConstImageHandle& image1, const ConstImageHandle& image2, const iplt::Extent& extent); +Real DLLEXPORT_IMG_ALG RealSpatialCrossCorrelation(const ConstImageHandle& image1, const ConstImageHandle& image2, const img::Extent& extent); }}} // ns diff --git a/modules/iplt/alg/src/smooth_mask_image.cc b/modules/img/alg/src/smooth_mask_image.cc similarity index 94% rename from modules/iplt/alg/src/smooth_mask_image.cc rename to modules/img/alg/src/smooth_mask_image.cc index 33846c76f..f4156cc5b 100644 --- a/modules/iplt/alg/src/smooth_mask_image.cc +++ b/modules/img/alg/src/smooth_mask_image.cc @@ -22,13 +22,13 @@ Authors: Valerio Mariani */ -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/fill.hh> -#include <ost/iplt/alg/gaussian.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/fill.hh> +#include <ost/img/alg/gaussian.hh> #include "smooth_mask_image.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { SmoothMaskImageBase::SmoothMaskImageBase(){}; // To make the compiler happy diff --git a/modules/iplt/alg/src/smooth_mask_image.hh b/modules/img/alg/src/smooth_mask_image.hh similarity index 84% rename from modules/iplt/alg/src/smooth_mask_image.hh rename to modules/img/alg/src/smooth_mask_image.hh index b8f56346a..fad8bf388 100644 --- a/modules/iplt/alg/src/smooth_mask_image.hh +++ b/modules/img/alg/src/smooth_mask_image.hh @@ -26,14 +26,14 @@ #define SMOOTH_MASK_IMAGE_HH_ #include <ost/base.hh> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/alg/mask_image.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/alg/mask_image.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { -class DLLEXPORT_IPLT_ALG SmoothMaskImageBase +class DLLEXPORT_IMG_ALG SmoothMaskImageBase { public: SmoothMaskImageBase(); // To make the compiler happy @@ -55,7 +55,7 @@ typedef ImageStateModIPAlgorithm<SmoothMaskImageBase> SmoothMaskImage; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::SmoothMaskImageBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateModIPAlgorithm<alg::SmoothMaskImageBase>) }} // namespaces diff --git a/modules/iplt/alg/src/stat.cc b/modules/img/alg/src/stat.cc similarity index 98% rename from modules/iplt/alg/src/stat.cc rename to modules/img/alg/src/stat.cc index 840b1d4e7..bf271ad18 100644 --- a/modules/iplt/alg/src/stat.cc +++ b/modules/img/alg/src/stat.cc @@ -27,11 +27,11 @@ #include <iostream> #include <ost/message.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/value_util.hh> #include "stat.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { typedef std::pair<Real,Point> ValIndex; diff --git a/modules/iplt/alg/src/stat.hh b/modules/img/alg/src/stat.hh similarity index 89% rename from modules/iplt/alg/src/stat.hh rename to modules/img/alg/src/stat.hh index 2385fc120..37f98ccef 100644 --- a/modules/iplt/alg/src/stat.hh +++ b/modules/img/alg/src/stat.hh @@ -27,11 +27,11 @@ #include <iosfwd> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { /*! collect statistical information about data @@ -41,7 +41,7 @@ namespace ost { namespace iplt { namespace alg { act as the parent class of the actual algorithm class, Stat */ -class DLLEXPORT_IPLT_ALG StatBase +class DLLEXPORT_IMG_ALG StatBase { public: StatBase(): @@ -97,10 +97,10 @@ protected: typedef ImageStateNonModAlgorithm<StatBase> Stat; -DLLEXPORT_IPLT_ALG std::ostream& operator<<(std::ostream& o, const Stat& s); +DLLEXPORT_IMG_ALG std::ostream& operator<<(std::ostream& o, const Stat& s); } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::StatBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::StatBase>) }} // ns diff --git a/modules/iplt/alg/src/stat_min_max.cc b/modules/img/alg/src/stat_min_max.cc similarity index 97% rename from modules/iplt/alg/src/stat_min_max.cc rename to modules/img/alg/src/stat_min_max.cc index 2d5004a92..6e24552bf 100644 --- a/modules/iplt/alg/src/stat_min_max.cc +++ b/modules/img/alg/src/stat_min_max.cc @@ -27,11 +27,11 @@ #include <iostream> #include <ost/message.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/value_util.hh> #include "stat_min_max.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { typedef std::pair<Real,Point> ValIndex; diff --git a/modules/iplt/alg/src/stat_min_max.hh b/modules/img/alg/src/stat_min_max.hh similarity index 86% rename from modules/iplt/alg/src/stat_min_max.hh rename to modules/img/alg/src/stat_min_max.hh index ebe494cc7..6b0d0d991 100644 --- a/modules/iplt/alg/src/stat_min_max.hh +++ b/modules/img/alg/src/stat_min_max.hh @@ -27,11 +27,11 @@ #include <iosfwd> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { /*! collect statistical information about data @@ -42,7 +42,7 @@ namespace ost { namespace iplt { namespace alg { act as the parent class of the actual algorithm class, Stat */ -class DLLEXPORT_IPLT_ALG StatMinMaxBase +class DLLEXPORT_IMG_ALG StatMinMaxBase { public: StatMinMaxBase(): @@ -75,11 +75,11 @@ protected: typedef ImageStateNonModAlgorithm<StatMinMaxBase> StatMinMax; -DLLEXPORT_IPLT_ALG std::ostream& operator<<(std::ostream& o, const StatMinMax& s); +DLLEXPORT_IMG_ALG std::ostream& operator<<(std::ostream& o, const StatMinMax& s); } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::StatMinMaxBase>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class,ImageStateNonModAlgorithm<alg::StatMinMaxBase>) }} // ns diff --git a/modules/iplt/alg/src/threshold.cc b/modules/img/alg/src/threshold.cc similarity index 97% rename from modules/iplt/alg/src/threshold.cc rename to modules/img/alg/src/threshold.cc index 33eec5825..2408a7602 100644 --- a/modules/iplt/alg/src/threshold.cc +++ b/modules/img/alg/src/threshold.cc @@ -21,7 +21,7 @@ -namespace ost { namespace iplt { +namespace ost { namespace img { diff --git a/modules/iplt/alg/src/threshold.hh b/modules/img/alg/src/threshold.hh similarity index 92% rename from modules/iplt/alg/src/threshold.hh rename to modules/img/alg/src/threshold.hh index 109a899ef..8278fab6a 100644 --- a/modules/iplt/alg/src/threshold.hh +++ b/modules/img/alg/src/threshold.hh @@ -22,10 +22,10 @@ Author: Andreas Schenk */ -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { namespace { @@ -77,7 +77,7 @@ typedef ImageStateConstModIPAlgorithm<ThresholdFnc> Threshold; } -OST_IPLT_ALG_EXPLICIT_INST_DECL(class, ImageStateModIPAlgorithm<alg::ThresholdFnc>) +OST_IMG_ALG_EXPLICIT_INST_DECL(class, ImageStateModIPAlgorithm<alg::ThresholdFnc>) }} // ns diff --git a/modules/iplt/alg/src/transcendentals.hh b/modules/img/alg/src/transcendentals.hh similarity index 94% rename from modules/iplt/alg/src/transcendentals.hh rename to modules/img/alg/src/transcendentals.hh index 07c9991a1..34e695a13 100644 --- a/modules/iplt/alg/src/transcendentals.hh +++ b/modules/img/alg/src/transcendentals.hh @@ -21,7 +21,7 @@ /* "overloaded" transcendentals for images; instead of providing the typical func(image) interface, which would limit the use to out-of-place - application, a full fletched iplt::alg interface is given for each: + application, a full fletched img::alg interface is given for each: cos, exp, log, log10, pow, sin, sqrt, tan @@ -31,9 +31,9 @@ #ifndef IPLT_ALG_TRANS_HH #define IPLT_ALG_TRANS_HH -#include <ost/iplt/image.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/image.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/module_config.hh> #define IPLT_ALG_TRANSCENDENTALS_BLOCK(FF,NN,SS) \ @@ -58,7 +58,7 @@ struct FF { \ }; \ typedef ImageStateConstModIPAlgorithm<FF> NN; -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { IPLT_ALG_TRANSCENDENTALS_BLOCK(CosFnc,Cos,std::cos) IPLT_ALG_TRANSCENDENTALS_BLOCK(ExpFnc,Exp,std::exp) diff --git a/modules/iplt/alg/src/transform.hh b/modules/img/alg/src/transform.hh similarity index 100% rename from modules/iplt/alg/src/transform.hh rename to modules/img/alg/src/transform.hh diff --git a/modules/iplt/alg/src/transform_fw.hh b/modules/img/alg/src/transform_fw.hh similarity index 100% rename from modules/iplt/alg/src/transform_fw.hh rename to modules/img/alg/src/transform_fw.hh diff --git a/modules/iplt/alg/src/transformation_base.cc b/modules/img/alg/src/transformation_base.cc similarity index 98% rename from modules/iplt/alg/src/transformation_base.cc rename to modules/img/alg/src/transformation_base.cc index 59596b511..ccd1ac9d1 100644 --- a/modules/iplt/alg/src/transformation_base.cc +++ b/modules/img/alg/src/transformation_base.cc @@ -24,7 +24,7 @@ #include "transformation_base.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { Transformation::Transformation(): tmat_(),imat_() diff --git a/modules/iplt/alg/src/transformation_base.hh b/modules/img/alg/src/transformation_base.hh similarity index 88% rename from modules/iplt/alg/src/transformation_base.hh rename to modules/img/alg/src/transformation_base.hh index 1c99adf5d..4ddc8480f 100644 --- a/modules/iplt/alg/src/transformation_base.hh +++ b/modules/img/alg/src/transformation_base.hh @@ -24,17 +24,17 @@ Author: Ansgar Philippsen */ -#ifndef _IPLT_TRANSFORMATION_H -#define _IPLT_TRANSFORMATION_H +#ifndef _IMG_TRANSFORMATION_H +#define _IMG_TRANSFORMATION_H #include <cmath> -#include <ost/iplt/vecmat.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/point.hh> +#include <ost/img/vecmat.hh> +#include <ost/img/extent.hh> +#include <ost/img/point.hh> -#include <ost/iplt/alg/module_config.hh> -namespace ost { namespace iplt { namespace alg { +#include <ost/img/alg/module_config.hh> +namespace ost { namespace img { namespace alg { //! transformation base class /*! @@ -51,7 +51,7 @@ namespace ost { namespace iplt { namespace alg { given, the inverse will be calculated automatically. */ -class DLLEXPORT_IPLT_ALG Transformation { +class DLLEXPORT_IMG_ALG Transformation { public: enum SizeRule {ORIGINAL, FIT}; diff --git a/modules/iplt/alg/src/transformations.cc b/modules/img/alg/src/transformations.cc similarity index 98% rename from modules/iplt/alg/src/transformations.cc rename to modules/img/alg/src/transformations.cc index bf2e43170..8275ca0d8 100644 --- a/modules/iplt/alg/src/transformations.cc +++ b/modules/img/alg/src/transformations.cc @@ -28,7 +28,7 @@ #include "transformations.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { Rotate2D::Rotate2D(Real angle) { diff --git a/modules/iplt/alg/src/transformations.hh b/modules/img/alg/src/transformations.hh similarity index 85% rename from modules/iplt/alg/src/transformations.hh rename to modules/img/alg/src/transformations.hh index a1f958bcf..f2226a0fd 100644 --- a/modules/iplt/alg/src/transformations.hh +++ b/modules/img/alg/src/transformations.hh @@ -27,20 +27,20 @@ #ifndef IPLT_TRANSFORMATION_IMPL_HH #define IPLT_TRANSFORMATION_IMPL_HH -#include <ost/iplt/alg/module_config.hh> +#include <ost/img/alg/module_config.hh> #include "transformation_base.hh" -namespace ost { namespace iplt { namespace alg { +namespace ost { namespace img { namespace alg { //! rotate in XY plane -class DLLEXPORT_IPLT_ALG Rotate2D : public Transformation { +class DLLEXPORT_IMG_ALG Rotate2D : public Transformation { public: //! initialize 2D rotation with angle in radians Rotate2D(Real angle); }; //! rotate 90 degree CW in XY plane -class DLLEXPORT_IPLT_ALG Rotate2D90: public Transformation { +class DLLEXPORT_IMG_ALG Rotate2D90: public Transformation { public: //! initialize amount of 90deg CW rotations /*! @@ -52,14 +52,14 @@ public: }; //! apply scale -class DLLEXPORT_IPLT_ALG Scale: public Transformation { +class DLLEXPORT_IMG_ALG Scale: public Transformation { public: //! initialize uniform scaling Scale(Real s); }; //! apply translation -class DLLEXPORT_IPLT_ALG Translate: public Transformation { +class DLLEXPORT_IMG_ALG Translate: public Transformation { public: //! initialize translation along vector Translate(const Vec3& t); diff --git a/modules/iplt/alg/tests/CMakeLists.txt b/modules/img/alg/tests/CMakeLists.txt similarity index 85% rename from modules/iplt/alg/tests/CMakeLists.txt rename to modules/img/alg/tests/CMakeLists.txt index d1fcdc9bb..38decfcb4 100644 --- a/modules/iplt/alg/tests/CMakeLists.txt +++ b/modules/img/alg/tests/CMakeLists.txt @@ -18,4 +18,4 @@ test_transform.cc tests.cc ) -ost_unittest(iplt_alg "${IPLT_ALG_UNIT_TESTS}") +ost_unittest(img_alg "${IPLT_ALG_UNIT_TESTS}") diff --git a/modules/iplt/alg/tests/test_circular_mask.cc b/modules/img/alg/tests/test_circular_mask.cc similarity index 92% rename from modules/iplt/alg/tests/test_circular_mask.cc rename to modules/img/alg/tests/test_circular_mask.cc index 334339667..85bae5f44 100644 --- a/modules/iplt/alg/tests/test_circular_mask.cc +++ b/modules/img/alg/tests/test_circular_mask.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/circular_mask.hh> -#include <ost/iplt/alg/randomize.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/circular_mask.hh> +#include <ost/img/alg/randomize.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_clear.cc b/modules/img/alg/tests/test_clear.cc similarity index 91% rename from modules/iplt/alg/tests/test_clear.cc rename to modules/img/alg/tests/test_clear.cc index 83f60b6b0..f70ad0e60 100644 --- a/modules/iplt/alg/tests/test_clear.cc +++ b/modules/img/alg/tests/test_clear.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/clear.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/clear.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_conj.cc b/modules/img/alg/tests/test_conj.cc similarity index 92% rename from modules/iplt/alg/tests/test_conj.cc rename to modules/img/alg/tests/test_conj.cc index ab64947e6..818a7ddae 100644 --- a/modules/iplt/alg/tests/test_conj.cc +++ b/modules/img/alg/tests/test_conj.cc @@ -26,13 +26,13 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/conjugate.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/conjugate.hh> namespace { -using namespace ost::iplt; +using namespace ost::img; void test() { diff --git a/modules/iplt/alg/tests/test_convolute.cc b/modules/img/alg/tests/test_convolute.cc similarity index 89% rename from modules/iplt/alg/tests/test_convolute.cc rename to modules/img/alg/tests/test_convolute.cc index 9e1d707b8..b43d2a0e4 100644 --- a/modules/iplt/alg/tests/test_convolute.cc +++ b/modules/img/alg/tests/test_convolute.cc @@ -26,16 +26,16 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/convolute.hh> -#include <ost/iplt/alg/fft.hh> -#include <ost/iplt/alg/dft.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/convolute.hh> +#include <ost/img/alg/fft.hh> +#include <ost/img/alg/dft.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_discrete_shrink.cc b/modules/img/alg/tests/test_discrete_shrink.cc similarity index 91% rename from modules/iplt/alg/tests/test_discrete_shrink.cc rename to modules/img/alg/tests/test_discrete_shrink.cc index 0b1f2beaa..30be5ab06 100644 --- a/modules/iplt/alg/tests/test_discrete_shrink.cc +++ b/modules/img/alg/tests/test_discrete_shrink.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/discrete_shrink.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/discrete_shrink.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { alg::Randomize rnd; diff --git a/modules/iplt/alg/tests/test_fft.cc b/modules/img/alg/tests/test_fft.cc similarity index 99% rename from modules/iplt/alg/tests/test_fft.cc rename to modules/img/alg/tests/test_fft.cc index ed3b984d3..a06a7cd87 100644 --- a/modules/iplt/alg/tests/test_fft.cc +++ b/modules/img/alg/tests/test_fft.cc @@ -22,11 +22,11 @@ Author: Ansgar Philippsen */ #include <ost/base.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/fft.hh> -#include <ost/iplt/alg/dft.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/alg_shift.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/fft.hh> +#include <ost/img/alg/dft.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/alg_shift.hh> #include "tests.hh" #include "test_utils.hh" diff --git a/modules/iplt/alg/tests/test_fill.cc b/modules/img/alg/tests/test_fill.cc similarity index 91% rename from modules/iplt/alg/tests/test_fill.cc rename to modules/img/alg/tests/test_fill.cc index 0b80ef8b9..080be24fa 100644 --- a/modules/iplt/alg/tests/test_fill.cc +++ b/modules/img/alg/tests/test_fill.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/fill.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/fill.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_filter.cc b/modules/img/alg/tests/test_filter.cc similarity index 97% rename from modules/iplt/alg/tests/test_filter.cc rename to modules/img/alg/tests/test_filter.cc index 06346c9fe..d64b26038 100644 --- a/modules/iplt/alg/tests/test_filter.cc +++ b/modules/img/alg/tests/test_filter.cc @@ -24,13 +24,13 @@ #include <boost/test/unit_test.hpp> #include <iostream> -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/filter.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/normalizer_impl.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/filter.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/normalizer_impl.hh> -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void LineIterator1DTest() { @@ -411,8 +411,8 @@ void FilterTest() void FourierFiltersTest() { - using namespace ost::iplt; - using namespace ost::iplt::alg; + using namespace ost::img; + using namespace ost::img::alg; ImageHandle image = CreateImage(Size(40,40,40),REAL,SPATIAL); Vec3 vox_sampl(1.0,1.0,1.0); @@ -450,7 +450,7 @@ void FourierFiltersTest() } -DLLEXPORT_IPLT_ALG boost::unit_test::test_suite::test_suite* init_unit_test_suite( int argc, char* argv[] ) +DLLEXPORT_IMG_ALG boost::unit_test::test_suite::test_suite* init_unit_test_suite( int argc, char* argv[] ) { boost::unit_test::test_suite::test_suite* test = BOOST_TEST_SUITE( "FiltersTest" ); diff --git a/modules/iplt/alg/tests/test_histogram.cc b/modules/img/alg/tests/test_histogram.cc similarity index 93% rename from modules/iplt/alg/tests/test_histogram.cc rename to modules/img/alg/tests/test_histogram.cc index eb6593b74..bd563e572 100644 --- a/modules/iplt/alg/tests/test_histogram.cc +++ b/modules/img/alg/tests/test_histogram.cc @@ -26,13 +26,13 @@ -#include <ost/iplt/alg/histogram.hh> +#include <ost/img/alg/histogram.hh> #include "tests.hh" -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; namespace test_histogram { diff --git a/modules/iplt/alg/tests/test_mirror.cc b/modules/img/alg/tests/test_mirror.cc similarity index 91% rename from modules/iplt/alg/tests/test_mirror.cc rename to modules/img/alg/tests/test_mirror.cc index 56c3c8ce2..cc45d6b7b 100644 --- a/modules/iplt/alg/tests/test_mirror.cc +++ b/modules/img/alg/tests/test_mirror.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/alg_mirror.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/alg_mirror.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_negate.cc b/modules/img/alg/tests/test_negate.cc similarity index 90% rename from modules/iplt/alg/tests/test_negate.cc rename to modules/img/alg/tests/test_negate.cc index 5f7ec6945..6c6a7be38 100644 --- a/modules/iplt/alg/tests/test_negate.cc +++ b/modules/img/alg/tests/test_negate.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/negate.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/negate.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_power_spectrum.cc b/modules/img/alg/tests/test_power_spectrum.cc similarity index 93% rename from modules/iplt/alg/tests/test_power_spectrum.cc rename to modules/img/alg/tests/test_power_spectrum.cc index fd43545e2..46137342f 100644 --- a/modules/iplt/alg/tests/test_power_spectrum.cc +++ b/modules/img/alg/tests/test_power_spectrum.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/fft.hh> -#include <ost/iplt/alg/power_spectrum.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/fft.hh> +#include <ost/img/alg/power_spectrum.hh> namespace { -using namespace ost::iplt; +using namespace ost::img; void test_real() { diff --git a/modules/iplt/alg/tests/test_shift.cc b/modules/img/alg/tests/test_shift.cc similarity index 91% rename from modules/iplt/alg/tests/test_shift.cc rename to modules/img/alg/tests/test_shift.cc index d649ccdf4..8b2938c4e 100644 --- a/modules/iplt/alg/tests/test_shift.cc +++ b/modules/img/alg/tests/test_shift.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/alg_shift.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/alg_shift.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_stat.cc b/modules/img/alg/tests/test_stat.cc similarity index 94% rename from modules/iplt/alg/tests/test_stat.cc rename to modules/img/alg/tests/test_stat.cc index 33ef03e85..c96c3abde 100644 --- a/modules/iplt/alg/tests/test_stat.cc +++ b/modules/img/alg/tests/test_stat.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> -#include <ost/iplt/alg/stat.hh> +#include <ost/img/alg/stat.hh> namespace test_stat { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { Real val[3][3] = { diff --git a/modules/iplt/alg/tests/test_transform.cc b/modules/img/alg/tests/test_transform.cc similarity index 94% rename from modules/iplt/alg/tests/test_transform.cc rename to modules/img/alg/tests/test_transform.cc index a36d070f6..7ebf9b0a3 100644 --- a/modules/iplt/alg/tests/test_transform.cc +++ b/modules/img/alg/tests/test_transform.cc @@ -26,14 +26,14 @@ #include "tests.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/randomize.hh> -#include <ost/iplt/alg/transform.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/randomize.hh> +#include <ost/img/alg/transform.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::alg; +using namespace ost::img; +using namespace ost::img::alg; void test() { diff --git a/modules/iplt/alg/tests/test_utils.hh b/modules/img/alg/tests/test_utils.hh similarity index 94% rename from modules/iplt/alg/tests/test_utils.hh rename to modules/img/alg/tests/test_utils.hh index 5fe5573eb..cffaea498 100644 --- a/modules/iplt/alg/tests/test_utils.hh +++ b/modules/img/alg/tests/test_utils.hh @@ -29,11 +29,11 @@ #include <boost/test/test_tools.hpp> -//#include <iplt/base.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/value_util.hh> +//#include <img/base.hh> +#include <ost/img/image_state.hh> +#include <ost/img/value_util.hh> -using namespace ost::iplt; +using namespace ost::img; template<typename V,class DP> void Randomize(image_state::ImageStateImpl<V,DP>& isi) diff --git a/modules/iplt/alg/tests/tests.cc b/modules/img/alg/tests/tests.cc similarity index 95% rename from modules/iplt/alg/tests/tests.cc rename to modules/img/alg/tests/tests.cc index 796e0359a..7e7c89479 100644 --- a/modules/iplt/alg/tests/tests.cc +++ b/modules/img/alg/tests/tests.cc @@ -43,7 +43,7 @@ extern test_suite* CreateFFTTest(); extern test_suite* CreateNegateTest(); extern test_suite* CreateConjugateTest(); -bool init_ost_iplt_alg_unit_tests() { +bool init_ost_img_alg_unit_tests() { try { framework::master_test_suite().add(CreateShiftTest()); framework::master_test_suite().add(CreateMirrorTest()); @@ -65,6 +65,6 @@ bool init_ost_iplt_alg_unit_tests() { int main(int argc, char** argv) { - return boost::unit_test::unit_test_main(init_ost_iplt_alg_unit_tests, + return boost::unit_test::unit_test_main(init_ost_img_alg_unit_tests, argc, argv); } \ No newline at end of file diff --git a/modules/iplt/alg/tests/tests.hh b/modules/img/alg/tests/tests.hh similarity index 100% rename from modules/iplt/alg/tests/tests.hh rename to modules/img/alg/tests/tests.hh diff --git a/modules/iplt/base/CMakeLists.txt b/modules/img/base/CMakeLists.txt similarity index 100% rename from modules/iplt/base/CMakeLists.txt rename to modules/img/base/CMakeLists.txt diff --git a/modules/iplt/base/pymod/CMakeLists.txt b/modules/img/base/pymod/CMakeLists.txt similarity index 66% rename from modules/iplt/base/pymod/CMakeLists.txt rename to modules/img/base/pymod/CMakeLists.txt index 126e966de..aecb5eeb9 100644 --- a/modules/iplt/base/pymod/CMakeLists.txt +++ b/modules/img/base/pymod/CMakeLists.txt @@ -1,4 +1,4 @@ -set(OST_IPLT_PYMOD_SOURCES +set(OST_IMG_PYMOD_SOURCES export_data.cc export_data_algorithm.cc export_extent.cc @@ -13,8 +13,8 @@ export_size.cc export_mask.cc export_image_list.cc export_map.cc -wrap_iplt.cc +wrap_img.cc ) -pymod(NAME iplt OUTPUT_DIR ost/iplt - CPP ${OST_IPLT_PYMOD_SOURCES} PY __init__.py) +pymod(NAME img OUTPUT_DIR ost/img + CPP ${OST_IMG_PYMOD_SOURCES} PY __init__.py) diff --git a/modules/iplt/base/pymod/__init__.py b/modules/img/base/pymod/__init__.py similarity index 98% rename from modules/iplt/base/pymod/__init__.py rename to modules/img/base/pymod/__init__.py index ad30819ad..b4564fed2 100644 --- a/modules/iplt/base/pymod/__init__.py +++ b/modules/img/base/pymod/__init__.py @@ -16,5 +16,5 @@ # along with this library; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #------------------------------------------------------------------------------ -from _iplt import * +from _img import * MapHandle=ImageHandle diff --git a/modules/iplt/base/pymod/export_data.cc b/modules/img/base/pymod/export_data.cc similarity index 96% rename from modules/iplt/base/pymod/export_data.cc rename to modules/img/base/pymod/export_data.cc index 13ebe3201..a58f780d0 100644 --- a/modules/iplt/base/pymod/export_data.cc +++ b/modules/img/base/pymod/export_data.cc @@ -25,13 +25,13 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/data.hh> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/vecmat.hh> +#include <ost/img/data.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/vecmat.hh> void export_Data() { - using namespace ost::iplt; + using namespace ost::img; using namespace ost; enum_<DataType>("DataType") diff --git a/modules/iplt/base/pymod/export_data_algorithm.cc b/modules/img/base/pymod/export_data_algorithm.cc similarity index 98% rename from modules/iplt/base/pymod/export_data_algorithm.cc rename to modules/img/base/pymod/export_data_algorithm.cc index 704b60aa3..96bb5dfdf 100644 --- a/modules/iplt/base/pymod/export_data_algorithm.cc +++ b/modules/img/base/pymod/export_data_algorithm.cc @@ -25,10 +25,10 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/algorithm.hh> +#include <ost/img/algorithm.hh> #include <ost/message.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { // wrapper for const algorithm class PyNonModAlgorithm: public NonModAlgorithm { @@ -190,7 +190,7 @@ private: void export_DataAlgorithm() { - using namespace ost::iplt; + using namespace ost::img; // algorithm wrapper class_<AlgorithmBase, boost::noncopyable>("AlgorithmBase", no_init) .def("GetName",&AlgorithmBase::GetName, diff --git a/modules/iplt/base/pymod/export_extent.cc b/modules/img/base/pymod/export_extent.cc similarity index 99% rename from modules/iplt/base/pymod/export_extent.cc rename to modules/img/base/pymod/export_extent.cc index 88a6d56fe..fb82c5ee1 100644 --- a/modules/iplt/base/pymod/export_extent.cc +++ b/modules/img/base/pymod/export_extent.cc @@ -30,7 +30,7 @@ using namespace boost::python; void export_Extent() { - using namespace ost::iplt; + using namespace ost::img; bool (Extent::*contains1)(const Point&) const = &Extent::Contains; bool (Extent::*contains2)(const Extent&) const = &Extent::Contains; diff --git a/modules/iplt/base/pymod/export_function.cc b/modules/img/base/pymod/export_function.cc similarity index 96% rename from modules/iplt/base/pymod/export_function.cc rename to modules/img/base/pymod/export_function.cc index fe49b930f..3ff6fba48 100644 --- a/modules/iplt/base/pymod/export_function.cc +++ b/modules/img/base/pymod/export_function.cc @@ -23,10 +23,10 @@ */ #include <boost/python.hpp> -#include <ost/iplt/function.hh> +#include <ost/img/function.hh> using namespace boost::python; -namespace ost { namespace iplt { +namespace ost { namespace img { class WrapRealFunction: public RealFunction { @@ -79,7 +79,7 @@ private: void export_Function() { - using namespace ost::iplt; + using namespace ost::img; using namespace ost; class_<Function, bases<Data>, boost::noncopyable>("Function", no_init) .def("SetExtent",&Function::SetExtent) diff --git a/modules/iplt/base/pymod/export_image_handle.cc b/modules/img/base/pymod/export_image_handle.cc similarity index 98% rename from modules/iplt/base/pymod/export_image_handle.cc rename to modules/img/base/pymod/export_image_handle.cc index 28e967743..942e7b61c 100644 --- a/modules/iplt/base/pymod/export_image_handle.cc +++ b/modules/img/base/pymod/export_image_handle.cc @@ -25,12 +25,12 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image.hh> -#include <ost/iplt/function.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image.hh> +#include <ost/img/function.hh> #include "wrap_extent_iterator.hh" -using namespace ost::iplt; +using namespace ost::img; using namespace ost; namespace { diff --git a/modules/iplt/base/pymod/export_image_list.cc b/modules/img/base/pymod/export_image_list.cc similarity index 95% rename from modules/iplt/base/pymod/export_image_list.cc rename to modules/img/base/pymod/export_image_list.cc index b5977c1ec..6c06f7174 100644 --- a/modules/iplt/base/pymod/export_image_list.cc +++ b/modules/img/base/pymod/export_image_list.cc @@ -26,12 +26,12 @@ #include <boost/python/suite/indexing/vector_indexing_suite.hpp> using namespace boost::python; -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image.hh> -#include <ost/iplt/image_list.hh> -#include <ost/iplt/function.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image.hh> +#include <ost/img/image_list.hh> +#include <ost/img/function.hh> -using namespace ost::iplt; +using namespace ost::img; using namespace ost; BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(gallery_overloads, GetGallery, 0, 2) diff --git a/modules/iplt/base/pymod/export_map.cc b/modules/img/base/pymod/export_map.cc similarity index 96% rename from modules/iplt/base/pymod/export_map.cc rename to modules/img/base/pymod/export_map.cc index d9610615e..eea108c52 100644 --- a/modules/iplt/base/pymod/export_map.cc +++ b/modules/img/base/pymod/export_map.cc @@ -20,11 +20,11 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> namespace { -using namespace ost::iplt; +using namespace ost::img; using namespace ost; inline MapHandle c0() {return CreateMap();} @@ -69,7 +69,7 @@ M_CREATE_MAP(c1d,c2d,c3d,Point,Size); void export_Map() { - using namespace ost::iplt; + using namespace ost::img; def("CreateMap",c0); def("CreateMap",c1a); def("CreateMap",c2a); diff --git a/modules/iplt/base/pymod/export_mask.cc b/modules/img/base/pymod/export_mask.cc similarity index 96% rename from modules/iplt/base/pymod/export_mask.cc rename to modules/img/base/pymod/export_mask.cc index b26562142..6db4cf05e 100644 --- a/modules/iplt/base/pymod/export_mask.cc +++ b/modules/img/base/pymod/export_mask.cc @@ -25,9 +25,9 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/mask.hh> +#include <ost/img/mask.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { MaskPtr (*mask1)(const Polygon2&) =&Mask; MaskPtr (*mask2)(const Extent&) =&Mask; @@ -78,7 +78,7 @@ MaskPtr clone_wrap(MaskPtr* mptr) void export_Mask() { - using namespace ost::iplt; + using namespace ost::img; class_<MaskPtr>("MaskPtr", no_init) .def(self ^ self) diff --git a/modules/iplt/base/pymod/export_peak.cc b/modules/img/base/pymod/export_peak.cc similarity index 96% rename from modules/iplt/base/pymod/export_peak.cc rename to modules/img/base/pymod/export_peak.cc index 8555455e5..644f0baf9 100644 --- a/modules/iplt/base/pymod/export_peak.cc +++ b/modules/img/base/pymod/export_peak.cc @@ -26,12 +26,12 @@ #include <boost/python/suite/indexing/vector_indexing_suite.hpp> using namespace boost::python; -#include <ost/iplt/peak.hh> +#include <ost/img/peak.hh> void export_Peak() { - using namespace ost::iplt; + using namespace ost::img; class_<Peak, bases<Point> > ("Peak",init<int, int, int>() ) .def(init<Point>()) .def(init<Point, Real>()) diff --git a/modules/iplt/base/pymod/export_phase.cc b/modules/img/base/pymod/export_phase.cc similarity index 96% rename from modules/iplt/base/pymod/export_phase.cc rename to modules/img/base/pymod/export_phase.cc index e0dbc3f06..d4e9b13c9 100644 --- a/modules/iplt/base/pymod/export_phase.cc +++ b/modules/img/base/pymod/export_phase.cc @@ -26,12 +26,12 @@ using namespace boost::python; -#include <ost/iplt/phase.hh> +#include <ost/img/phase.hh> void export_Phase() { - using namespace ost::iplt; + using namespace ost::img; using namespace ost; class_<Phase> ("Phase" ,init<>()) .def(init<Complex>())//init<Complex> has to be before init<Real> because of implicit Real->Complex conversion diff --git a/modules/iplt/base/pymod/export_point.cc b/modules/img/base/pymod/export_point.cc similarity index 93% rename from modules/iplt/base/pymod/export_point.cc rename to modules/img/base/pymod/export_point.cc index 536a6fb42..121e0a296 100644 --- a/modules/iplt/base/pymod/export_point.cc +++ b/modules/img/base/pymod/export_point.cc @@ -26,10 +26,10 @@ #include <boost/python/suite/indexing/vector_indexing_suite.hpp> using namespace boost::python; -#include <ost/iplt/point_list.hh> -#include <ost/iplt/size.hh> +#include <ost/img/point_list.hh> +#include <ost/img/size.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { int point_len(const Point& p) {return 3;} @@ -40,7 +40,7 @@ void point_setitem(Point& p, int i, int v) {p[i]=v;} void export_Point() { - using namespace ost::iplt; + using namespace ost::img; // point wrapper class_<Point>("Point", init<optional<int,int,int> >(args("x","y","z"))) .def(init<const Size&>(args("size"))) @@ -72,7 +72,7 @@ void export_Point() void export_PointList() { - using namespace ost::iplt; + using namespace ost::img; class_<PointList>("PointList") .def(init<PeakList>()) .def(vector_indexing_suite<PointList>()) diff --git a/modules/iplt/base/pymod/export_progress.cc b/modules/img/base/pymod/export_progress.cc similarity index 75% rename from modules/iplt/base/pymod/export_progress.cc rename to modules/img/base/pymod/export_progress.cc index 441d17a48..7a15c854c 100644 --- a/modules/iplt/base/pymod/export_progress.cc +++ b/modules/img/base/pymod/export_progress.cc @@ -23,22 +23,22 @@ */ #include <boost/python.hpp> -#include <ost/iplt/progress.hh> +#include <ost/img/progress.hh> using namespace boost::python; //wrapper functions to facilitate passing of void ptr -void pregister1(ost::iplt::Progress& p,PyObject* x, unsigned long steps, unsigned long delta) { p.Register(x,steps,delta); } -void pregister2(ost::iplt::Progress& p,PyObject* x, unsigned long steps) { p.Register(x,steps,1); } -void pderegister(ost::iplt::Progress& p,PyObject* x) { p.DeRegister(x); } -void padvance1(ost::iplt::Progress& p,PyObject* x,unsigned long step) { p.AdvanceProgress(x,step); } -void padvance2(ost::iplt::Progress& p,PyObject* x) { p.AdvanceProgress(x,1); } +void pregister1(ost::img::Progress& p,PyObject* x, unsigned long steps, unsigned long delta) { p.Register(x,steps,delta); } +void pregister2(ost::img::Progress& p,PyObject* x, unsigned long steps) { p.Register(x,steps,1); } +void pderegister(ost::img::Progress& p,PyObject* x) { p.DeRegister(x); } +void padvance1(ost::img::Progress& p,PyObject* x,unsigned long step) { p.AdvanceProgress(x,step); } +void padvance2(ost::img::Progress& p,PyObject* x) { p.AdvanceProgress(x,1); } void export_Progress() { - using namespace ost::iplt; + using namespace ost::img; class_<Progress, boost::noncopyable>("ProgressInst", no_init) diff --git a/modules/iplt/base/pymod/export_raster_image.cc b/modules/img/base/pymod/export_raster_image.cc similarity index 94% rename from modules/iplt/base/pymod/export_raster_image.cc rename to modules/img/base/pymod/export_raster_image.cc index 9a7344c5b..4021348c7 100644 --- a/modules/iplt/base/pymod/export_raster_image.cc +++ b/modules/img/base/pymod/export_raster_image.cc @@ -25,12 +25,12 @@ #include <boost/python.hpp> using namespace boost::python; -#include <ost/iplt/raster_image/raster_image.hh> +#include <ost/img/raster_image/raster_image.hh> void export_RasterImage() { - using namespace ost::iplt; + using namespace ost::img; // raster image wrapper class_<RasterImage>("RasterImage", init<int,int>() ) .def("GeWidth",&RasterImage::GetWidth) diff --git a/modules/iplt/base/pymod/export_size.cc b/modules/img/base/pymod/export_size.cc similarity index 94% rename from modules/iplt/base/pymod/export_size.cc rename to modules/img/base/pymod/export_size.cc index 6558b012f..7827faa8f 100644 --- a/modules/iplt/base/pymod/export_size.cc +++ b/modules/img/base/pymod/export_size.cc @@ -23,11 +23,11 @@ */ #include <boost/python.hpp> -#include <ost/iplt/size.hh> -#include <ost/iplt/point.hh> +#include <ost/img/size.hh> +#include <ost/img/point.hh> using namespace boost::python; -namespace ost { namespace iplt { +namespace ost { namespace img { int size_len(const Size&) {return 3;} int size_getitem(const Size& s, int i) {return s[i];} @@ -37,7 +37,7 @@ void size_setitem(Size& s, int i, int v) {s[i]=v;} void export_Size() { - using namespace ost::iplt; + using namespace ost::img; // size wrapper class_<Size>("Size", init<optional<unsigned int, unsigned int, unsigned int> >(args("width","height","depth")) ) .def(init<const Point&,const Point&>(args("point1","point2"))) diff --git a/modules/iplt/base/pymod/wrap_extent_iterator.hh b/modules/img/base/pymod/wrap_extent_iterator.hh similarity index 92% rename from modules/iplt/base/pymod/wrap_extent_iterator.hh rename to modules/img/base/pymod/wrap_extent_iterator.hh index e1f94a41e..309d330c2 100644 --- a/modules/iplt/base/pymod/wrap_extent_iterator.hh +++ b/modules/img/base/pymod/wrap_extent_iterator.hh @@ -31,14 +31,14 @@ #define WRAP_EXTENT_ITERATOR_HH_ -#include <ost/iplt/extent.hh> -#include <ost/iplt/point.hh> -#include <ost/iplt/extent_iterator.hh> -#include <ost/iplt/image.hh> +#include <ost/img/extent.hh> +#include <ost/img/point.hh> +#include <ost/img/extent_iterator.hh> +#include <ost/img/image.hh> #include <boost/python.hpp> using namespace boost::python; -namespace ost { namespace iplt { +namespace ost { namespace img { class WrapExtentIterator { public: diff --git a/modules/iplt/base/pymod/wrap_iplt.cc b/modules/img/base/pymod/wrap_img.cc similarity index 94% rename from modules/iplt/base/pymod/wrap_iplt.cc rename to modules/img/base/pymod/wrap_img.cc index b03e46db2..20576672d 100644 --- a/modules/iplt/base/pymod/wrap_iplt.cc +++ b/modules/img/base/pymod/wrap_img.cc @@ -19,7 +19,7 @@ //------------------------------------------------------------------------------ /* - boost.python wrapper for iplt base library + boost.python wrapper for img base library Author: Ansgar Philippsen */ @@ -30,9 +30,9 @@ using namespace boost::python; #include <ost/base.hh> #include <ost/message.hh> -#include <ost/iplt/algorithm.hh> +#include <ost/img/algorithm.hh> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> // externally located global functions @@ -60,7 +60,7 @@ void translator(const ost::Message& x) { } // actual module definitions -BOOST_PYTHON_MODULE(_iplt) +BOOST_PYTHON_MODULE(_img) { // exception translators register_exception_translator<ost::Message>(&translator); diff --git a/modules/iplt/base/src/CMakeLists.txt b/modules/img/base/src/CMakeLists.txt similarity index 68% rename from modules/iplt/base/src/CMakeLists.txt rename to modules/img/base/src/CMakeLists.txt index fbe789df4..0d0e7e47a 100644 --- a/modules/iplt/base/src/CMakeLists.txt +++ b/modules/img/base/src/CMakeLists.txt @@ -2,7 +2,7 @@ add_subdirectory(raster_image) add_subdirectory(image_state) -set(OST_IPLT_SOURCES +set(OST_IMG_SOURCES data.cc data_algorithm.cc data_observer.cc @@ -35,7 +35,7 @@ progress.cc map.cc ) -set(OST_IPLT_HEADERS +set(OST_IMG_HEADERS algorithm.hh data_algorithm.hh data.hh @@ -93,16 +93,16 @@ map.hh ) -foreach(fname ${OST_IPLT_IMAGE_STATE_SOURCES}) - set(OST_IPLT_SOURCES ${OST_IPLT_SOURCES} image_state/${fname}) -endforeach(fname ${OST_IPLT_IMAGE_STATE_SOURCES}) +foreach(fname ${OST_IMG_IMAGE_STATE_SOURCES}) + set(OST_IMG_SOURCES ${OST_IMG_SOURCES} image_state/${fname}) +endforeach(fname ${OST_IMG_IMAGE_STATE_SOURCES}) -foreach(fname ${OST_IPLT_RASTER_IMAGE_SOURCES}) - set(OST_IPLT_SOURCES ${OST_IPLT_SOURCES} raster_image/${fname}) -endforeach(fname ${OST_IPLT_RASTER_IMAGE_SOURCES}) +foreach(fname ${OST_IMG_RASTER_IMAGE_SOURCES}) + set(OST_IMG_SOURCES ${OST_IMG_SOURCES} raster_image/${fname}) +endforeach(fname ${OST_IMG_RASTER_IMAGE_SOURCES}) -module(NAME iplt SOURCES "${OST_IPLT_SOURCES}" - HEADERS ${OST_IPLT_RASTER_IMAGE_HEADERS} IN_DIR raster_image - ${OST_IPLT_IMAGE_STATE_HEADERS} IN_DIR image_state - ${OST_IPLT_HEADERS} +module(NAME img SOURCES "${OST_IMG_SOURCES}" + HEADERS ${OST_IMG_RASTER_IMAGE_HEADERS} IN_DIR raster_image + ${OST_IMG_IMAGE_STATE_HEADERS} IN_DIR image_state + ${OST_IMG_HEADERS} DEPENDS_ON geom base) diff --git a/modules/iplt/base/src/algorithm.hh b/modules/img/base/src/algorithm.hh similarity index 97% rename from modules/iplt/base/src/algorithm.hh rename to modules/img/base/src/algorithm.hh index 796a3f10b..1fd3edc3d 100644 --- a/modules/iplt/base/src/algorithm.hh +++ b/modules/img/base/src/algorithm.hh @@ -28,7 +28,7 @@ #ifndef IPLT_ALGORITHM_H #define IPLT_ALGORITHM_H -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "data.hh" #include "data_algorithm.hh" #include "image_handle.hh" diff --git a/modules/iplt/base/src/base.hh b/modules/img/base/src/base.hh similarity index 98% rename from modules/iplt/base/src/base.hh rename to modules/img/base/src/base.hh index 64aec09ac..606b58836 100644 --- a/modules/iplt/base/src/base.hh +++ b/modules/img/base/src/base.hh @@ -59,7 +59,7 @@ inline int round(Real x) {return floor(x+0.5);} #endif #endif -namespace ost { namespace iplt { +namespace ost { namespace img { // String is not always predefined #ifndef String diff --git a/modules/iplt/base/src/circle_mask.cc b/modules/img/base/src/circle_mask.cc similarity index 98% rename from modules/iplt/base/src/circle_mask.cc rename to modules/img/base/src/circle_mask.cc index 875c1b963..bc685c16d 100644 --- a/modules/iplt/base/src/circle_mask.cc +++ b/modules/img/base/src/circle_mask.cc @@ -25,7 +25,7 @@ #include "circle_mask.hh" #include "mask_visitor.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { CircleMask::CircleMask(): Circle2() diff --git a/modules/iplt/base/src/circle_mask.hh b/modules/img/base/src/circle_mask.hh similarity index 96% rename from modules/iplt/base/src/circle_mask.hh rename to modules/img/base/src/circle_mask.hh index 78507ac89..279fc1803 100644 --- a/modules/iplt/base/src/circle_mask.hh +++ b/modules/img/base/src/circle_mask.hh @@ -22,7 +22,7 @@ Authors: Andreas Schenk, Ansgar Philippsen */ -#include <ost/iplt/vecmat.hh> +#include <ost/img/vecmat.hh> #include "mask_base.hh" #ifndef CIRCLE_MASK_HH_ @@ -30,7 +30,7 @@ -namespace ost { namespace iplt { +namespace ost { namespace img { class CircleMask: public MaskBase, public Circle2 { diff --git a/modules/iplt/base/src/composite_mask.cc b/modules/img/base/src/composite_mask.cc similarity index 98% rename from modules/iplt/base/src/composite_mask.cc rename to modules/img/base/src/composite_mask.cc index 8459cbbe6..4e455258f 100644 --- a/modules/iplt/base/src/composite_mask.cc +++ b/modules/img/base/src/composite_mask.cc @@ -25,7 +25,7 @@ #include "composite_mask.hh" #include "mask_visitor.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { bool AndOp::operator()(const MaskPtr& lhs, const MaskPtr& rhs, const Vec2& v) const diff --git a/modules/iplt/base/src/composite_mask.hh b/modules/img/base/src/composite_mask.hh similarity index 96% rename from modules/iplt/base/src/composite_mask.hh rename to modules/img/base/src/composite_mask.hh index ca688d5be..8c71381f0 100644 --- a/modules/iplt/base/src/composite_mask.hh +++ b/modules/img/base/src/composite_mask.hh @@ -27,7 +27,7 @@ #include "mask_base.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { class OpBase { @@ -64,7 +64,7 @@ public: typedef boost::shared_ptr<OpBase> OpPtr; -class DLLEXPORT_OST_IPLT_BASE CompositeMask: public MaskBase +class DLLEXPORT_OST_IMG_BASE CompositeMask: public MaskBase { public: CompositeMask(const MaskPtr& lhs, const MaskPtr& rhs,const String& op); diff --git a/modules/iplt/base/src/data.cc b/modules/img/base/src/data.cc similarity index 98% rename from modules/iplt/base/src/data.cc rename to modules/img/base/src/data.cc index fea3e75a2..9745bf83c 100644 --- a/modules/iplt/base/src/data.cc +++ b/modules/img/base/src/data.cc @@ -31,7 +31,7 @@ #include "extent_iterator.hh" #include "pixel_sampling.hh" -namespace ost { namespace iplt {; +namespace ost { namespace img {; // ConstData diff --git a/modules/iplt/base/src/data.hh b/modules/img/base/src/data.hh similarity index 97% rename from modules/iplt/base/src/data.hh rename to modules/img/base/src/data.hh index 263d5feb3..ecfecff13 100644 --- a/modules/iplt/base/src/data.hh +++ b/modules/img/base/src/data.hh @@ -31,7 +31,7 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include <ost/base.hh> #include "point.hh" #include "extent.hh" @@ -40,7 +40,7 @@ #include "vecmat.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { //using namespace info; @@ -67,7 +67,7 @@ class ImageHandle; In addition, a meta-info (InfoHandle) is associated with this data */ -class DLLEXPORT_OST_IPLT_BASE ConstData { +class DLLEXPORT_OST_IMG_BASE ConstData { public: /*! @name Initialization and Deconstruction */ @@ -250,7 +250,7 @@ private: It servers mainly as the base class for ImageHandle and Function. */ -class DLLEXPORT_OST_IPLT_BASE Data: public ConstData { +class DLLEXPORT_OST_IMG_BASE Data: public ConstData { public: /*! @name Initialization and Deconstruction */ @@ -289,6 +289,6 @@ public: -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/data_algorithm.cc b/modules/img/base/src/data_algorithm.cc similarity index 98% rename from modules/iplt/base/src/data_algorithm.cc rename to modules/img/base/src/data_algorithm.cc index 38d8551b2..b4b3c1632 100644 --- a/modules/iplt/base/src/data_algorithm.cc +++ b/modules/img/base/src/data_algorithm.cc @@ -26,7 +26,7 @@ // algorithm base -namespace ost { namespace iplt { +namespace ost { namespace img { AlgorithmBase::AlgorithmBase(const String& name): name_(name) diff --git a/modules/iplt/base/src/data_algorithm.hh b/modules/img/base/src/data_algorithm.hh similarity index 90% rename from modules/iplt/base/src/data_algorithm.hh rename to modules/img/base/src/data_algorithm.hh index dce3f9ead..2eaab697e 100644 --- a/modules/iplt/base/src/data_algorithm.hh +++ b/modules/img/base/src/data_algorithm.hh @@ -27,7 +27,7 @@ #ifndef IPLT_DATA_ALG_H #define IPLT_DATA_ALG_H -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "function_fw.hh" #include "image_fw.hh" @@ -38,14 +38,14 @@ algorithm has access to an info object for logging */ -namespace ost { namespace iplt { +namespace ost { namespace img { //! Algorithm base class /*! Provide common functionality for all algorithms. Only some sort of naming implemented. */ -class DLLEXPORT_OST_IPLT_BASE AlgorithmBase { +class DLLEXPORT_OST_IMG_BASE AlgorithmBase { public: //! Return name of algorithm const String& GetName() const; @@ -64,7 +64,7 @@ class DLLEXPORT_OST_IPLT_BASE AlgorithmBase { }; //! Non-modifying Algorithm, abstract base class -class DLLEXPORT_OST_IPLT_BASE NonModAlgorithm: public AlgorithmBase +class DLLEXPORT_OST_IMG_BASE NonModAlgorithm: public AlgorithmBase { public: //! visitor implementation for images @@ -89,7 +89,7 @@ protected: algorithm does not need to store values beyond the duraction of the Visit call, it is advisable to use ConstModIPAlgorithm */ -class DLLEXPORT_OST_IPLT_BASE ModIPAlgorithm: public AlgorithmBase +class DLLEXPORT_OST_IMG_BASE ModIPAlgorithm: public AlgorithmBase { public: virtual void Visit(ImageHandle& ih) = 0; @@ -107,7 +107,7 @@ protected: object, but is not able to modify its members from within this method. */ -class DLLEXPORT_OST_IPLT_BASE ConstModIPAlgorithm: public AlgorithmBase +class DLLEXPORT_OST_IMG_BASE ConstModIPAlgorithm: public AlgorithmBase { public: virtual void Visit(ImageHandle& ih) const = 0; @@ -125,7 +125,7 @@ protected: algorithm does not need to store values beyond the duraction of the Visit call, it is advisable to use ConstModOPAlgorithm */ -class DLLEXPORT_OST_IPLT_BASE ModOPAlgorithm: public AlgorithmBase +class DLLEXPORT_OST_IMG_BASE ModOPAlgorithm: public AlgorithmBase { public: virtual ImageHandle Visit(const ConstImageHandle& ih) = 0; @@ -143,7 +143,7 @@ protected: object, but is not able to modify its members from within this method. */ -class DLLEXPORT_OST_IPLT_BASE ConstModOPAlgorithm: public AlgorithmBase +class DLLEXPORT_OST_IMG_BASE ConstModOPAlgorithm: public AlgorithmBase { public: virtual ImageHandle Visit(const ConstImageHandle& ih) const= 0; diff --git a/modules/iplt/base/src/data_observer.cc b/modules/img/base/src/data_observer.cc similarity index 98% rename from modules/iplt/base/src/data_observer.cc rename to modules/img/base/src/data_observer.cc index 7db8308a1..978274e01 100644 --- a/modules/iplt/base/src/data_observer.cc +++ b/modules/img/base/src/data_observer.cc @@ -28,7 +28,7 @@ #include "data_observer.hh" #include "null_data.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { DataObserver::DataObserver(const Data& d): data_(boost::cref(d)) diff --git a/modules/iplt/base/src/data_observer.hh b/modules/img/base/src/data_observer.hh similarity index 95% rename from modules/iplt/base/src/data_observer.hh rename to modules/img/base/src/data_observer.hh index 8795b2ec5..fb384bf5d 100644 --- a/modules/iplt/base/src/data_observer.hh +++ b/modules/img/base/src/data_observer.hh @@ -31,10 +31,10 @@ #include "data.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { -class DLLEXPORT_OST_IPLT_BASE InvalidObserver: public Error { +class DLLEXPORT_OST_IMG_BASE InvalidObserver: public Error { public: InvalidObserver(const String& s = String("unknown")): Error(String("InvalidObserver exception occured: ") + s) @@ -57,7 +57,7 @@ public: reference as invalidated. A further call to GetObserved Data will throw an InvalidObserver exception! */ -class DLLEXPORT_OST_IPLT_BASE DataObserver { +class DLLEXPORT_OST_IMG_BASE DataObserver { public: //! constructor /*! @@ -111,7 +111,7 @@ private: }; -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/data_types.hh b/modules/img/base/src/data_types.hh similarity index 97% rename from modules/iplt/base/src/data_types.hh rename to modules/img/base/src/data_types.hh index 1713490c3..b8316fc94 100644 --- a/modules/iplt/base/src/data_types.hh +++ b/modules/img/base/src/data_types.hh @@ -31,7 +31,7 @@ -namespace ost { namespace iplt { +namespace ost { namespace img { #ifdef Complex @@ -64,6 +64,6 @@ enum DomainToColorMode {MODULUS, PHASECOLOR }; -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/debug.hh b/modules/img/base/src/debug.hh similarity index 100% rename from modules/iplt/base/src/debug.hh rename to modules/img/base/src/debug.hh diff --git a/modules/iplt/base/src/dllexport.hh b/modules/img/base/src/dllexport.hh similarity index 100% rename from modules/iplt/base/src/dllexport.hh rename to modules/img/base/src/dllexport.hh diff --git a/modules/iplt/base/src/extent.cc b/modules/img/base/src/extent.cc similarity index 98% rename from modules/iplt/base/src/extent.cc rename to modules/img/base/src/extent.cc index 76f100467..0bd3b7085 100644 --- a/modules/iplt/base/src/extent.cc +++ b/modules/img/base/src/extent.cc @@ -27,11 +27,11 @@ #include <cstdlib> #include <iostream> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "extent.hh" #include "vecmat.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { Extent::Extent() {set(Point(),Point());} diff --git a/modules/iplt/base/src/extent.hh b/modules/img/base/src/extent.hh similarity index 91% rename from modules/iplt/base/src/extent.hh rename to modules/img/base/src/extent.hh index 83c35f1ab..e80f6c355 100644 --- a/modules/iplt/base/src/extent.hh +++ b/modules/img/base/src/extent.hh @@ -42,9 +42,9 @@ add operators -> add/sub with point and extent */ -namespace ost { namespace iplt { +namespace ost { namespace img { -struct DLLEXPORT_OST_IPLT_BASE InvalidExtentException: public Error +struct DLLEXPORT_OST_IMG_BASE InvalidExtentException: public Error { InvalidExtentException(const String& m= String("") ): Error(String("an invalid extent occured ("+m+String(")"))) @@ -57,7 +57,7 @@ struct DLLEXPORT_OST_IPLT_BASE InvalidExtentException: public Error Encapsulates a start and end index. Size and Dimension are directly extracted from Extent. */ -class DLLEXPORT_OST_IPLT_BASE Extent { +class DLLEXPORT_OST_IMG_BASE Extent { public: //! default constructor Extent(); @@ -150,12 +150,12 @@ class DLLEXPORT_OST_IPLT_BASE Extent { // 'global' functions using extent -DLLEXPORT_OST_IPLT_BASE bool HasOverlap(const Extent& e1, const Extent& e2); -DLLEXPORT_OST_IPLT_BASE Extent Overlap(const Extent& e1, const Extent& e2); +DLLEXPORT_OST_IMG_BASE bool HasOverlap(const Extent& e1, const Extent& e2); +DLLEXPORT_OST_IMG_BASE Extent Overlap(const Extent& e1, const Extent& e2); -DLLEXPORT_OST_IPLT_BASE std::ostream& operator<<(std::ostream& os, const iplt::Extent &b); +DLLEXPORT_OST_IMG_BASE std::ostream& operator<<(std::ostream& os, const img::Extent &b); -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/extent_iterator.cc b/modules/img/base/src/extent_iterator.cc similarity index 99% rename from modules/iplt/base/src/extent_iterator.cc rename to modules/img/base/src/extent_iterator.cc index ac3af9787..d05e155d1 100644 --- a/modules/iplt/base/src/extent_iterator.cc +++ b/modules/img/base/src/extent_iterator.cc @@ -27,7 +27,7 @@ #include "extent_iterator.hh" #include "extent.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { ExtentIterator::ExtentIterator(const Extent& ext, unsigned int domain): start_(ext.GetStart()), diff --git a/modules/iplt/base/src/extent_iterator.hh b/modules/img/base/src/extent_iterator.hh similarity index 96% rename from modules/iplt/base/src/extent_iterator.hh rename to modules/img/base/src/extent_iterator.hh index e1981bee9..277326b4e 100644 --- a/modules/iplt/base/src/extent_iterator.hh +++ b/modules/img/base/src/extent_iterator.hh @@ -30,7 +30,7 @@ #include "point.hh" #include "data.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { class Extent; @@ -49,7 +49,7 @@ class Extent; \endcode \sa \ref view_phase_diff.py "View Phase Diference Example" */ -class DLLEXPORT_OST_IPLT_BASE ExtentIterator { +class DLLEXPORT_OST_IMG_BASE ExtentIterator { public: //! Initialize with Extent explicit ExtentIterator(const Extent& b, unsigned int domain=SPATIAL); @@ -108,6 +108,6 @@ class DLLEXPORT_OST_IPLT_BASE ExtentIterator { Point start_, end_, current_,startpos_; }; -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/extent_mask.cc b/modules/img/base/src/extent_mask.cc similarity index 99% rename from modules/iplt/base/src/extent_mask.cc rename to modules/img/base/src/extent_mask.cc index d01d79e0e..22e2c607f 100644 --- a/modules/iplt/base/src/extent_mask.cc +++ b/modules/img/base/src/extent_mask.cc @@ -26,7 +26,7 @@ #include "mask_visitor.hh" namespace ost { -namespace iplt +namespace img { ExtentMask::ExtentMask(const Extent& e): MaskBase(), diff --git a/modules/iplt/base/src/extent_mask.hh b/modules/img/base/src/extent_mask.hh similarity index 94% rename from modules/iplt/base/src/extent_mask.hh rename to modules/img/base/src/extent_mask.hh index f4c4c7926..c8bd9f933 100644 --- a/modules/iplt/base/src/extent_mask.hh +++ b/modules/img/base/src/extent_mask.hh @@ -29,10 +29,10 @@ #include "mask_base.hh" namespace ost { -namespace iplt +namespace img { -class DLLEXPORT_OST_IPLT_BASE ExtentMask : public MaskBase, public Extent +class DLLEXPORT_OST_IMG_BASE ExtentMask : public MaskBase, public Extent { public: ExtentMask(const Extent& e); diff --git a/modules/iplt/base/src/function.hh b/modules/img/base/src/function.hh similarity index 96% rename from modules/iplt/base/src/function.hh rename to modules/img/base/src/function.hh index 6a48d38b2..2672ae8df 100644 --- a/modules/iplt/base/src/function.hh +++ b/modules/img/base/src/function.hh @@ -32,14 +32,14 @@ #include "function_base.hh" #include "function_impl.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { /// \sa \ref modulate_image.py "Modulate Image Example" typedef detail::FunctionImpl<Real> RealFunction; typedef detail::FunctionImpl<Complex> ComplexFunction; -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/function_base.cc b/modules/img/base/src/function_base.cc similarity index 99% rename from modules/iplt/base/src/function_base.cc rename to modules/img/base/src/function_base.cc index e8850ed79..6531bf70b 100644 --- a/modules/iplt/base/src/function_base.cc +++ b/modules/img/base/src/function_base.cc @@ -29,7 +29,7 @@ #include "image_factory.hh" #include "image_handle.hh" namespace ost { -namespace iplt { +namespace img { Function::Function(DataDomain d, const Extent& e): extent_(e), diff --git a/modules/iplt/base/src/function_base.hh b/modules/img/base/src/function_base.hh similarity index 98% rename from modules/iplt/base/src/function_base.hh rename to modules/img/base/src/function_base.hh index a99bfa23f..7f679a741 100644 --- a/modules/iplt/base/src/function_base.hh +++ b/modules/img/base/src/function_base.hh @@ -32,7 +32,7 @@ #include "observable.hh" #include "pixel_sampling.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { // forward declaration class NonModAlgorithm; @@ -55,7 +55,7 @@ class ImageHandle; upon copy construction or assignement. */ -class DLLEXPORT_OST_IPLT_BASE Function: public Data { +class DLLEXPORT_OST_IMG_BASE Function: public Data { typedef Observable<DataObserver> DataObservable; public: diff --git a/modules/iplt/base/src/function_fw.hh b/modules/img/base/src/function_fw.hh similarity index 94% rename from modules/iplt/base/src/function_fw.hh rename to modules/img/base/src/function_fw.hh index e4a1b7f18..de1bd3083 100644 --- a/modules/iplt/base/src/function_fw.hh +++ b/modules/img/base/src/function_fw.hh @@ -27,9 +27,9 @@ #ifndef IPLT_FUNCTION_FW_H #define IPLT_FUNCTION_FW_H -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { class Function; }} diff --git a/modules/iplt/base/src/function_impl.cc b/modules/img/base/src/function_impl.cc similarity index 97% rename from modules/iplt/base/src/function_impl.cc rename to modules/img/base/src/function_impl.cc index 9a86af2f6..2d8cb01d4 100644 --- a/modules/iplt/base/src/function_impl.cc +++ b/modules/img/base/src/function_impl.cc @@ -27,7 +27,7 @@ #include "function_impl.hh" #include "value_util.hh" -namespace ost { namespace iplt { namespace detail { +namespace ost { namespace img { namespace detail { template <typename T> DataType FunctionImpl<T>::GetType() const diff --git a/modules/iplt/base/src/function_impl.hh b/modules/img/base/src/function_impl.hh similarity index 95% rename from modules/iplt/base/src/function_impl.hh rename to modules/img/base/src/function_impl.hh index 3e3348621..1048c02ee 100644 --- a/modules/iplt/base/src/function_impl.hh +++ b/modules/img/base/src/function_impl.hh @@ -28,10 +28,10 @@ #ifndef IPLT_FUNCTION_IMPL_H #define IPLT_FUNCTION_IMPL_H -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "function_base.hh" -namespace ost { namespace iplt { namespace detail { +namespace ost { namespace img { namespace detail { template <typename T> class TEMPLATE_EXPORT FunctionImpl: public Function { diff --git a/modules/iplt/base/src/image.hh b/modules/img/base/src/image.hh similarity index 97% rename from modules/iplt/base/src/image.hh rename to modules/img/base/src/image.hh index 90f553395..503e340ab 100644 --- a/modules/iplt/base/src/image.hh +++ b/modules/img/base/src/image.hh @@ -29,7 +29,7 @@ #define IPLT_IMAGE_H -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include <ost/base.hh> #include "point.hh" #include "size.hh" diff --git a/modules/iplt/base/src/image_factory.cc b/modules/img/base/src/image_factory.cc similarity index 98% rename from modules/iplt/base/src/image_factory.cc rename to modules/img/base/src/image_factory.cc index e1fdafb44..d8470acf6 100644 --- a/modules/iplt/base/src/image_factory.cc +++ b/modules/img/base/src/image_factory.cc @@ -33,7 +33,7 @@ #include "image_handle.hh" #include "image_state.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { ImageHandle DoCreateImage(const Extent& ext,DataType type,DataDomain dom) { diff --git a/modules/iplt/base/src/image_factory.hh b/modules/img/base/src/image_factory.hh similarity index 82% rename from modules/iplt/base/src/image_factory.hh rename to modules/img/base/src/image_factory.hh index f2f76cc4e..03a56b24a 100644 --- a/modules/iplt/base/src/image_factory.hh +++ b/modules/img/base/src/image_factory.hh @@ -28,13 +28,13 @@ #ifndef IPLT_IMAGE_FACTORY_HH #define IPLT_IMAGE_FACTORY_HH -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "extent.hh" #include "point.hh" #include "data_types.hh" #include "size.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { class Data; class ImageHandle; @@ -46,20 +46,20 @@ class ImageHandle; or \c COMPLEX), and the domain (\c SPATIAL (default), \c FREQUENCY or \c HALF_FREQUENCY ). */ -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateImage(const Extent& ext=Extent(), +ImageHandle DLLEXPORT_OST_IMG_BASE CreateImage(const Extent& ext=Extent(), DataType type=REAL, DataDomain dom=SPATIAL); //! convenience variant to create images -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateImage(const Size& s, const Point& o, +ImageHandle DLLEXPORT_OST_IMG_BASE CreateImage(const Size& s, const Point& o, DataType type=REAL, DataDomain dom=SPATIAL); -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateImage(const Point& p1, const Point& p2, +ImageHandle DLLEXPORT_OST_IMG_BASE CreateImage(const Point& p1, const Point& p2, DataType type=REAL, DataDomain dom=SPATIAL); -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateImage(const Point& p1, const Size& s, +ImageHandle DLLEXPORT_OST_IMG_BASE CreateImage(const Point& p1, const Size& s, DataType type=REAL, DataDomain dom=SPATIAL); @@ -67,13 +67,13 @@ ImageHandle DLLEXPORT_OST_IPLT_BASE CreateImage(const Point& p1, const Size& s, /* The returned image will have the extent of the given Data */ -ImageHandle DLLEXPORT_OST_IPLT_BASE GenerateImage(const Data& d); +ImageHandle DLLEXPORT_OST_IMG_BASE GenerateImage(const Data& d); //! Create image based on some data object (ie other image or function) /*! The returned image will have the extent given by second parameter */ -ImageHandle DLLEXPORT_OST_IPLT_BASE GenerateImage(const Data& d, const Extent& e); +ImageHandle DLLEXPORT_OST_IMG_BASE GenerateImage(const Data& d, const Extent& e); }} // namespace diff --git a/modules/iplt/base/src/image_fw.hh b/modules/img/base/src/image_fw.hh similarity index 95% rename from modules/iplt/base/src/image_fw.hh rename to modules/img/base/src/image_fw.hh index 1b3839d1b..ed8e1e1d8 100644 --- a/modules/iplt/base/src/image_fw.hh +++ b/modules/img/base/src/image_fw.hh @@ -28,9 +28,9 @@ #ifndef IPLT_IMAGE_FW_H #define IPLT_IMAGE_FW_H -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { class Point; class Size; class Extent; diff --git a/modules/iplt/base/src/image_handle.cc b/modules/img/base/src/image_handle.cc similarity index 99% rename from modules/iplt/base/src/image_handle.cc rename to modules/img/base/src/image_handle.cc index f92032868..125aac114 100644 --- a/modules/iplt/base/src/image_handle.cc +++ b/modules/img/base/src/image_handle.cc @@ -26,7 +26,7 @@ #include <ost/message.hh> #include <ost/log.hh> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "image_handle.hh" #include "point.hh" @@ -41,7 +41,7 @@ #include "image_state/image_state_factory.hh" #include "image_state/image_state_base.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { InvalidImageHandle::InvalidImageHandle(): Error("Attempt to use invalid ImageHandle") diff --git a/modules/iplt/base/src/image_handle.hh b/modules/img/base/src/image_handle.hh similarity index 88% rename from modules/iplt/base/src/image_handle.hh rename to modules/img/base/src/image_handle.hh index 18fa047ae..2bd869433 100644 --- a/modules/iplt/base/src/image_handle.hh +++ b/modules/img/base/src/image_handle.hh @@ -31,7 +31,7 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include <ost/message.hh> #include <ost/base.hh> @@ -44,13 +44,13 @@ #include "image_state/image_state_visitor_fw.hh" #include "image_state/image_state_base_fw.hh" -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> namespace test_image { void test_Observer(); } -namespace ost { namespace iplt { +namespace ost { namespace img { using image_state::ImageStateBase; using image_state::ImageStateBasePtr; @@ -72,7 +72,7 @@ class ModOPAlgorithm; class ConstModOPAlgorithm; //! Exception thrown upon invalid image handle usage -class DLLEXPORT_OST_IPLT_BASE InvalidImageHandle: public Error { +class DLLEXPORT_OST_IMG_BASE InvalidImageHandle: public Error { public: InvalidImageHandle(); }; @@ -109,7 +109,7 @@ class ConstImageHandle; All image manipulation routines are provided as algorithms, which are applied with the Apply() and ApplyIP() methods. */ -class DLLEXPORT_OST_IPLT_BASE ImageHandle: public Data { +class DLLEXPORT_OST_IMG_BASE ImageHandle: public Data { friend ImageHandle DoCreateImage(const Extent& e, DataType type, DataDomain dom); // for internal observer checking @@ -522,7 +522,7 @@ private: retyped and forwarded to the ImageHandle instance. It is a reference to this instance that is returned for the 'upcasting' to const Data& */ -class DLLEXPORT_OST_IPLT_BASE ConstImageHandle: public ConstData { +class DLLEXPORT_OST_IMG_BASE ConstImageHandle: public ConstData { friend class ImageHandle; public: //! pseudo 'upcasting' to <tt>const Data&</tt> @@ -719,38 +719,38 @@ private: */ // the other comparison ops are handled as member operators -DLLEXPORT_OST_IPLT_BASE bool operator==(const ImageHandle& lhs, const ConstImageHandle& rhs); -DLLEXPORT_OST_IPLT_BASE bool operator!=(const ImageHandle& lhs, const ConstImageHandle& rhs); - -DLLEXPORT_OST_IPLT_BASE ImageHandle operator+(const ConstImageHandle& h, Real v); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator+(const ConstImageHandle& h, const Complex& v); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator+(Real v, const ConstImageHandle& h); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator+(const Complex& v, const ConstImageHandle& h); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator-(const ConstImageHandle& h, Real v); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator-(const ConstImageHandle& h, const Complex& v); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator-(Real v, const ConstImageHandle& h); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator-(const Complex& v, const ConstImageHandle& h); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator*(const ConstImageHandle& h, Real v); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator*(const ConstImageHandle& h, const Complex& v); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator*(Real v, const ConstImageHandle& h); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator*(const Complex& v, const ConstImageHandle& h); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator/(const ConstImageHandle& h, Real v); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator/(const ConstImageHandle& h, const Complex& v); - -DLLEXPORT_OST_IPLT_BASE ImageHandle operator+(const ConstImageHandle& h1, const ConstImageHandle& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator-(const ConstImageHandle& h1, const ConstImageHandle& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator*(const ConstImageHandle& h1, const ConstImageHandle& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator/(const ConstImageHandle& h1, const ConstImageHandle& h2); - -DLLEXPORT_OST_IPLT_BASE ImageHandle operator+(const ConstImageHandle& h1, const Function& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator-(const ConstImageHandle& h1, const Function& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator*(const ConstImageHandle& h1, const Function& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator/(const ConstImageHandle& h1, const Function& h2); - -DLLEXPORT_OST_IPLT_BASE ImageHandle operator+(const Function& h1, const ConstImageHandle& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator-(const Function& h1, const ConstImageHandle& h2); -DLLEXPORT_OST_IPLT_BASE ImageHandle operator*(const Function& h1, const ConstImageHandle& h2); - -}} // namespace iplt +DLLEXPORT_OST_IMG_BASE bool operator==(const ImageHandle& lhs, const ConstImageHandle& rhs); +DLLEXPORT_OST_IMG_BASE bool operator!=(const ImageHandle& lhs, const ConstImageHandle& rhs); + +DLLEXPORT_OST_IMG_BASE ImageHandle operator+(const ConstImageHandle& h, Real v); +DLLEXPORT_OST_IMG_BASE ImageHandle operator+(const ConstImageHandle& h, const Complex& v); +DLLEXPORT_OST_IMG_BASE ImageHandle operator+(Real v, const ConstImageHandle& h); +DLLEXPORT_OST_IMG_BASE ImageHandle operator+(const Complex& v, const ConstImageHandle& h); +DLLEXPORT_OST_IMG_BASE ImageHandle operator-(const ConstImageHandle& h, Real v); +DLLEXPORT_OST_IMG_BASE ImageHandle operator-(const ConstImageHandle& h, const Complex& v); +DLLEXPORT_OST_IMG_BASE ImageHandle operator-(Real v, const ConstImageHandle& h); +DLLEXPORT_OST_IMG_BASE ImageHandle operator-(const Complex& v, const ConstImageHandle& h); +DLLEXPORT_OST_IMG_BASE ImageHandle operator*(const ConstImageHandle& h, Real v); +DLLEXPORT_OST_IMG_BASE ImageHandle operator*(const ConstImageHandle& h, const Complex& v); +DLLEXPORT_OST_IMG_BASE ImageHandle operator*(Real v, const ConstImageHandle& h); +DLLEXPORT_OST_IMG_BASE ImageHandle operator*(const Complex& v, const ConstImageHandle& h); +DLLEXPORT_OST_IMG_BASE ImageHandle operator/(const ConstImageHandle& h, Real v); +DLLEXPORT_OST_IMG_BASE ImageHandle operator/(const ConstImageHandle& h, const Complex& v); + +DLLEXPORT_OST_IMG_BASE ImageHandle operator+(const ConstImageHandle& h1, const ConstImageHandle& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator-(const ConstImageHandle& h1, const ConstImageHandle& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator*(const ConstImageHandle& h1, const ConstImageHandle& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator/(const ConstImageHandle& h1, const ConstImageHandle& h2); + +DLLEXPORT_OST_IMG_BASE ImageHandle operator+(const ConstImageHandle& h1, const Function& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator-(const ConstImageHandle& h1, const Function& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator*(const ConstImageHandle& h1, const Function& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator/(const ConstImageHandle& h1, const Function& h2); + +DLLEXPORT_OST_IMG_BASE ImageHandle operator+(const Function& h1, const ConstImageHandle& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator-(const Function& h1, const ConstImageHandle& h2); +DLLEXPORT_OST_IMG_BASE ImageHandle operator*(const Function& h1, const ConstImageHandle& h2); + +}} // namespace img #endif diff --git a/modules/iplt/base/src/image_handle_fw.hh b/modules/img/base/src/image_handle_fw.hh similarity index 97% rename from modules/iplt/base/src/image_handle_fw.hh rename to modules/img/base/src/image_handle_fw.hh index 4b4d57e81..fc1844ed8 100644 --- a/modules/iplt/base/src/image_handle_fw.hh +++ b/modules/img/base/src/image_handle_fw.hh @@ -27,7 +27,7 @@ #ifndef IPLT_IMAGE_HANDLE_FW_H #define IPLT_IMAGE_HANDLE_FW_H -namespace ost { namespace iplt { +namespace ost { namespace img { class ImageHandle; }}; diff --git a/modules/iplt/base/src/image_impl.cc b/modules/img/base/src/image_impl.cc similarity index 97% rename from modules/iplt/base/src/image_impl.cc rename to modules/img/base/src/image_impl.cc index ca5c843c3..09ec52126 100644 --- a/modules/iplt/base/src/image_impl.cc +++ b/modules/img/base/src/image_impl.cc @@ -22,7 +22,7 @@ #include "extent.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { ImageImpl CreateImageImpl(const Extent& e, DataType type, DataDomain dom) { diff --git a/modules/iplt/base/src/image_impl.hh b/modules/img/base/src/image_impl.hh similarity index 95% rename from modules/iplt/base/src/image_impl.hh rename to modules/img/base/src/image_impl.hh index 17f48cc6c..96880f534 100644 --- a/modules/iplt/base/src/image_impl.hh +++ b/modules/img/base/src/image_impl.hh @@ -29,10 +29,10 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "image_state_fw.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { /// \internal class Extent; diff --git a/modules/iplt/base/src/image_list.cc b/modules/img/base/src/image_list.cc similarity index 99% rename from modules/iplt/base/src/image_list.cc rename to modules/img/base/src/image_list.cc index 9e8a4d872..ce894a031 100644 --- a/modules/iplt/base/src/image_list.cc +++ b/modules/img/base/src/image_list.cc @@ -25,7 +25,7 @@ #include "image_list.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { ImageList::ImageList():std::vector<ImageHandle>() { } diff --git a/modules/iplt/base/src/image_list.hh b/modules/img/base/src/image_list.hh similarity index 91% rename from modules/iplt/base/src/image_list.hh rename to modules/img/base/src/image_list.hh index 9bb7f7345..f47c04dc9 100644 --- a/modules/iplt/base/src/image_list.hh +++ b/modules/img/base/src/image_list.hh @@ -26,9 +26,9 @@ #define IPLT_IMAGE_LIST_HH -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { @@ -37,10 +37,10 @@ namespace ost { namespace iplt { The image list, as its name suggests, contains a collection of images. The interface offers a collective load/save functionality as well as a collective Apply, which corresponds to a subset of the - Apply methods in the iplt::ImageHandle interface. + Apply methods in the img::ImageHandle interface. */ -class DLLEXPORT_OST_IPLT_BASE ImageList: public std::vector<ImageHandle> { +class DLLEXPORT_OST_IMG_BASE ImageList: public std::vector<ImageHandle> { public: ImageList(); ImageList(const ImageList& il); @@ -55,19 +55,19 @@ public: //! Apply a const algorithm to each image in the list /*! - see also iplt::ImageHandle::Apply(NonModAlgorithm&) + see also img::ImageHandle::Apply(NonModAlgorithm&) */ void Apply(NonModAlgorithm& a) const; //! Apply a const algorithm to each image in the list /*! - see also iplt::ImageHandle::Apply(NonModAlgorithm&) + see also img::ImageHandle::Apply(NonModAlgorithm&) */ void ApplyIP(NonModAlgorithm& a) const; //! Apply in-place Algorithm in-place to each image in the list /*! - see also iplt::ImageHandle::ApplyIP(ModIPAlgorithm&) + see also img::ImageHandle::ApplyIP(ModIPAlgorithm&) */ void ApplyIP(ModIPAlgorithm& a); @@ -77,7 +77,7 @@ public: the original list, on which the given algorithm has been applied out-of-place - See also iplt::ImageHandle::Apply(ModIPAlgorithm&) + See also img::ImageHandle::Apply(ModIPAlgorithm&) */ ImageList Apply(ModIPAlgorithm& a) const; diff --git a/modules/iplt/base/src/image_state.hh b/modules/img/base/src/image_state.hh similarity index 97% rename from modules/iplt/base/src/image_state.hh rename to modules/img/base/src/image_state.hh index cd6b2a1b6..35c0ec7b3 100644 --- a/modules/iplt/base/src/image_state.hh +++ b/modules/img/base/src/image_state.hh @@ -35,9 +35,9 @@ #include "image_state/image_state_algorithm.hh" #include "image_state/image_state_base.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { -// move essential names into iplt namespace +// move essential names into img namespace using image_state::ImageStateImpl; diff --git a/modules/iplt/base/src/image_state/CMakeLists.txt b/modules/img/base/src/image_state/CMakeLists.txt similarity index 87% rename from modules/iplt/base/src/image_state/CMakeLists.txt rename to modules/img/base/src/image_state/CMakeLists.txt index fd668e749..f02420efc 100644 --- a/modules/iplt/base/src/image_state/CMakeLists.txt +++ b/modules/img/base/src/image_state/CMakeLists.txt @@ -1,11 +1,11 @@ -set(OST_IPLT_IMAGE_STATE_SOURCES +set(OST_IMG_IMAGE_STATE_SOURCES image_state_factory.cc index.cc image_state_base.cc PARENT_SCOPE ) -set(OST_IPLT_IMAGE_STATE_HEADERS +set(OST_IMG_IMAGE_STATE_HEADERS binop.hh dispatch.hh image_state.hh diff --git a/modules/iplt/base/src/image_state/binop.cc b/modules/img/base/src/image_state/binop.cc similarity index 97% rename from modules/iplt/base/src/image_state/binop.cc rename to modules/img/base/src/image_state/binop.cc index 03f0d7f6d..6ebd30fc8 100644 --- a/modules/iplt/base/src/image_state/binop.cc +++ b/modules/img/base/src/image_state/binop.cc @@ -28,9 +28,9 @@ #include "binop.hh" -#include <ost/iplt/extent_iterator.hh> +#include <ost/img/extent_iterator.hh> -namespace ost { namespace iplt { namespace image_state { namespace binop { +namespace ost { namespace img { namespace image_state { namespace binop { template<typename T1, class D1, typename T2, class D2> void fnc_add_ip<T1,D1,T2,D2>::operator()(ImageStateImpl<T1,D1>* lhs, const ImageStateImpl<T2,D2>* rhs) diff --git a/modules/iplt/base/src/image_state/binop.hh b/modules/img/base/src/image_state/binop.hh similarity index 96% rename from modules/iplt/base/src/image_state/binop.hh rename to modules/img/base/src/image_state/binop.hh index df12805b9..7c039fd7d 100644 --- a/modules/iplt/base/src/image_state/binop.hh +++ b/modules/img/base/src/image_state/binop.hh @@ -27,7 +27,7 @@ #include "dispatch.hh" -namespace ost { namespace iplt { namespace image_state { namespace binop { +namespace ost { namespace img { namespace image_state { namespace binop { // add template<typename T1, class D1, typename T2, class D2> diff --git a/modules/iplt/base/src/image_state/dispatch.hh b/modules/img/base/src/image_state/dispatch.hh similarity index 99% rename from modules/iplt/base/src/image_state/dispatch.hh rename to modules/img/base/src/image_state/dispatch.hh index 9c3cd9d44..88f4061c6 100644 --- a/modules/iplt/base/src/image_state/dispatch.hh +++ b/modules/img/base/src/image_state/dispatch.hh @@ -33,7 +33,7 @@ #include "image_state_impl.hh" #include "image_state_def.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { class DispatchException: public Error { public: diff --git a/modules/iplt/base/src/image_state/dispatch_fw.hh b/modules/img/base/src/image_state/dispatch_fw.hh similarity index 95% rename from modules/iplt/base/src/image_state/dispatch_fw.hh rename to modules/img/base/src/image_state/dispatch_fw.hh index efcf4bc60..bd6990944 100644 --- a/modules/iplt/base/src/image_state/dispatch_fw.hh +++ b/modules/img/base/src/image_state/dispatch_fw.hh @@ -21,7 +21,7 @@ #ifndef IPLT_IMAGE_STATE_DISPATCH_FW_HH #define IPLT_IMAGE_STATE_DISPATCH_FW_HH -namespace ost { namespace iplt { namespace image_state { namespace dispatch { +namespace ost { namespace img { namespace image_state { namespace dispatch { template <template <typename T, class D> class FNC> struct unary_dispatch_ip; diff --git a/modules/iplt/base/src/image_state/image_state.hh b/modules/img/base/src/image_state/image_state.hh similarity index 100% rename from modules/iplt/base/src/image_state/image_state.hh rename to modules/img/base/src/image_state/image_state.hh diff --git a/modules/iplt/base/src/image_state/image_state_algorithm.cc b/modules/img/base/src/image_state/image_state_algorithm.cc similarity index 93% rename from modules/iplt/base/src/image_state/image_state_algorithm.cc rename to modules/img/base/src/image_state/image_state_algorithm.cc index 6ac4b0492..afaa2e7e4 100644 --- a/modules/iplt/base/src/image_state/image_state_algorithm.cc +++ b/modules/img/base/src/image_state/image_state_algorithm.cc @@ -22,10 +22,10 @@ Author: Ansgar Philippsen */ -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> #include "image_state_algorithm.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { }}} // ns diff --git a/modules/iplt/base/src/image_state/image_state_algorithm.hh b/modules/img/base/src/image_state/image_state_algorithm.hh similarity index 96% rename from modules/iplt/base/src/image_state/image_state_algorithm.hh rename to modules/img/base/src/image_state/image_state_algorithm.hh index 40f405911..c7fbbadab 100644 --- a/modules/iplt/base/src/image_state/image_state_algorithm.hh +++ b/modules/img/base/src/image_state/image_state_algorithm.hh @@ -25,12 +25,12 @@ #ifndef IPLT_IMAGE_STATE_ALGORITHM_HH #define IPLT_IMAGE_STATE_ALGORITHM_HH -#include <ost/iplt/image.hh> -#include <ost/iplt/data_algorithm.hh> +#include <ost/img/image.hh> +#include <ost/img/data_algorithm.hh> #include "image_state_visitor.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { /* one-time definition of the constructor adapters, allowing @@ -232,17 +232,17 @@ namespace ost { namespace iplt { namespace image_state { the NonModAlgorithm and the ImageStateNonModVisitor by implementing both interfaces. The template is expected to be a class with two methods, a VisitState() method as for - iplt::image_state::ImageStateNonModVisitor, and in addition a + img::image_state::ImageStateNonModVisitor, and in addition a Visit(const Function&) method for the implementation of the - iplt::NonModAlgorithm interface and a static GetAlgorithmName() for - the initialization of the iplt::NonModAlgorithm ctor + img::NonModAlgorithm interface and a static GetAlgorithmName() for + the initialization of the img::NonModAlgorithm ctor \code class MyVisitorFnc { public: template<typename T, class D> - void VisitState(const iplt::image_state::ImageStateImpl<T,D>& isi); + void VisitState(const img::image_state::ImageStateImpl<T,D>& isi); void VisitFunction(const Funcion& f); @@ -255,7 +255,7 @@ namespace ost { namespace iplt { namespace image_state { internally by re-routing it automatically to the ImageStateVisitor. For comments about the constructor and remaining interface of FNC, see - iplt::image_state::ImageStateNonModVisitor + img::image_state::ImageStateNonModVisitor */ template <class FNC> class TEMPLATE_EXPORT ImageStateNonModAlgorithm: public FNC, public NonModAlgorithm, public ImageStateNonModVisitorBase { @@ -296,14 +296,14 @@ private: /*! offers a combined image state visitor as well as image handle algorithm. The template parameter is expected to be a class offering VisitState (see - iplt::image_state::ImageStateModIPVisitor ), plus a static GetAlgorithmName() method: + img::image_state::ImageStateModIPVisitor ), plus a static GetAlgorithmName() method: \code class MyVisitorFnc { public: template<typename T, class D> - void VisitState(iplt::image_state::ImageStateImpl<T,D>& isi); + void VisitState(img::image_state::ImageStateImpl<T,D>& isi); static String GetAlgorithmName(); }; @@ -339,14 +339,14 @@ private: /*! offers a combined image state const visitor as well as image handle algorithm. The template parameter is expected to be a class offering VisitState (see - iplt::image_state::ImageStateConstModIPVisitor ), plus a static GetAlgorithmName() method: + img::image_state::ImageStateConstModIPVisitor ), plus a static GetAlgorithmName() method: \code class MyVisitorFnc { public: template<typename T, class D> - void VisitState(iplt::image_state::ImageStateImpl<T,D>& isi) const; + void VisitState(img::image_state::ImageStateImpl<T,D>& isi) const; static String GetAlgorithmName(); }; diff --git a/modules/iplt/base/src/image_state/image_state_base.cc b/modules/img/base/src/image_state/image_state_base.cc similarity index 96% rename from modules/iplt/base/src/image_state/image_state_base.cc rename to modules/img/base/src/image_state/image_state_base.cc index e3f6434d7..11a6eab2e 100644 --- a/modules/iplt/base/src/image_state/image_state_base.cc +++ b/modules/img/base/src/image_state/image_state_base.cc @@ -25,7 +25,7 @@ #include "image_state_base.hh" #include "binop.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { ImageStateBase& ImageStateBase::operator+=(const ImageStateBase& b) { diff --git a/modules/iplt/base/src/image_state/image_state_base.hh b/modules/img/base/src/image_state/image_state_base.hh similarity index 98% rename from modules/iplt/base/src/image_state/image_state_base.hh rename to modules/img/base/src/image_state/image_state_base.hh index 7dc7a5270..56f6194fd 100644 --- a/modules/iplt/base/src/image_state/image_state_base.hh +++ b/modules/img/base/src/image_state/image_state_base.hh @@ -30,12 +30,12 @@ #include "image_state_base_fw.hh" #include <ost/base.hh> -#include <ost/iplt/function.hh> +#include <ost/img/function.hh> #include "image_state_visitor_fw.hh" #include "type_fw.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { class PixelSampling; @@ -49,7 +49,7 @@ namespace image_state { stored, but the interpretation is left to the 'user' of the image state, either the Image class or any ImageStateVisitor */ -class DLLEXPORT_OST_IPLT_BASE ImageStateBase { +class DLLEXPORT_OST_IMG_BASE ImageStateBase { public: virtual ~ImageStateBase() {} diff --git a/modules/iplt/base/src/image_state/image_state_base_fw.hh b/modules/img/base/src/image_state/image_state_base_fw.hh similarity index 95% rename from modules/iplt/base/src/image_state/image_state_base_fw.hh rename to modules/img/base/src/image_state/image_state_base_fw.hh index 94faf382c..e0585ffd6 100644 --- a/modules/iplt/base/src/image_state/image_state_base_fw.hh +++ b/modules/img/base/src/image_state/image_state_base_fw.hh @@ -27,7 +27,7 @@ #include <boost/shared_ptr.hpp> -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { class ImageStateBase; typedef boost::shared_ptr<ImageStateBase> ImageStateBasePtr; diff --git a/modules/iplt/base/src/image_state/image_state_def.hh b/modules/img/base/src/image_state/image_state_def.hh similarity index 96% rename from modules/iplt/base/src/image_state/image_state_def.hh rename to modules/img/base/src/image_state/image_state_def.hh index d039f9ffa..745079083 100644 --- a/modules/iplt/base/src/image_state/image_state_def.hh +++ b/modules/img/base/src/image_state/image_state_def.hh @@ -34,7 +34,7 @@ #include "image_state_frequency_domain.hh" #include "image_state_half_frequency_domain.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { typedef ImageStateImpl<Real, SpatialDomain> RealSpatialImageState; typedef ImageStateImpl<Real, FrequencyDomain> RealFrequencyImageState; @@ -46,7 +46,7 @@ typedef ImageStateImpl<Word, SpatialDomain> WordSpatialImageState; } // namespace image_state -#if defined(OST_MODULE_OST_IPLT) +#if defined(OST_MODULE_OST_IMG) # if defined(_MSC_VER) # define OST_DECL_IMAGE_STATE(c, v, d) # else diff --git a/modules/iplt/base/src/image_state/image_state_factory.cc b/modules/img/base/src/image_state/image_state_factory.cc similarity index 96% rename from modules/iplt/base/src/image_state/image_state_factory.cc rename to modules/img/base/src/image_state/image_state_factory.cc index 614462811..52765af20 100644 --- a/modules/iplt/base/src/image_state/image_state_factory.cc +++ b/modules/img/base/src/image_state/image_state_factory.cc @@ -30,10 +30,10 @@ #include "image_state_inst.hh" #include "image_state_base.hh" -#include <ost/iplt/extent.hh> +#include <ost/img/extent.hh> #include <ost/message.hh> -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { ImageStateBasePtr CreateState(const Extent &e, DataType type, DataDomain dom) { diff --git a/modules/iplt/base/src/image_state/image_state_factory.hh b/modules/img/base/src/image_state/image_state_factory.hh similarity index 85% rename from modules/iplt/base/src/image_state/image_state_factory.hh rename to modules/img/base/src/image_state/image_state_factory.hh index b7682eac4..0e9dd4f31 100644 --- a/modules/iplt/base/src/image_state/image_state_factory.hh +++ b/modules/img/base/src/image_state/image_state_factory.hh @@ -27,14 +27,14 @@ #ifndef IPLT_IMAGE_STATE_FACTORY_H #define IPLT_IMAGE_STATE_FACTORY_H -#include <ost/iplt/data_types.hh> -#include <ost/iplt/extent.hh> +#include <ost/img/data_types.hh> +#include <ost/img/extent.hh> #include "image_state_base_fw.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { // state factory -DLLEXPORT_OST_IPLT_BASE ImageStateBasePtr CreateState(const Extent &e, DataType type, DataDomain dom); +DLLEXPORT_OST_IMG_BASE ImageStateBasePtr CreateState(const Extent &e, DataType type, DataDomain dom); }}} // namespaces diff --git a/modules/iplt/base/src/image_state/image_state_fft.cc b/modules/img/base/src/image_state/image_state_fft.cc similarity index 97% rename from modules/iplt/base/src/image_state/image_state_fft.cc rename to modules/img/base/src/image_state/image_state_fft.cc index 1d76f3a3c..44bfc29e2 100644 --- a/modules/iplt/base/src/image_state/image_state_fft.cc +++ b/modules/img/base/src/image_state/image_state_fft.cc @@ -30,9 +30,9 @@ #include "image_state_def.hh" #include "fft_impl.hh" -using namespace ::iplt::fft_impl; +using namespace ::img::fft_impl; -namespace ost { namespace iplt { namespace image_state { namespace fft { +namespace ost { namespace img { namespace image_state { namespace fft { /* BAD: too much implicit format specification in these routines diff --git a/modules/iplt/base/src/image_state/image_state_fft.hh b/modules/img/base/src/image_state/image_state_fft.hh similarity index 96% rename from modules/iplt/base/src/image_state/image_state_fft.hh rename to modules/img/base/src/image_state/image_state_fft.hh index af89b904b..320105271 100644 --- a/modules/iplt/base/src/image_state/image_state_fft.hh +++ b/modules/img/base/src/image_state/image_state_fft.hh @@ -29,7 +29,7 @@ #include <ost/message.hh> -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { // fw declarations class ImageStateBase; diff --git a/modules/iplt/base/src/image_state/image_state_frequency_domain.hh b/modules/img/base/src/image_state/image_state_frequency_domain.hh similarity index 92% rename from modules/iplt/base/src/image_state/image_state_frequency_domain.hh rename to modules/img/base/src/image_state/image_state_frequency_domain.hh index 56c36f220..29fdc3909 100644 --- a/modules/iplt/base/src/image_state/image_state_frequency_domain.hh +++ b/modules/img/base/src/image_state/image_state_frequency_domain.hh @@ -26,21 +26,21 @@ #define IMAGE_STATE_FREQUENCY_DOMAIN_HH #include <ost/base.hh> -#include <ost/iplt/point.hh> -#include <ost/iplt/size.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/pixel_sampling.hh> +#include <ost/img/point.hh> +#include <ost/img/size.hh> +#include <ost/img/extent.hh> +#include <ost/img/pixel_sampling.hh> #include "value_holder.hh" #include "index.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { /* frequency domain implementation */ -class DLLEXPORT_OST_IPLT_BASE FrequencyDomain { +class DLLEXPORT_OST_IMG_BASE FrequencyDomain { public: FrequencyDomain(const Extent& e): extent_(Extent(e.GetSize(),Point(0,0,0))), diff --git a/modules/iplt/base/src/image_state/image_state_fw.hh b/modules/img/base/src/image_state/image_state_fw.hh similarity index 97% rename from modules/iplt/base/src/image_state/image_state_fw.hh rename to modules/img/base/src/image_state/image_state_fw.hh index 868336035..bd7b29cf2 100644 --- a/modules/iplt/base/src/image_state/image_state_fw.hh +++ b/modules/img/base/src/image_state/image_state_fw.hh @@ -30,7 +30,7 @@ #include "image_state_factory.hh" #include "image_state_visitor_fw.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { namespace image_state { diff --git a/modules/iplt/base/src/image_state/image_state_half_frequency_domain.hh b/modules/img/base/src/image_state/image_state_half_frequency_domain.hh similarity index 96% rename from modules/iplt/base/src/image_state/image_state_half_frequency_domain.hh rename to modules/img/base/src/image_state/image_state_half_frequency_domain.hh index 7220c9cba..29fb044e3 100644 --- a/modules/iplt/base/src/image_state/image_state_half_frequency_domain.hh +++ b/modules/img/base/src/image_state/image_state_half_frequency_domain.hh @@ -26,17 +26,17 @@ #define IMAGE_STATE_HALF_FREQUENCY_DOMAIN_HH #include <ost/base.hh> -#include <ost/iplt/point.hh> -#include <ost/iplt/size.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/pixel_sampling.hh> +#include <ost/img/point.hh> +#include <ost/img/size.hh> +#include <ost/img/extent.hh> +#include <ost/img/pixel_sampling.hh> #include "value_holder.hh" #include "index.hh" #define CONJPOINT(a) ((a)[2]==0 ?((a)[1]==0?(a)[0]>0:(a)[1]>0):(a)[2]>0) ? (a) : -(a) -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { namespace { @@ -101,7 +101,7 @@ int half_neg(int d) */ -class DLLEXPORT_OST_IPLT_BASE HalfFrequencyDomain { +class DLLEXPORT_OST_IMG_BASE HalfFrequencyDomain { public: HalfFrequencyDomain(const Extent& e): logical_extent_(ExtractLogicalExtent(e)), diff --git a/modules/iplt/base/src/image_state/image_state_impl.cc b/modules/img/base/src/image_state/image_state_impl.cc similarity index 99% rename from modules/iplt/base/src/image_state/image_state_impl.cc rename to modules/img/base/src/image_state/image_state_impl.cc index 441c034c9..f31adf013 100644 --- a/modules/iplt/base/src/image_state/image_state_impl.cc +++ b/modules/img/base/src/image_state/image_state_impl.cc @@ -40,7 +40,7 @@ #include "image_state_spatial_domain.hh" #include "image_state_visitor.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { template <typename T, class D> ImageStateImpl<T,D>::ImageStateImpl(): diff --git a/modules/iplt/base/src/image_state/image_state_impl.hh b/modules/img/base/src/image_state/image_state_impl.hh similarity index 98% rename from modules/iplt/base/src/image_state/image_state_impl.hh rename to modules/img/base/src/image_state/image_state_impl.hh index 7f7baf45a..06cc44659 100644 --- a/modules/iplt/base/src/image_state/image_state_impl.hh +++ b/modules/img/base/src/image_state/image_state_impl.hh @@ -29,14 +29,14 @@ #include <boost/shared_ptr.hpp> #include <ost/base.hh> -#include <ost/iplt/value_util.hh> -#include <ost/iplt/pixel_sampling.hh> +#include <ost/img/value_util.hh> +#include <ost/img/pixel_sampling.hh> #include "image_state_base.hh" #include "image_state_visitor_fw.hh" #include "value_holder.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { class Size; diff --git a/modules/iplt/base/src/image_state/image_state_inst.hh b/modules/img/base/src/image_state/image_state_inst.hh similarity index 97% rename from modules/iplt/base/src/image_state/image_state_inst.hh rename to modules/img/base/src/image_state/image_state_inst.hh index 7613381c9..3364d57a3 100644 --- a/modules/iplt/base/src/image_state/image_state_inst.hh +++ b/modules/img/base/src/image_state/image_state_inst.hh @@ -41,7 +41,7 @@ #include "image_state_frequency_domain.hh" #include "image_state_half_frequency_domain.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { // explicit template instantiation so that all functionality is available template class TEMPLATE_DEF_EXPORT ImageStateImpl<Real,SpatialDomain>; diff --git a/modules/iplt/base/src/image_state/image_state_spatial_domain.hh b/modules/img/base/src/image_state/image_state_spatial_domain.hh similarity index 93% rename from modules/iplt/base/src/image_state/image_state_spatial_domain.hh rename to modules/img/base/src/image_state/image_state_spatial_domain.hh index 910fff1e8..822f393a0 100644 --- a/modules/iplt/base/src/image_state/image_state_spatial_domain.hh +++ b/modules/img/base/src/image_state/image_state_spatial_domain.hh @@ -28,15 +28,15 @@ #include <iostream> #include <ost/base.hh> -#include <ost/iplt/point.hh> -#include <ost/iplt/size.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/pixel_sampling.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/point.hh> +#include <ost/img/size.hh> +#include <ost/img/extent.hh> +#include <ost/img/pixel_sampling.hh> +#include <ost/img/value_util.hh> #include "value_holder.hh" #include "index.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { /* while all domain implementations share a common interface @@ -46,7 +46,7 @@ namespace ost { namespace iplt { namespace image_state { copy ctor and assignment op should work automatically */ -class DLLEXPORT_OST_IPLT_BASE SpatialDomain { +class DLLEXPORT_OST_IMG_BASE SpatialDomain { public: SpatialDomain(const Extent& e): extent_(e), diff --git a/modules/iplt/base/src/image_state/image_state_visitor.hh b/modules/img/base/src/image_state/image_state_visitor.hh similarity index 90% rename from modules/iplt/base/src/image_state/image_state_visitor.hh rename to modules/img/base/src/image_state/image_state_visitor.hh index a9f170f08..5926a09e7 100644 --- a/modules/iplt/base/src/image_state/image_state_visitor.hh +++ b/modules/img/base/src/image_state/image_state_visitor.hh @@ -25,14 +25,14 @@ #ifndef IPLT_IMAGE_STATE_VISITOR_HH #define IPLT_IMAGE_STATE_VISITOR_HH -#include <ost/iplt/data_algorithm.hh> +#include <ost/img/data_algorithm.hh> #include "image_state_impl.hh" #include "image_state_def.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { //! ImageStateVisitor general exception -class DLLEXPORT_OST_IPLT_BASE InvalidImageStateVisitor: public Error { +class DLLEXPORT_OST_IMG_BASE InvalidImageStateVisitor: public Error { public: InvalidImageStateVisitor(const String& m): Error(m) {} }; @@ -229,7 +229,7 @@ public: //! non-modifying image state visitor base class -class DLLEXPORT_OST_IPLT_BASE ImageStateNonModVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateNonModVisitorBase { public: virtual ~ImageStateNonModVisitorBase() {} virtual void Visit_(const RealSpatialImageState& is) = 0; @@ -250,7 +250,7 @@ public: class MyVisitorFnc { public: template<typename T, class D> - void VisitState(const iplt::image_state::ImageStateImpl<T,D>& isi); + void VisitState(const img::image_state::ImageStateImpl<T,D>& isi); }; \endcode @@ -263,7 +263,7 @@ public: \code // definition - typedef iplt::image_state::ConstVisitor<MyVisitorFnc> MyVisitor; + typedef img::image_state::ConstVisitor<MyVisitorFnc> MyVisitor; // creating an instance MyVisitor my_visitor; @@ -285,10 +285,10 @@ public: MyVisitorFnc(); // default ctor MyVisitorFnc(int a, int b); //initialize with two ints template<typename T, class D> - void VisitState(const iplt::image_state::ImageStateImpl<T,D>& isi); + void VisitState(const img::image_state::ImageStateImpl<T,D>& isi); }; - typedef iplt::image_state::ConstVisitor<MyVisitorFnc> MyVisitor; + typedef img::image_state::ConstVisitor<MyVisitorFnc> MyVisitor; void f() { MyVisitor my_visitor1; // using default ctor @@ -296,10 +296,10 @@ public: \endcode - See also common algorithms, e.g. iplt::alg::Stat + See also common algorithms, e.g. img::alg::Stat */ template <class FNC> -class DLLEXPORT_OST_IPLT_BASE ImageStateNonModVisitor: public FNC, public ImageStateNonModVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateNonModVisitor: public FNC, public ImageStateNonModVisitorBase { public: IMAGE_STATE_VISITOR_CTOR_ADAPTERS(ImageStateNonModVisitor) @@ -321,7 +321,7 @@ private: //! in-place modifying image state visitor base class -class DLLEXPORT_OST_IPLT_BASE ImageStateModIPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateModIPVisitorBase { public: ImageStateModIPVisitorBase(const String& name="") {} virtual ~ImageStateModIPVisitorBase() {} @@ -343,18 +343,18 @@ public: class MyVisitorFnc { public: template<typename T, class D> - void VisitState(iplt::image_state::ImageStateImpl<T,D>& isi); + void VisitState(img::image_state::ImageStateImpl<T,D>& isi); }; \endcode The image state passed as a parameter will be modified. - See iplt::image_state::ImageStateNonModVisitor for other important remarks + See img::image_state::ImageStateNonModVisitor for other important remarks */ template <class FNC> -class DLLEXPORT_OST_IPLT_BASE ImageStateModIPVisitor: public FNC, public ImageStateModIPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateModIPVisitor: public FNC, public ImageStateModIPVisitorBase { public: IMAGE_STATE_VISITOR_CTOR_ADAPTERS(ImageStateModIPVisitor) @@ -374,7 +374,7 @@ private: //! in-place modifying image state const visitor base class -class DLLEXPORT_OST_IPLT_BASE ImageStateConstModIPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateConstModIPVisitorBase { public: ImageStateConstModIPVisitorBase(const String& name="") {} virtual ~ImageStateConstModIPVisitorBase() {} @@ -396,7 +396,7 @@ public: class MyVisitorFnc { public: template<typename T, class D> - void VisitState(iplt::image_state::ImageStateImpl<T,D>& isi) const; + void VisitState(img::image_state::ImageStateImpl<T,D>& isi) const; }; \endcode @@ -405,11 +405,11 @@ public: of the VisitState method, this routine may not set member variables, but the visitor may be used as a temporary object. - See iplt::image_state::ImageStateNonModVisitor for other important remarks + See img::image_state::ImageStateNonModVisitor for other important remarks */ template <class FNC> -class DLLEXPORT_OST_IPLT_BASE ImageStateConstModIPVisitor: public FNC, public ImageStateConstModIPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateConstModIPVisitor: public FNC, public ImageStateConstModIPVisitorBase { public: IMAGE_STATE_VISITOR_CTOR_ADAPTERS(ImageStateConstModIPVisitor) @@ -429,7 +429,7 @@ private: //! out-of-place modifying image state visitor base class -class DLLEXPORT_OST_IPLT_BASE ImageStateModOPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateModOPVisitorBase { public: ImageStateModOPVisitorBase(const String& name="") {} virtual ~ImageStateModOPVisitorBase() {} @@ -450,18 +450,18 @@ public: class MyVisitorFnc { public: template<typename T, class D> - ImageStateBasePtr Visit(const iplt::image_state::ImageStateImpl<T,D>& isi); + ImageStateBasePtr Visit(const img::image_state::ImageStateImpl<T,D>& isi); }; \endcode The modified image state will be returned as a new object - See iplt::image_state::ImageStateNonModVisitor for other important remarks + See img::image_state::ImageStateNonModVisitor for other important remarks */ template <class FNC> -class DLLEXPORT_OST_IPLT_BASE ImageStateModOPVisitor: public FNC, public ImageStateModOPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateModOPVisitor: public FNC, public ImageStateModOPVisitorBase { public: IMAGE_STATE_VISITOR_CTOR_ADAPTERS(ImageStateModOPVisitor) @@ -482,7 +482,7 @@ private: //! out-of-place modifying image state const visitor base class -class DLLEXPORT_OST_IPLT_BASE ImageStateConstModOPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateConstModOPVisitorBase { public: ImageStateConstModOPVisitorBase(const String& name="") {} virtual ~ImageStateConstModOPVisitorBase() {} @@ -503,7 +503,7 @@ public: class MyVisitorFnc { public: template<typename T, class D> - ImageStateBasePtr Visit(const iplt::image_state::ImageStateImpl<T,D>& isi) const; + ImageStateBasePtr Visit(const img::image_state::ImageStateImpl<T,D>& isi) const; }; \endcode @@ -512,11 +512,11 @@ public: the VisitState method, no member variables may be modified, but the visitor can be used as an temporary object. - See iplt::image_state::ImageStateNonModVisitor for other important remarks + See img::image_state::ImageStateNonModVisitor for other important remarks */ template <class FNC> -class DLLEXPORT_OST_IPLT_BASE ImageStateConstModOPVisitor: public FNC, public ImageStateConstModOPVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateConstModOPVisitor: public FNC, public ImageStateConstModOPVisitorBase { public: IMAGE_STATE_VISITOR_CTOR_ADAPTERS(ImageStateConstModOPVisitor) @@ -536,7 +536,7 @@ private: }; //! morphing image state visitor base class -class DLLEXPORT_OST_IPLT_BASE ImageStateMorphVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateMorphVisitorBase { public: ImageStateMorphVisitorBase(const String& name="") {} virtual ~ImageStateMorphVisitorBase() {} @@ -563,13 +563,13 @@ public: class MyVisitorFnc { public: template<typename T, class D> - ImageStateBasePtr Visit(iplt::image_state::ImageStateImpl<T,D>& isi); + ImageStateBasePtr Visit(img::image_state::ImageStateImpl<T,D>& isi); }; \endcode */ template <class FNC> -class DLLEXPORT_OST_IPLT_BASE ImageStateMorphVisitor: public FNC, public ImageStateMorphVisitorBase { +class DLLEXPORT_OST_IMG_BASE ImageStateMorphVisitor: public FNC, public ImageStateMorphVisitorBase { public: IMAGE_STATE_VISITOR_CTOR_ADAPTERS(ImageStateMorphVisitor) diff --git a/modules/iplt/base/src/image_state/image_state_visitor_fw.hh b/modules/img/base/src/image_state/image_state_visitor_fw.hh similarity index 96% rename from modules/iplt/base/src/image_state/image_state_visitor_fw.hh rename to modules/img/base/src/image_state/image_state_visitor_fw.hh index a8cedab1a..f7f1652d2 100644 --- a/modules/iplt/base/src/image_state/image_state_visitor_fw.hh +++ b/modules/img/base/src/image_state/image_state_visitor_fw.hh @@ -27,7 +27,7 @@ #ifndef IPLT_IMAGE_STATE_VISITOR_FW_H #define IPLT_IMAGE_STATE_VISITOR_FW_H -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { class InvalidImageStateVisitor; class ImageStateNonModVisitorBase; diff --git a/modules/iplt/base/src/image_state/index.cc b/modules/img/base/src/image_state/index.cc similarity index 98% rename from modules/iplt/base/src/image_state/index.cc rename to modules/img/base/src/image_state/index.cc index c8a9aad4d..96016959b 100644 --- a/modules/iplt/base/src/image_state/index.cc +++ b/modules/img/base/src/image_state/index.cc @@ -27,7 +27,7 @@ #include "index.hh" -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { // Index diff --git a/modules/iplt/base/src/image_state/index.hh b/modules/img/base/src/image_state/index.hh similarity index 83% rename from modules/iplt/base/src/image_state/index.hh rename to modules/img/base/src/image_state/index.hh index b9af6d5ec..beee95d52 100644 --- a/modules/iplt/base/src/image_state/index.hh +++ b/modules/img/base/src/image_state/index.hh @@ -30,15 +30,15 @@ #include <iosfwd> #include <ost/base.hh> -#include <ost/iplt/size.hh> +#include <ost/img/size.hh> -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { // encapsulated unsigned integer triplet /* provides a compact mean to adress values in a ValueHolder */ -struct DLLEXPORT_OST_IPLT_BASE Index { +struct DLLEXPORT_OST_IMG_BASE Index { Index(unsigned int uu,unsigned int vv, unsigned int ww); bool equal(const Index& i) const; @@ -46,12 +46,12 @@ struct DLLEXPORT_OST_IPLT_BASE Index { unsigned int u,v,w; }; -DLLEXPORT_OST_IPLT_BASE bool operator==(const Index& i1, const Index& i2); -DLLEXPORT_OST_IPLT_BASE bool operator!=(const Index& i1, const Index& i2); +DLLEXPORT_OST_IMG_BASE bool operator==(const Index& i1, const Index& i2); +DLLEXPORT_OST_IMG_BASE bool operator!=(const Index& i1, const Index& i2); -DLLEXPORT_OST_IPLT_BASE std::ostream& operator<<(std::ostream& out, const Index& i); +DLLEXPORT_OST_IMG_BASE std::ostream& operator<<(std::ostream& out, const Index& i); -class DLLEXPORT_OST_IPLT_BASE IndexIterator { +class DLLEXPORT_OST_IMG_BASE IndexIterator { public: IndexIterator(int w, int h, int d); IndexIterator(const Size& s); diff --git a/modules/iplt/base/src/image_state/test_inst.cc b/modules/img/base/src/image_state/test_inst.cc similarity index 97% rename from modules/iplt/base/src/image_state/test_inst.cc rename to modules/img/base/src/image_state/test_inst.cc index 83fcbb334..9b49c7c6f 100644 --- a/modules/iplt/base/src/image_state/test_inst.cc +++ b/modules/img/base/src/image_state/test_inst.cc @@ -26,7 +26,7 @@ #include "image_state_def.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { namespace image_state { int main() diff --git a/modules/iplt/base/src/image_state/type_fw.hh b/modules/img/base/src/image_state/type_fw.hh similarity index 93% rename from modules/iplt/base/src/image_state/type_fw.hh rename to modules/img/base/src/image_state/type_fw.hh index 12bb4eb93..1c71b921f 100644 --- a/modules/iplt/base/src/image_state/type_fw.hh +++ b/modules/img/base/src/image_state/type_fw.hh @@ -19,7 +19,7 @@ //------------------------------------------------------------------------------ /* - convenience basic iplt helper classes forward declarations + convenience basic img helper classes forward declarations Author: Ansgar Philippsen */ @@ -27,7 +27,7 @@ #ifndef IPLT_IMAGE_STATE_TYPE_FW_H #define IPLT_IMAGE_STATE_TYPE_FW_H -namespace ost { namespace iplt { +namespace ost { namespace img { class Extent; class Point; diff --git a/modules/iplt/base/src/image_state/value_holder.cc b/modules/img/base/src/image_state/value_holder.cc similarity index 98% rename from modules/iplt/base/src/image_state/value_holder.cc rename to modules/img/base/src/image_state/value_holder.cc index 8e8f190de..e9c96743f 100644 --- a/modules/iplt/base/src/image_state/value_holder.cc +++ b/modules/img/base/src/image_state/value_holder.cc @@ -31,14 +31,14 @@ #include <cassert> #include <algorithm> -#include <ost/iplt/size.hh> +#include <ost/img/size.hh> #include "value_holder.hh" #include "index.hh" #define USE_ROW_ORDER 1 -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { namespace { diff --git a/modules/iplt/base/src/image_state/value_holder.hh b/modules/img/base/src/image_state/value_holder.hh similarity index 97% rename from modules/iplt/base/src/image_state/value_holder.hh rename to modules/img/base/src/image_state/value_holder.hh index f0309d8ce..57fb4b075 100644 --- a/modules/iplt/base/src/image_state/value_holder.hh +++ b/modules/img/base/src/image_state/value_holder.hh @@ -28,9 +28,9 @@ #define VALUE_HOLDER_H #include <ost/base.hh> -#include <ost/iplt/module_config.hh> -#include <ost/iplt/data_types.hh> -#include <ost/iplt/size.hh> +#include <ost/img/module_config.hh> +#include <ost/img/data_types.hh> +#include <ost/img/size.hh> #include "type_fw.hh" @@ -41,7 +41,7 @@ void ReleaseAndReconstruct(); } -namespace ost { namespace iplt { namespace image_state { +namespace ost { namespace img { namespace image_state { /* Value Holder diff --git a/modules/iplt/base/src/image_state_fw.hh b/modules/img/base/src/image_state_fw.hh similarity index 95% rename from modules/iplt/base/src/image_state_fw.hh rename to modules/img/base/src/image_state_fw.hh index 80cd9e14a..3e8ab9c38 100644 --- a/modules/iplt/base/src/image_state_fw.hh +++ b/modules/img/base/src/image_state_fw.hh @@ -31,7 +31,7 @@ #include "image_state/image_state_visitor_fw.hh" #include "image_state/image_state_base_fw.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { namespace image_state { @@ -41,7 +41,7 @@ class ImageStateBase; } -// move essential names into iplt namespace +// move essential names into img namespace using image_state::Index; using image_state::IndexIterator; diff --git a/modules/iplt/base/src/inverted_mask.cc b/modules/img/base/src/inverted_mask.cc similarity index 99% rename from modules/iplt/base/src/inverted_mask.cc rename to modules/img/base/src/inverted_mask.cc index 93c6f0318..b7ca5c9d3 100644 --- a/modules/iplt/base/src/inverted_mask.cc +++ b/modules/img/base/src/inverted_mask.cc @@ -26,7 +26,7 @@ namespace ost { -namespace iplt +namespace img { InvertedMask::InvertedMask(const MaskPtr& lhs): diff --git a/modules/iplt/base/src/inverted_mask.hh b/modules/img/base/src/inverted_mask.hh similarity index 95% rename from modules/iplt/base/src/inverted_mask.hh rename to modules/img/base/src/inverted_mask.hh index 0c8ea23fc..5cea56762 100644 --- a/modules/iplt/base/src/inverted_mask.hh +++ b/modules/img/base/src/inverted_mask.hh @@ -23,10 +23,10 @@ #include "mask_base.hh" namespace ost { -namespace iplt +namespace img { -class DLLEXPORT_OST_IPLT_BASE InvertedMask: public MaskBase +class DLLEXPORT_OST_IMG_BASE InvertedMask: public MaskBase { public: InvertedMask(const MaskPtr& lhs); diff --git a/modules/iplt/base/src/map.cc b/modules/img/base/src/map.cc similarity index 83% rename from modules/iplt/base/src/map.cc rename to modules/img/base/src/map.cc index 1f2d44b63..899272a5e 100644 --- a/modules/iplt/base/src/map.cc +++ b/modules/img/base/src/map.cc @@ -18,9 +18,9 @@ //------------------------------------------------------------------------------ #include "map.hh" -namespace ost{ namespace iplt { +namespace ost{ namespace img { -MapHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Extent& ext, +MapHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Extent& ext, DataType type, DataDomain dom) { @@ -28,21 +28,21 @@ MapHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Extent& ext, } //! convenience variant to create images -MapHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Size& s, const Point& o, +MapHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Size& s, const Point& o, DataType type, DataDomain dom) { return CreateImage(s,o,type,dom); } -MapHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Point& p1, const Point& p2, +MapHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Point& p1, const Point& p2, DataType type, DataDomain dom) { return CreateImage(p1,p2,type,dom); } -MapHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Point& p1, const Size& s, +MapHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Point& p1, const Size& s, DataType type, DataDomain dom) { diff --git a/modules/iplt/base/src/map.hh b/modules/img/base/src/map.hh similarity index 81% rename from modules/iplt/base/src/map.hh rename to modules/img/base/src/map.hh index b5cbef543..c7ecd816f 100644 --- a/modules/iplt/base/src/map.hh +++ b/modules/img/base/src/map.hh @@ -19,26 +19,26 @@ #ifndef OST_MAP_HH #define OST_MAP_HH -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { typedef ImageHandle MapHandle; -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Extent& ext=Extent(), +ImageHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Extent& ext=Extent(), DataType type=REAL, DataDomain dom=SPATIAL); //! convenience variant to create images -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Size& s, const Point& o, +ImageHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Size& s, const Point& o, DataType type=REAL, DataDomain dom=SPATIAL); -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Point& p1, const Point& p2, +ImageHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Point& p1, const Point& p2, DataType type=REAL, DataDomain dom=SPATIAL); -ImageHandle DLLEXPORT_OST_IPLT_BASE CreateMap(const Point& p1, const Size& s, +ImageHandle DLLEXPORT_OST_IMG_BASE CreateMap(const Point& p1, const Size& s, DataType type=REAL, DataDomain dom=SPATIAL); diff --git a/modules/iplt/base/src/mask.cc b/modules/img/base/src/mask.cc similarity index 97% rename from modules/iplt/base/src/mask.cc rename to modules/img/base/src/mask.cc index e3f81a105..0151f3dcc 100644 --- a/modules/iplt/base/src/mask.cc +++ b/modules/img/base/src/mask.cc @@ -25,7 +25,7 @@ #include "mask.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { MaskPtr Mask(const Polygon2& p) { diff --git a/modules/iplt/base/src/mask.hh b/modules/img/base/src/mask.hh similarity index 84% rename from modules/iplt/base/src/mask.hh rename to modules/img/base/src/mask.hh index a74a83233..798f062ed 100644 --- a/modules/iplt/base/src/mask.hh +++ b/modules/img/base/src/mask.hh @@ -32,13 +32,13 @@ #include "spherical_mask.hh" #include "mask_op.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { -MaskPtr DLLEXPORT_OST_IPLT_BASE Mask(const Polygon2& p); -MaskPtr DLLEXPORT_OST_IPLT_BASE Mask(const Extent& e); -MaskPtr DLLEXPORT_OST_IPLT_BASE Mask(const Circle2& c); -MaskPtr DLLEXPORT_OST_IPLT_BASE Mask(const Sphere& s); +MaskPtr DLLEXPORT_OST_IMG_BASE Mask(const Polygon2& p); +MaskPtr DLLEXPORT_OST_IMG_BASE Mask(const Extent& e); +MaskPtr DLLEXPORT_OST_IMG_BASE Mask(const Circle2& c); +MaskPtr DLLEXPORT_OST_IMG_BASE Mask(const Sphere& s); }}//ns diff --git a/modules/iplt/base/src/mask_base.cc b/modules/img/base/src/mask_base.cc similarity index 98% rename from modules/iplt/base/src/mask_base.cc rename to modules/img/base/src/mask_base.cc index 75142ba07..f378d98f8 100644 --- a/modules/iplt/base/src/mask_base.cc +++ b/modules/img/base/src/mask_base.cc @@ -25,7 +25,7 @@ namespace ost { -namespace iplt +namespace img { MaskBase::MaskBase() diff --git a/modules/iplt/base/src/mask_base.hh b/modules/img/base/src/mask_base.hh similarity index 95% rename from modules/iplt/base/src/mask_base.hh rename to modules/img/base/src/mask_base.hh index 830bbba5c..ed058701a 100644 --- a/modules/iplt/base/src/mask_base.hh +++ b/modules/img/base/src/mask_base.hh @@ -24,15 +24,15 @@ #ifndef MASK_BASE_HH_ #define MASK_BASE_HH_ -#include <ost/iplt/vecmat.hh> +#include <ost/img/vecmat.hh> #include "mask_base_fw.hh" namespace ost { -namespace iplt +namespace img { class MaskVisitor; -class DLLEXPORT_OST_IPLT_BASE MaskBase +class DLLEXPORT_OST_IMG_BASE MaskBase { public: MaskBase(); diff --git a/modules/iplt/base/src/mask_base_fw.hh b/modules/img/base/src/mask_base_fw.hh similarity index 97% rename from modules/iplt/base/src/mask_base_fw.hh rename to modules/img/base/src/mask_base_fw.hh index eb4e70fa8..3e6dd0305 100644 --- a/modules/iplt/base/src/mask_base_fw.hh +++ b/modules/img/base/src/mask_base_fw.hh @@ -21,7 +21,7 @@ #define MASK_BASE_FW_HH_ #include <boost/smart_ptr.hpp> -namespace ost { namespace iplt { +namespace ost { namespace img { //fw declaration diff --git a/modules/iplt/base/src/mask_op.cc b/modules/img/base/src/mask_op.cc similarity index 97% rename from modules/iplt/base/src/mask_op.cc rename to modules/img/base/src/mask_op.cc index 2ee493873..048998ba6 100644 --- a/modules/iplt/base/src/mask_op.cc +++ b/modules/img/base/src/mask_op.cc @@ -22,7 +22,7 @@ #include "composite_mask.hh" #include "inverted_mask.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { MaskPtr operator~(const MaskPtr& mptr) { diff --git a/modules/iplt/base/src/mask_op.hh b/modules/img/base/src/mask_op.hh similarity index 75% rename from modules/iplt/base/src/mask_op.hh rename to modules/img/base/src/mask_op.hh index 482f76236..ed6aa77eb 100644 --- a/modules/iplt/base/src/mask_op.hh +++ b/modules/img/base/src/mask_op.hh @@ -22,13 +22,13 @@ #include "mask_base_fw.hh" -#include <ost/iplt/module_config.hh> -namespace ost { namespace iplt { +#include <ost/img/module_config.hh> +namespace ost { namespace img { -DLLEXPORT_OST_IPLT_BASE MaskPtr operator~(const MaskPtr& mptr); -DLLEXPORT_OST_IPLT_BASE MaskPtr operator&(const MaskPtr& lhs,const MaskPtr& rhs); -DLLEXPORT_OST_IPLT_BASE MaskPtr operator|(const MaskPtr& lhs,const MaskPtr& rhs); -DLLEXPORT_OST_IPLT_BASE MaskPtr operator^(const MaskPtr& lhs,const MaskPtr& rhs); +DLLEXPORT_OST_IMG_BASE MaskPtr operator~(const MaskPtr& mptr); +DLLEXPORT_OST_IMG_BASE MaskPtr operator&(const MaskPtr& lhs,const MaskPtr& rhs); +DLLEXPORT_OST_IMG_BASE MaskPtr operator|(const MaskPtr& lhs,const MaskPtr& rhs); +DLLEXPORT_OST_IMG_BASE MaskPtr operator^(const MaskPtr& lhs,const MaskPtr& rhs); }} diff --git a/modules/iplt/base/src/mask_visitor.hh b/modules/img/base/src/mask_visitor.hh similarity index 96% rename from modules/iplt/base/src/mask_visitor.hh rename to modules/img/base/src/mask_visitor.hh index 7eb6cd49a..cc954ea78 100644 --- a/modules/iplt/base/src/mask_visitor.hh +++ b/modules/img/base/src/mask_visitor.hh @@ -32,9 +32,9 @@ #include "polygon_mask.hh" #include "spherical_mask.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { -class DLLEXPORT_OST_IPLT_BASE MaskVisitor +class DLLEXPORT_OST_IMG_BASE MaskVisitor { public: virtual ~MaskVisitor() {} diff --git a/modules/iplt/base/src/module_config.hh b/modules/img/base/src/module_config.hh similarity index 72% rename from modules/iplt/base/src/module_config.hh rename to modules/img/base/src/module_config.hh index ecb7294ff..0205ffc00 100644 --- a/modules/iplt/base/src/module_config.hh +++ b/modules/img/base/src/module_config.hh @@ -16,22 +16,22 @@ // along with this library; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ -#ifndef OST_IPLT_BASE_MODULE_CONFIG_HH -#define OST_IPLT_BASE_MODULE_CONFIG_HH +#ifndef OST_IMG_BASE_MODULE_CONFIG_HH +#define OST_IMG_BASE_MODULE_CONFIG_HH #include <ost/base.hh> -#if defined(OST_MODULE_OST_IPLT) -# define DLLEXPORT_OST_IPLT_BASE DLLEXPORT +#if defined(OST_MODULE_OST_IMG) +# define DLLEXPORT_OST_IMG_BASE DLLEXPORT # if defined(_MSC_VER) -# define OST_IPLT_ALG_EXPLICIT_INST_DECL(c, t) +# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) # else -# define OST_IPLT_ALG_EXPLICIT_INST_DECL(c, t) extern template c TEMPLATE_EXPORT t; +# define OST_IMG_ALG_EXPLICIT_INST_DECL(c, t) extern template c TEMPLATE_EXPORT t; # endif #else -# define DLLEXPORT_OST_IPLT_BASE DLLIMPORT -# define OST_IPLT_BASE_EXPLICIT_INST_DECL(c, t) extern template c DLLIMPORT t; +# define DLLEXPORT_OST_IMG_BASE DLLIMPORT +# define OST_IMG_BASE_EXPLICIT_INST_DECL(c, t) extern template c DLLIMPORT t; #endif #endif diff --git a/modules/iplt/base/src/normalizer_fw.hh b/modules/img/base/src/normalizer_fw.hh similarity index 97% rename from modules/iplt/base/src/normalizer_fw.hh rename to modules/img/base/src/normalizer_fw.hh index 6f6911070..e401a9278 100644 --- a/modules/iplt/base/src/normalizer_fw.hh +++ b/modules/img/base/src/normalizer_fw.hh @@ -27,7 +27,7 @@ #include <boost/shared_ptr.hpp> -namespace ost { namespace iplt { +namespace ost { namespace img { class NormalizerImpl; diff --git a/modules/iplt/base/src/normalizer_impl.hh b/modules/img/base/src/normalizer_impl.hh similarity index 92% rename from modules/iplt/base/src/normalizer_impl.hh rename to modules/img/base/src/normalizer_impl.hh index 92ea74cfe..633b68ca9 100644 --- a/modules/iplt/base/src/normalizer_impl.hh +++ b/modules/img/base/src/normalizer_impl.hh @@ -29,11 +29,11 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/image_state.hh> +#include <ost/img/value_util.hh> #include "normalizer_fw.hh" -#include <ost/iplt/module_config.hh> -namespace ost { namespace iplt { +#include <ost/img/module_config.hh> +namespace ost { namespace img { //! Abstract normalizer base class // \internal @@ -42,7 +42,7 @@ namespace ost { namespace iplt { normalized with a specific formula, without encoding this functionality within the data class itself. */ -class DLLEXPORT_OST_IPLT_BASE NormalizeFnc { +class DLLEXPORT_OST_IMG_BASE NormalizeFnc { public: virtual ~NormalizeFnc() {} template <typename T, class D> @@ -72,7 +72,7 @@ public: }; /// \internal -class DLLEXPORT_OST_IPLT_BASE NoOpNormalizer: public NormalizerImpl { +class DLLEXPORT_OST_IMG_BASE NoOpNormalizer: public NormalizerImpl { public: // normalizer abstract interface virtual Real BackConvert(Real v) const {return v;} diff --git a/modules/iplt/base/src/null_data.hh b/modules/img/base/src/null_data.hh similarity index 97% rename from modules/iplt/base/src/null_data.hh rename to modules/img/base/src/null_data.hh index 5ee1a4ba9..c492851d4 100644 --- a/modules/iplt/base/src/null_data.hh +++ b/modules/img/base/src/null_data.hh @@ -32,7 +32,7 @@ #include "image_factory.hh" #include "image_handle.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { //! null data singleton /*! @@ -41,7 +41,7 @@ namespace ost { namespace iplt { writes are ignored, and all reads return zero or otherwise null defaults. */ -class DLLEXPORT_OST_IPLT_BASE NullData: public Data +class DLLEXPORT_OST_IMG_BASE NullData: public Data { public: virtual DataType GetType() const {return REAL;} diff --git a/modules/iplt/base/src/null_function.hh b/modules/img/base/src/null_function.hh similarity index 94% rename from modules/iplt/base/src/null_function.hh rename to modules/img/base/src/null_function.hh index a7d2f46e1..b7a570012 100644 --- a/modules/iplt/base/src/null_function.hh +++ b/modules/img/base/src/null_function.hh @@ -29,14 +29,14 @@ #include "function_base.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { //! null function /*! Implements Function interface, will always return zero */ -class DLLEXPORT_OST_IPLT_BASE NullFunction: public Function { +class DLLEXPORT_OST_IMG_BASE NullFunction: public Function { public: NullFunction(): Function(SPATIAL) diff --git a/modules/iplt/base/src/observable.hh b/modules/img/base/src/observable.hh similarity index 97% rename from modules/iplt/base/src/observable.hh rename to modules/img/base/src/observable.hh index a5df1494a..97f49358f 100644 --- a/modules/iplt/base/src/observable.hh +++ b/modules/img/base/src/observable.hh @@ -30,7 +30,7 @@ #include <list> #include "extent.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { //! templated observable class /* @@ -39,7 +39,7 @@ namespace ost { namespace iplt { and ObserverUpdate */ template <class T> -class DLLEXPORT_OST_IPLT_BASE Observable { +class DLLEXPORT_OST_IMG_BASE Observable { typedef std::list<T *> ObserverList; typedef typename ObserverList::iterator ObserverIter; typedef typename ObserverList::const_iterator ObserverConstIter; diff --git a/modules/iplt/base/src/paste_impl.cc b/modules/img/base/src/paste_impl.cc similarity index 97% rename from modules/iplt/base/src/paste_impl.cc rename to modules/img/base/src/paste_impl.cc index 4dab6134e..90d12a9ee 100644 --- a/modules/iplt/base/src/paste_impl.cc +++ b/modules/img/base/src/paste_impl.cc @@ -28,7 +28,7 @@ #include "function.hh" #include "image.hh" -namespace ost { namespace iplt { namespace detail { +namespace ost { namespace img { namespace detail { PasteFnc::PasteFnc(): target_() diff --git a/modules/iplt/base/src/paste_impl.hh b/modules/img/base/src/paste_impl.hh similarity index 94% rename from modules/iplt/base/src/paste_impl.hh rename to modules/img/base/src/paste_impl.hh index 9f5e86b83..2e403076f 100644 --- a/modules/iplt/base/src/paste_impl.hh +++ b/modules/img/base/src/paste_impl.hh @@ -23,10 +23,10 @@ #include "image_state/image_state_algorithm.hh" -namespace ost { namespace iplt { namespace detail { +namespace ost { namespace img { namespace detail { /// \internal -class DLLEXPORT_OST_IPLT_BASE PasteFnc { +class DLLEXPORT_OST_IMG_BASE PasteFnc { public: PasteFnc(); PasteFnc(const ImageHandle& target); diff --git a/modules/iplt/base/src/peak.cc b/modules/img/base/src/peak.cc similarity index 98% rename from modules/iplt/base/src/peak.cc rename to modules/img/base/src/peak.cc index d41676a66..3620328df 100644 --- a/modules/iplt/base/src/peak.cc +++ b/modules/img/base/src/peak.cc @@ -29,7 +29,7 @@ #include "peak.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { /*PointList PeakList2PointList(const PeakList& plist) { diff --git a/modules/iplt/base/src/peak.hh b/modules/img/base/src/peak.hh similarity index 86% rename from modules/iplt/base/src/peak.hh rename to modules/img/base/src/peak.hh index cffae432a..3ec8c780c 100644 --- a/modules/iplt/base/src/peak.hh +++ b/modules/img/base/src/peak.hh @@ -30,9 +30,9 @@ #include <ost/base.hh> #include "point.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { -class DLLEXPORT_OST_IPLT_BASE Peak: public Point { +class DLLEXPORT_OST_IMG_BASE Peak: public Point { public: Peak(int x=0, int y=0, int z=0) : Point(x,y,z), v_() {} Peak(const Point& p): Point(p), v_() {} @@ -47,8 +47,8 @@ typedef std::vector<Peak> PeakList; //PointList PeakList2PointList(const PeakList&); -DLLEXPORT_OST_IPLT_BASE PeakList ImportPeakList(const String& filename); -DLLEXPORT_OST_IPLT_BASE void ExportPeakList(const PeakList& l, const String& filename); +DLLEXPORT_OST_IMG_BASE PeakList ImportPeakList(const String& filename); +DLLEXPORT_OST_IMG_BASE void ExportPeakList(const PeakList& l, const String& filename); }} // ns diff --git a/modules/iplt/base/src/phase.cc b/modules/img/base/src/phase.cc similarity index 98% rename from modules/iplt/base/src/phase.cc rename to modules/img/base/src/phase.cc index 50059b4d3..190b96da5 100644 --- a/modules/iplt/base/src/phase.cc +++ b/modules/img/base/src/phase.cc @@ -27,7 +27,7 @@ #include "phase.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { Phase::Phase(Real angle) { diff --git a/modules/iplt/base/src/phase.hh b/modules/img/base/src/phase.hh similarity index 91% rename from modules/iplt/base/src/phase.hh rename to modules/img/base/src/phase.hh index 5fb91749f..0c4d49acb 100644 --- a/modules/iplt/base/src/phase.hh +++ b/modules/img/base/src/phase.hh @@ -28,17 +28,17 @@ #include <boost/operators.hpp> #include <iostream> -#include <ost/iplt/module_config.hh> -#include <ost/iplt/data_types.hh> +#include <ost/img/module_config.hh> +#include <ost/img/data_types.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { /// \brief Manages phases og Complex numbers /// /// Manages phases of Complex numbers, and allows sums and subtractions of phases. /// Takes correctly into account phase periodicity /// /// \sa \ref view_phase_diff.py "View Phase Difference Example" -class DLLEXPORT_OST_IPLT_BASE Phase: +class DLLEXPORT_OST_IMG_BASE Phase: private boost::equality_comparable<Phase>, private boost::additive<Phase>, private boost::multiplicative<Phase, Real> @@ -63,7 +63,7 @@ protected: Real angle_; }; -DLLEXPORT_OST_IPLT_BASE std::ostream& operator<<(std::ostream&,const Phase a); +DLLEXPORT_OST_IMG_BASE std::ostream& operator<<(std::ostream&,const Phase a); }}//ns diff --git a/modules/iplt/base/src/physical_units.cc b/modules/img/base/src/physical_units.cc similarity index 97% rename from modules/iplt/base/src/physical_units.cc rename to modules/img/base/src/physical_units.cc index a8ea8e9aa..a81b3b3f8 100644 --- a/modules/iplt/base/src/physical_units.cc +++ b/modules/img/base/src/physical_units.cc @@ -25,7 +25,7 @@ -namespace ost { namespace iplt { namespace physics{ +namespace ost { namespace img { namespace physics{ namespace detail{ diff --git a/modules/iplt/base/src/physical_units.hh b/modules/img/base/src/physical_units.hh similarity index 98% rename from modules/iplt/base/src/physical_units.hh rename to modules/img/base/src/physical_units.hh index 61db6d3e7..f0b676d12 100644 --- a/modules/iplt/base/src/physical_units.hh +++ b/modules/img/base/src/physical_units.hh @@ -26,7 +26,7 @@ #include <boost/mpl/transform.hpp> #include <ost/base.hh> -namespace ost { namespace iplt { namespace physics{ +namespace ost { namespace img { namespace physics{ namespace detail{ diff --git a/modules/iplt/base/src/pixel_sampling.cc b/modules/img/base/src/pixel_sampling.cc similarity index 99% rename from modules/iplt/base/src/pixel_sampling.cc rename to modules/img/base/src/pixel_sampling.cc index ace6191e9..5cff35235 100644 --- a/modules/iplt/base/src/pixel_sampling.cc +++ b/modules/img/base/src/pixel_sampling.cc @@ -32,7 +32,7 @@ #include <ost/log.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { PixelSampling::PixelSampling(): dom_(SPATIAL), diff --git a/modules/iplt/base/src/pixel_sampling.hh b/modules/img/base/src/pixel_sampling.hh similarity index 91% rename from modules/iplt/base/src/pixel_sampling.hh rename to modules/img/base/src/pixel_sampling.hh index 95b6f8add..77949c9c1 100644 --- a/modules/iplt/base/src/pixel_sampling.hh +++ b/modules/img/base/src/pixel_sampling.hh @@ -27,18 +27,18 @@ #ifndef IPLT_PIXEL_SAMPLING_H #define IPLT_PIXEL_SAMPLING_H -#include <ost/iplt/module_config.hh> -#include <ost/iplt/data_types.hh> +#include <ost/img/module_config.hh> +#include <ost/img/data_types.hh> #include "vecmat.hh" #include <ost/message.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { class Extent; class Point; -class DLLEXPORT_OST_IPLT_BASE InvalidSampling: public Error { +class DLLEXPORT_OST_IMG_BASE InvalidSampling: public Error { public: InvalidSampling(): Error("invalid sampling value used, must be >0") @@ -52,7 +52,7 @@ public: It is used by the derived Data classes to implement the sampling functionality. */ -class DLLEXPORT_OST_IPLT_BASE PixelSampling { +class DLLEXPORT_OST_IMG_BASE PixelSampling { public: PixelSampling(); // initialize with spatial sampling always! diff --git a/modules/iplt/base/src/point.cc b/modules/img/base/src/point.cc similarity index 98% rename from modules/iplt/base/src/point.cc rename to modules/img/base/src/point.cc index ff2916161..030600855 100644 --- a/modules/iplt/base/src/point.cc +++ b/modules/img/base/src/point.cc @@ -28,12 +28,12 @@ #include <iostream> #include <sstream> -#include <ost/iplt/peak.hh> +#include <ost/img/peak.hh> #include "point.hh" #include "size.hh" #include "vecmat.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { Point::Point(): data_() diff --git a/modules/iplt/base/src/point.hh b/modules/img/base/src/point.hh similarity index 89% rename from modules/iplt/base/src/point.hh rename to modules/img/base/src/point.hh index 36497709a..217477d09 100644 --- a/modules/iplt/base/src/point.hh +++ b/modules/img/base/src/point.hh @@ -34,16 +34,16 @@ #include <vector> #include <iosfwd> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> #include "vecmat.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { //fw decl class Size; //! class encapsulating 1D to 3D point -class DLLEXPORT_OST_IPLT_BASE Point { +class DLLEXPORT_OST_IMG_BASE Point { public: Point(); Point(const Point &p); @@ -115,8 +115,8 @@ private: Point absolute() const; }; -DLLEXPORT_OST_IPLT_BASE Point operator+(const Point& p1, const Point& p2); -DLLEXPORT_OST_IPLT_BASE Point operator-(const Point& p1, const Point& p2); +DLLEXPORT_OST_IMG_BASE Point operator+(const Point& p1, const Point& p2); +DLLEXPORT_OST_IMG_BASE Point operator-(const Point& p1, const Point& p2); /* Point operator+(const Point& p, const Size& s); @@ -126,10 +126,10 @@ Point operator-(const Point& p, const Size& s); Point operator-(const Size& s, const Point& p); */ -DLLEXPORT_OST_IPLT_BASE std::ostream& operator<<(std::ostream& os, const Point &p); +DLLEXPORT_OST_IMG_BASE std::ostream& operator<<(std::ostream& os, const Point &p); -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/point_list.cc b/modules/img/base/src/point_list.cc similarity index 96% rename from modules/iplt/base/src/point_list.cc rename to modules/img/base/src/point_list.cc index 33b0c0b01..922f78c20 100644 --- a/modules/iplt/base/src/point_list.cc +++ b/modules/img/base/src/point_list.cc @@ -24,7 +24,7 @@ #include "point_list.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { PointList::PointList(): std::vector<Point>() @@ -51,4 +51,4 @@ PointList::PointList(const PeakList& plist) } -}} // namespace iplt +}} // namespace img diff --git a/modules/iplt/base/src/point_list.hh b/modules/img/base/src/point_list.hh similarity index 92% rename from modules/iplt/base/src/point_list.hh rename to modules/img/base/src/point_list.hh index 93343cb25..a2065d9d1 100644 --- a/modules/iplt/base/src/point_list.hh +++ b/modules/img/base/src/point_list.hh @@ -28,7 +28,7 @@ #include "point.hh" #include "peak.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { //! list of points @@ -36,7 +36,7 @@ namespace ost { namespace iplt { convenience definition */ -class DLLEXPORT_OST_IPLT_BASE PointList: public std::vector<Point> +class DLLEXPORT_OST_IMG_BASE PointList: public std::vector<Point> { public: PointList(); @@ -47,6 +47,6 @@ public: }; -}} // namespace iplt +}} // namespace img #endif /*POINT_LIST_HH_*/ diff --git a/modules/iplt/base/src/polygon_mask.cc b/modules/img/base/src/polygon_mask.cc similarity index 99% rename from modules/iplt/base/src/polygon_mask.cc rename to modules/img/base/src/polygon_mask.cc index c7481588c..d1ed6c35b 100644 --- a/modules/iplt/base/src/polygon_mask.cc +++ b/modules/img/base/src/polygon_mask.cc @@ -26,7 +26,7 @@ #include "polygon_mask.hh" #include "mask_visitor.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { PolygonMask::PolygonMask(): MaskBase(), diff --git a/modules/iplt/base/src/polygon_mask.hh b/modules/img/base/src/polygon_mask.hh similarity index 94% rename from modules/iplt/base/src/polygon_mask.hh rename to modules/img/base/src/polygon_mask.hh index 5b64b0b7f..033e82d1a 100644 --- a/modules/iplt/base/src/polygon_mask.hh +++ b/modules/img/base/src/polygon_mask.hh @@ -25,16 +25,16 @@ #ifndef POLYGON_MASK_HH_ #define POLYGON_MASK_HH_ -#include <ost/iplt/vecmat.hh> +#include <ost/img/vecmat.hh> #include "mask_base.hh" namespace ost { -namespace iplt +namespace img { /// /// \sa \ref create_split_image.py "Create Split Image Example" -class DLLEXPORT_OST_IPLT_BASE PolygonMask : public MaskBase, public Polygon2 +class DLLEXPORT_OST_IMG_BASE PolygonMask : public MaskBase, public Polygon2 { public: PolygonMask(); diff --git a/modules/iplt/base/src/progress.cc b/modules/img/base/src/progress.cc similarity index 98% rename from modules/iplt/base/src/progress.cc rename to modules/img/base/src/progress.cc index 4fde67b4c..7b6ee5ed7 100644 --- a/modules/iplt/base/src/progress.cc +++ b/modules/img/base/src/progress.cc @@ -27,7 +27,7 @@ #include <algorithm> // STL algorithms class library #include "progress.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { Progress& Progress::Instance() { diff --git a/modules/iplt/base/src/progress.hh b/modules/img/base/src/progress.hh similarity index 95% rename from modules/iplt/base/src/progress.hh rename to modules/img/base/src/progress.hh index 0210698d5..897ed365e 100644 --- a/modules/iplt/base/src/progress.hh +++ b/modules/img/base/src/progress.hh @@ -26,14 +26,14 @@ #include <vector> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> namespace ost { -namespace iplt +namespace img { -class DLLEXPORT_OST_IPLT_BASE Progress +class DLLEXPORT_OST_IMG_BASE Progress { public: static Progress& Instance(); diff --git a/modules/img/base/src/raster_image/CMakeLists.txt b/modules/img/base/src/raster_image/CMakeLists.txt new file mode 100644 index 000000000..65727367a --- /dev/null +++ b/modules/img/base/src/raster_image/CMakeLists.txt @@ -0,0 +1,9 @@ +set(OST_IMG_RASTER_IMAGE_SOURCES +raster_image.cc +PARENT_SCOPE +) + +set(OST_IMG_RASTER_IMAGE_HEADERS +raster_image.hh +PARENT_SCOPE +) diff --git a/modules/iplt/base/src/raster_image/raster_image.cc b/modules/img/base/src/raster_image/raster_image.cc similarity index 98% rename from modules/iplt/base/src/raster_image/raster_image.cc rename to modules/img/base/src/raster_image/raster_image.cc index d35ee40fc..cdf17a34b 100644 --- a/modules/iplt/base/src/raster_image/raster_image.cc +++ b/modules/img/base/src/raster_image/raster_image.cc @@ -36,17 +36,17 @@ #include <boost/preprocessor/repetition.hpp> #include "raster_image.hh" #include <ost/base.hh> -#include <ost/iplt/data.hh> -#include <ost/iplt/point.hh> -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/algorithm.hh> -#include <ost/iplt/image_state.hh> +#include <ost/img/data.hh> +#include <ost/img/point.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/algorithm.hh> +#include <ost/img/image_state.hh> //#define USE_RASTER_IMAGE_STATE_ALG #define MAXBINNING 4 -namespace ost { namespace iplt { +namespace ost { namespace img { namespace { diff --git a/modules/iplt/base/src/raster_image/raster_image.hh b/modules/img/base/src/raster_image/raster_image.hh similarity index 94% rename from modules/iplt/base/src/raster_image/raster_image.hh rename to modules/img/base/src/raster_image/raster_image.hh index d633f8834..e92255771 100644 --- a/modules/iplt/base/src/raster_image/raster_image.hh +++ b/modules/img/base/src/raster_image/raster_image.hh @@ -28,10 +28,10 @@ #define IPLT_RASTER_IMAGE_H #include <ost/base.hh> -#include <ost/iplt/vecmat.hh> -#include <ost/iplt/normalizer_impl.hh> +#include <ost/img/vecmat.hh> +#include <ost/img/normalizer_impl.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { // fw declarations class Data; @@ -40,7 +40,7 @@ class Point; //! Generic raster image /*! RasterImage serves as a conversion - class between iplt and external libs, + class between img and external libs, such as wxWidgets. The underlying representation is always RGB mode, saved consecutively in 3-byte triplets. @@ -57,7 +57,7 @@ class Point; center_new_y = center_old_y + 2^zoom * mouse_y */ -class DLLEXPORT_OST_IPLT_BASE RasterImage { +class DLLEXPORT_OST_IMG_BASE RasterImage { typedef unsigned char uchar; public: //! coloring mode @@ -117,6 +117,6 @@ class DLLEXPORT_OST_IPLT_BASE RasterImage { int wh2i(int w, int h) const {return h*width_+w;} }; -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/size.cc b/modules/img/base/src/size.cc similarity index 97% rename from modules/iplt/base/src/size.cc rename to modules/img/base/src/size.cc index 68d5d0ac9..197b18d03 100644 --- a/modules/iplt/base/src/size.cc +++ b/modules/img/base/src/size.cc @@ -31,7 +31,7 @@ #include "size.hh" #include "point.hh" -namespace ost { namespace iplt { +namespace ost { namespace img { Size::Size(): w_(1), @@ -167,7 +167,7 @@ Size operator-(const Size& s1, const Size& s2) return tmp-=s2; } -std::ostream& operator<<(std::ostream& os, const iplt::Size &s) +std::ostream& operator<<(std::ostream& os, const img::Size &s) { os << "(" << s.GetWidth() << "," << s.GetHeight() << "," << s.GetDepth() << ")"; return os; diff --git a/modules/iplt/base/src/size.hh b/modules/img/base/src/size.hh similarity index 88% rename from modules/iplt/base/src/size.hh rename to modules/img/base/src/size.hh index 1a957ce38..539eda532 100644 --- a/modules/iplt/base/src/size.hh +++ b/modules/img/base/src/size.hh @@ -29,14 +29,14 @@ #include <iosfwd> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { class Point; //! class encapsulating 1D to 3D size -class DLLEXPORT_OST_IPLT_BASE Size { +class DLLEXPORT_OST_IMG_BASE Size { public: Size(); Size(const Size &s); @@ -91,13 +91,13 @@ class DLLEXPORT_OST_IPLT_BASE Size { bool equal(const Size& s) const; }; -DLLEXPORT_OST_IPLT_BASE Size operator+(const Size& s1, const Size& s2); -DLLEXPORT_OST_IPLT_BASE Size operator-(const Size& s1, const Size& s2); +DLLEXPORT_OST_IMG_BASE Size operator+(const Size& s1, const Size& s2); +DLLEXPORT_OST_IMG_BASE Size operator-(const Size& s1, const Size& s2); -DLLEXPORT_OST_IPLT_BASE std::ostream& operator<<(std::ostream& os, const Size& s); +DLLEXPORT_OST_IMG_BASE std::ostream& operator<<(std::ostream& os, const Size& s); -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/src/spherical_mask.cc b/modules/img/base/src/spherical_mask.cc similarity index 99% rename from modules/iplt/base/src/spherical_mask.cc rename to modules/img/base/src/spherical_mask.cc index 01b7c79c3..b43508def 100644 --- a/modules/iplt/base/src/spherical_mask.cc +++ b/modules/img/base/src/spherical_mask.cc @@ -27,7 +27,7 @@ namespace ost { -namespace iplt +namespace img { SphericalMask::SphericalMask(): diff --git a/modules/iplt/base/src/spherical_mask.hh b/modules/img/base/src/spherical_mask.hh similarity index 94% rename from modules/iplt/base/src/spherical_mask.hh rename to modules/img/base/src/spherical_mask.hh index 4823163cc..ec532271c 100644 --- a/modules/iplt/base/src/spherical_mask.hh +++ b/modules/img/base/src/spherical_mask.hh @@ -25,14 +25,14 @@ #ifndef SPHERICAL_MASK_HH_ #define SPHERICAL_MASK_HH_ -#include <ost/iplt/vecmat.hh> +#include <ost/img/vecmat.hh> #include "mask_base.hh" namespace ost { -namespace iplt +namespace img { -class SphericalMask : public iplt::MaskBase, public Sphere +class SphericalMask : public img::MaskBase, public Sphere { public: SphericalMask(); diff --git a/modules/iplt/base/src/util.cc b/modules/img/base/src/util.cc similarity index 97% rename from modules/iplt/base/src/util.cc rename to modules/img/base/src/util.cc index 34a948a3d..3b2638ed3 100644 --- a/modules/iplt/base/src/util.cc +++ b/modules/img/base/src/util.cc @@ -26,7 +26,7 @@ #error "util.cc must be included from util.hh" #endif -namespace ost { namespace iplt { namespace util { +namespace ost { namespace img { namespace util { template <typename T> void swap_buf(T* p, int n) diff --git a/modules/iplt/base/src/util.hh b/modules/img/base/src/util.hh similarity index 94% rename from modules/iplt/base/src/util.hh rename to modules/img/base/src/util.hh index 1d87de240..79132af88 100644 --- a/modules/iplt/base/src/util.hh +++ b/modules/img/base/src/util.hh @@ -29,9 +29,9 @@ #include <cmath> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> -namespace ost { namespace iplt { namespace util { +namespace ost { namespace img { namespace util { // byte swapping stuff @@ -52,7 +52,7 @@ void swap_double(Real *p, int n) {swap_buf<Real>(p,n);} inline void swap_long(long *p, int n) {swap_buf<long>(p,n);} -}}} // namespace iplt +}}} // namespace img // definitions #include "util.cc" diff --git a/modules/iplt/base/src/value_util.hh b/modules/img/base/src/value_util.hh similarity index 90% rename from modules/iplt/base/src/value_util.hh rename to modules/img/base/src/value_util.hh index d0940cf89..01785d6db 100644 --- a/modules/iplt/base/src/value_util.hh +++ b/modules/img/base/src/value_util.hh @@ -29,16 +29,16 @@ #include <time.h> #include <boost/random.hpp> -#include <ost/iplt/data_types.hh> +#include <ost/img/data_types.hh> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { // randomization // declaration template <typename T> -DLLEXPORT_OST_IPLT_BASE T Random(); +DLLEXPORT_OST_IMG_BASE T Random(); namespace { boost::mt19937 RandomGenerator(time(NULL)); @@ -74,7 +74,7 @@ T Random() { // declaration template <typename V, typename R> -DLLEXPORT_OST_IPLT_BASE R Val2Val(const V& v); +DLLEXPORT_OST_IMG_BASE R Val2Val(const V& v); // specialization template <> @@ -92,7 +92,7 @@ R Val2Val(const V& v) {return static_cast<R>(v);} template <typename T> -DLLEXPORT_OST_IPLT_BASE DataType Val2Type(); +DLLEXPORT_OST_IMG_BASE DataType Val2Type(); template<> inline @@ -108,7 +108,7 @@ DataType Val2Type<Word>() {return WORD;} template <typename T> -DLLEXPORT_OST_IPLT_BASE String Val2String(); +DLLEXPORT_OST_IMG_BASE String Val2String(); template<> inline diff --git a/modules/iplt/base/src/vecmat.hh b/modules/img/base/src/vecmat.hh similarity index 90% rename from modules/iplt/base/src/vecmat.hh rename to modules/img/base/src/vecmat.hh index fc2208b90..8e70a64ff 100644 --- a/modules/iplt/base/src/vecmat.hh +++ b/modules/img/base/src/vecmat.hh @@ -32,14 +32,14 @@ #include <ost/geom/geom.hh> -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { -// this pulls the geom namespace into the iplt one +// this pulls the geom namespace into the img one using namespace ::geom; -}} // ns iplt +}} // ns img #endif diff --git a/modules/iplt/base/src/version.cc b/modules/img/base/src/version.cc similarity index 97% rename from modules/iplt/base/src/version.cc rename to modules/img/base/src/version.cc index fcd385da4..7bd94775b 100644 --- a/modules/iplt/base/src/version.cc +++ b/modules/img/base/src/version.cc @@ -28,7 +28,7 @@ #include <sstream> -namespace ost { namespace iplt { +namespace ost { namespace img { String GetVersion() { diff --git a/modules/iplt/base/src/version.hh b/modules/img/base/src/version.hh similarity index 89% rename from modules/iplt/base/src/version.hh rename to modules/img/base/src/version.hh index f16555df5..d095e109a 100644 --- a/modules/iplt/base/src/version.hh +++ b/modules/img/base/src/version.hh @@ -27,13 +27,13 @@ #ifndef IPLT_VERSION_H #define IPLT_VERSION_H -#include <ost/iplt/module_config.hh> +#include <ost/img/module_config.hh> -namespace ost { namespace iplt { +namespace ost { namespace img { -DLLEXPORT_OST_IPLT_BASE String GetVersion(); +DLLEXPORT_OST_IMG_BASE String GetVersion(); -}} // namespace iplt +}} // namespace img #endif diff --git a/modules/iplt/base/tests/CMakeLists.txt b/modules/img/base/tests/CMakeLists.txt similarity index 67% rename from modules/iplt/base/tests/CMakeLists.txt rename to modules/img/base/tests/CMakeLists.txt index 1131b097a..b51491b9d 100644 --- a/modules/iplt/base/tests/CMakeLists.txt +++ b/modules/img/base/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -set(OST_IPLT_BASE_UNIT_TESTS +set(OST_IMG_BASE_UNIT_TESTS test_data.cc test_extent.cc test_function.cc @@ -16,7 +16,7 @@ tests.cc ) -ost_unittest(iplt "${OST_IPLT_BASE_UNIT_TESTS}") +ost_unittest(img "${OST_IMG_BASE_UNIT_TESTS}") if(NOT WIN32) -target_link_libraries(iplt_tests ost_iplt_alg) +target_link_libraries(img_tests ost_img_alg) endif() diff --git a/modules/iplt/base/tests/simple_test.cc b/modules/img/base/tests/simple_test.cc similarity index 92% rename from modules/iplt/base/tests/simple_test.cc rename to modules/img/base/tests/simple_test.cc index 79493e5e5..e75e71fcf 100644 --- a/modules/iplt/base/tests/simple_test.cc +++ b/modules/img/base/tests/simple_test.cc @@ -18,11 +18,11 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ -#include <ost/iplt/image.hh> +#include <ost/img/image.hh> int main() { - iplt::ImageHandle im=iplt::CreateImage(iplt::Size(10,10,10)); + img::ImageHandle im=img::CreateImage(img::Size(10,10,10)); return 0; } diff --git a/modules/iplt/base/tests/single_test_image_handle_mem.cc b/modules/img/base/tests/single_test_image_handle_mem.cc similarity index 94% rename from modules/iplt/base/tests/single_test_image_handle_mem.cc rename to modules/img/base/tests/single_test_image_handle_mem.cc index d73da44d5..e0230934a 100644 --- a/modules/iplt/base/tests/single_test_image_handle_mem.cc +++ b/modules/img/base/tests/single_test_image_handle_mem.cc @@ -22,13 +22,13 @@ #include <boost/shared_ptr.hpp> -#include <ost/iplt/data.hh> -#include <ost/iplt/image_handle.hh> -#include <ost/iplt/image_impl.hh> -#include <ost/iplt/data_observer.hh> -#include <ost/iplt/observable.hh> +#include <ost/img/data.hh> +#include <ost/img/image_handle.hh> +#include <ost/img/image_impl.hh> +#include <ost/img/data_observer.hh> +#include <ost/img/observable.hh> -using namespace ::iplt; +using namespace ::img; typedef boost::shared_ptr<ImageStateBase> isbp; typedef Observable<DataObserver> DataObservable; diff --git a/modules/iplt/base/tests/test_data.cc b/modules/img/base/tests/test_data.cc similarity index 89% rename from modules/iplt/base/tests/test_data.cc rename to modules/img/base/tests/test_data.cc index 1fde07db0..83faeabff 100644 --- a/modules/iplt/base/tests/test_data.cc +++ b/modules/img/base/tests/test_data.cc @@ -24,12 +24,12 @@ #include "test_data.hh" -#include <ost/iplt/data.hh> -#include <ost/iplt/null_data.hh> -#include <ost/iplt/data_observer.hh> -#include <ost/iplt/observable.hh> +#include <ost/img/data.hh> +#include <ost/img/null_data.hh> +#include <ost/img/data_observer.hh> +#include <ost/img/observable.hh> -using namespace ost::iplt; +using namespace ost::img; namespace test_data { diff --git a/modules/iplt/base/tests/test_data.hh b/modules/img/base/tests/test_data.hh similarity index 100% rename from modules/iplt/base/tests/test_data.hh rename to modules/img/base/tests/test_data.hh diff --git a/modules/iplt/base/tests/test_domains.cc b/modules/img/base/tests/test_domains.cc similarity index 94% rename from modules/iplt/base/tests/test_domains.cc rename to modules/img/base/tests/test_domains.cc index 17c43e5b7..05cf10217 100644 --- a/modules/iplt/base/tests/test_domains.cc +++ b/modules/img/base/tests/test_domains.cc @@ -27,14 +27,14 @@ #include <boost/test/unit_test.hpp> using boost::unit_test_framework::test_suite; -#include <ost/iplt/image_state/image_state_spatial_domain.hh> -#include <ost/iplt/image_state/image_state_frequency_domain.hh> -#include <ost/iplt/image_state/image_state_half_frequency_domain.hh> +#include <ost/img/image_state/image_state_spatial_domain.hh> +#include <ost/img/image_state/image_state_frequency_domain.hh> +#include <ost/img/image_state/image_state_half_frequency_domain.hh> namespace { -using namespace ost::iplt; -using namespace ost::iplt::image_state; +using namespace ost::img; +using namespace ost::img::image_state; void test_spatial() { diff --git a/modules/iplt/base/tests/test_extent.cc b/modules/img/base/tests/test_extent.cc similarity index 98% rename from modules/iplt/base/tests/test_extent.cc rename to modules/img/base/tests/test_extent.cc index 8d6f06a13..931bfb3e9 100644 --- a/modules/iplt/base/tests/test_extent.cc +++ b/modules/img/base/tests/test_extent.cc @@ -26,10 +26,10 @@ #include "test_extent.hh" -#include <ost/iplt/extent.hh> -#include <ost/iplt/extent_iterator.hh> +#include <ost/img/extent.hh> +#include <ost/img/extent_iterator.hh> -using namespace ost::iplt; +using namespace ost::img; namespace test_extent { diff --git a/modules/iplt/base/tests/test_extent.hh b/modules/img/base/tests/test_extent.hh similarity index 100% rename from modules/iplt/base/tests/test_extent.hh rename to modules/img/base/tests/test_extent.hh diff --git a/modules/iplt/base/tests/test_function.cc b/modules/img/base/tests/test_function.cc similarity index 95% rename from modules/iplt/base/tests/test_function.cc rename to modules/img/base/tests/test_function.cc index ef52a7179..8496575d1 100644 --- a/modules/iplt/base/tests/test_function.cc +++ b/modules/img/base/tests/test_function.cc @@ -24,9 +24,9 @@ #include "test_function.hh" -#include <ost/iplt/function.hh> -#include <ost/iplt/null_function.hh> -using namespace ost::iplt; +#include <ost/img/function.hh> +#include <ost/img/null_function.hh> +using namespace ost::img; namespace test_function { diff --git a/modules/iplt/base/tests/test_function.hh b/modules/img/base/tests/test_function.hh similarity index 100% rename from modules/iplt/base/tests/test_function.hh rename to modules/img/base/tests/test_function.hh diff --git a/modules/iplt/base/tests/test_image.cc b/modules/img/base/tests/test_image.cc similarity index 98% rename from modules/iplt/base/tests/test_image.cc rename to modules/img/base/tests/test_image.cc index 3964d8eca..38c4431e5 100644 --- a/modules/iplt/base/tests/test_image.cc +++ b/modules/img/base/tests/test_image.cc @@ -26,14 +26,14 @@ #include "test_image.hh" -#include <ost/iplt/image.hh> -#include <ost/iplt/data_observer.hh> -#include <ost/iplt/observable.hh> -#include <ost/iplt/algorithm.hh> +#include <ost/img/image.hh> +#include <ost/img/data_observer.hh> +#include <ost/img/observable.hh> +#include <ost/img/algorithm.hh> -#include <ost/iplt/alg/randomize.hh> +#include <ost/img/alg/randomize.hh> -using namespace ost::iplt; +using namespace ost::img; /* black-box image tests diff --git a/modules/iplt/base/tests/test_image.hh b/modules/img/base/tests/test_image.hh similarity index 100% rename from modules/iplt/base/tests/test_image.hh rename to modules/img/base/tests/test_image.hh diff --git a/modules/iplt/base/tests/test_image_factory.cc b/modules/img/base/tests/test_image_factory.cc similarity index 94% rename from modules/iplt/base/tests/test_image_factory.cc rename to modules/img/base/tests/test_image_factory.cc index e3adf5be3..b7669284f 100644 --- a/modules/iplt/base/tests/test_image_factory.cc +++ b/modules/img/base/tests/test_image_factory.cc @@ -24,11 +24,11 @@ #include "test_image_factory.hh" -#include <ost/iplt/image_factory.hh> -#include <ost/iplt/function.hh> -#include <ost/iplt/image.hh> +#include <ost/img/image_factory.hh> +#include <ost/img/function.hh> +#include <ost/img/image.hh> -using namespace ost::iplt; +using namespace ost::img; namespace test_image_factory { diff --git a/modules/iplt/base/tests/test_image_factory.hh b/modules/img/base/tests/test_image_factory.hh similarity index 100% rename from modules/iplt/base/tests/test_image_factory.hh rename to modules/img/base/tests/test_image_factory.hh diff --git a/modules/iplt/base/tests/test_image_impl.cc b/modules/img/base/tests/test_image_impl.cc similarity index 94% rename from modules/iplt/base/tests/test_image_impl.cc rename to modules/img/base/tests/test_image_impl.cc index 23b143433..5b4a1cbe8 100644 --- a/modules/iplt/base/tests/test_image_impl.cc +++ b/modules/img/base/tests/test_image_impl.cc @@ -24,9 +24,9 @@ #include "test_image_impl.hh" -#include <ost/iplt/image_impl.hh> -using namespace ost::iplt; -using namespace ost::iplt::detail; +#include <ost/img/image_impl.hh> +using namespace ost::img; +using namespace ost::img::detail; namespace test_image_impl { diff --git a/modules/iplt/base/tests/test_image_impl.hh b/modules/img/base/tests/test_image_impl.hh similarity index 100% rename from modules/iplt/base/tests/test_image_impl.hh rename to modules/img/base/tests/test_image_impl.hh diff --git a/modules/iplt/base/tests/test_image_state.cc b/modules/img/base/tests/test_image_state.cc similarity index 95% rename from modules/iplt/base/tests/test_image_state.cc rename to modules/img/base/tests/test_image_state.cc index b38793601..553ff6dc9 100644 --- a/modules/iplt/base/tests/test_image_state.cc +++ b/modules/img/base/tests/test_image_state.cc @@ -29,17 +29,17 @@ #include "test_image_state.hh" -#include <ost/iplt/extent.hh> -#include <ost/iplt/extent_iterator.hh> -#include <ost/iplt/size.hh> -#include <ost/iplt/image_state/image_state_impl.hh> -#include <ost/iplt/image_state/image_state_factory.hh> -#include <ost/iplt/image_state/image_state_def.hh> +#include <ost/img/extent.hh> +#include <ost/img/extent_iterator.hh> +#include <ost/img/size.hh> +#include <ost/img/image_state/image_state_impl.hh> +#include <ost/img/image_state/image_state_factory.hh> +#include <ost/img/image_state/image_state_def.hh> -#include <ost/iplt/alg/randomize.hh> +#include <ost/img/alg/randomize.hh> -using namespace ost::iplt; -using namespace ost::iplt::image_state; +using namespace ost::img; +using namespace ost::img::image_state; namespace test_image_state { diff --git a/modules/iplt/base/tests/test_image_state.hh b/modules/img/base/tests/test_image_state.hh similarity index 100% rename from modules/iplt/base/tests/test_image_state.hh rename to modules/img/base/tests/test_image_state.hh diff --git a/modules/iplt/base/tests/test_image_state_visitor.cc b/modules/img/base/tests/test_image_state_visitor.cc similarity index 96% rename from modules/iplt/base/tests/test_image_state_visitor.cc rename to modules/img/base/tests/test_image_state_visitor.cc index 67ad0a130..376fd4bda 100644 --- a/modules/iplt/base/tests/test_image_state_visitor.cc +++ b/modules/img/base/tests/test_image_state_visitor.cc @@ -24,10 +24,10 @@ #include "test_image_state_visitor.hh" -#include <ost/iplt/image_state.hh> +#include <ost/img/image_state.hh> -using namespace ost::iplt; -using namespace ost::iplt::image_state; +using namespace ost::img; +using namespace ost::img::image_state; namespace test_image_state_visitor { diff --git a/modules/iplt/base/tests/test_image_state_visitor.hh b/modules/img/base/tests/test_image_state_visitor.hh similarity index 100% rename from modules/iplt/base/tests/test_image_state_visitor.hh rename to modules/img/base/tests/test_image_state_visitor.hh diff --git a/modules/iplt/base/tests/test_index.cc b/modules/img/base/tests/test_index.cc similarity index 94% rename from modules/iplt/base/tests/test_index.cc rename to modules/img/base/tests/test_index.cc index 2cc8848b8..b06a6740d 100644 --- a/modules/iplt/base/tests/test_index.cc +++ b/modules/img/base/tests/test_index.cc @@ -26,10 +26,10 @@ #include "test_index.hh" -#include <ost/iplt/image_state/index.hh> +#include <ost/img/image_state/index.hh> -using namespace ost::iplt; -using namespace ost::iplt::image_state; +using namespace ost::img; +using namespace ost::img::image_state; namespace test_index { diff --git a/modules/iplt/base/tests/test_index.hh b/modules/img/base/tests/test_index.hh similarity index 100% rename from modules/iplt/base/tests/test_index.hh rename to modules/img/base/tests/test_index.hh diff --git a/modules/iplt/base/tests/test_point.cc b/modules/img/base/tests/test_point.cc similarity index 96% rename from modules/iplt/base/tests/test_point.cc rename to modules/img/base/tests/test_point.cc index e702dca8f..67c35f68e 100644 --- a/modules/iplt/base/tests/test_point.cc +++ b/modules/img/base/tests/test_point.cc @@ -24,8 +24,8 @@ #include "test_point.hh" -#include <ost/iplt/point.hh> -using namespace ost::iplt; +#include <ost/img/point.hh> +using namespace ost::img; namespace test_point { diff --git a/modules/iplt/base/tests/test_point.hh b/modules/img/base/tests/test_point.hh similarity index 100% rename from modules/iplt/base/tests/test_point.hh rename to modules/img/base/tests/test_point.hh diff --git a/modules/iplt/base/tests/test_sampling.cc b/modules/img/base/tests/test_sampling.cc similarity index 94% rename from modules/iplt/base/tests/test_sampling.cc rename to modules/img/base/tests/test_sampling.cc index 226c94b8b..e273c3853 100644 --- a/modules/iplt/base/tests/test_sampling.cc +++ b/modules/img/base/tests/test_sampling.cc @@ -24,11 +24,11 @@ #include "test_sampling.hh" -#include <ost/iplt/pixel_sampling.hh> -#include <ost/iplt/extent.hh> -#include <ost/iplt/vecmat.hh> +#include <ost/img/pixel_sampling.hh> +#include <ost/img/extent.hh> +#include <ost/img/vecmat.hh> -using namespace ost::iplt; +using namespace ost::img; namespace test_sampling { diff --git a/modules/iplt/base/tests/test_sampling.hh b/modules/img/base/tests/test_sampling.hh similarity index 100% rename from modules/iplt/base/tests/test_sampling.hh rename to modules/img/base/tests/test_sampling.hh diff --git a/modules/iplt/base/tests/test_size.cc b/modules/img/base/tests/test_size.cc similarity index 97% rename from modules/iplt/base/tests/test_size.cc rename to modules/img/base/tests/test_size.cc index e4ebfb545..53a2bf7f7 100644 --- a/modules/iplt/base/tests/test_size.cc +++ b/modules/img/base/tests/test_size.cc @@ -24,8 +24,8 @@ #include "test_size.hh" -#include <ost/iplt/size.hh> -using namespace ost::iplt; +#include <ost/img/size.hh> +using namespace ost::img; namespace test_size { diff --git a/modules/iplt/base/tests/test_size.hh b/modules/img/base/tests/test_size.hh similarity index 100% rename from modules/iplt/base/tests/test_size.hh rename to modules/img/base/tests/test_size.hh diff --git a/modules/iplt/base/tests/test_transform.hh b/modules/img/base/tests/test_transform.hh similarity index 100% rename from modules/iplt/base/tests/test_transform.hh rename to modules/img/base/tests/test_transform.hh diff --git a/modules/iplt/base/tests/test_utils.hh b/modules/img/base/tests/test_utils.hh similarity index 96% rename from modules/iplt/base/tests/test_utils.hh rename to modules/img/base/tests/test_utils.hh index f430196f8..a56394069 100644 --- a/modules/iplt/base/tests/test_utils.hh +++ b/modules/img/base/tests/test_utils.hh @@ -30,10 +30,10 @@ #include <boost/test/test_tools.hpp> #include <ost/base.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/image_state.hh> +#include <ost/img/value_util.hh> -using namespace ost::iplt; +using namespace ost::img; template<typename V,class DP> void Randomize(image_state::ImageStateImpl<V,DP>& isi) diff --git a/modules/iplt/base/tests/test_value_holder.cc b/modules/img/base/tests/test_value_holder.cc similarity index 93% rename from modules/iplt/base/tests/test_value_holder.cc rename to modules/img/base/tests/test_value_holder.cc index 8058ebad8..2b86e68ed 100644 --- a/modules/iplt/base/tests/test_value_holder.cc +++ b/modules/img/base/tests/test_value_holder.cc @@ -26,12 +26,12 @@ #include "test_value_holder.hh" -#include <ost/iplt/image_state/value_holder.hh> -#include <ost/iplt/image_state/index.hh> -#include <ost/iplt/value_util.hh> +#include <ost/img/image_state/value_holder.hh> +#include <ost/img/image_state/index.hh> +#include <ost/img/value_util.hh> -using namespace ost::iplt; -using namespace ost::iplt::image_state; +using namespace ost::img; +using namespace ost::img::image_state; namespace value_holder_test { diff --git a/modules/iplt/base/tests/test_value_holder.hh b/modules/img/base/tests/test_value_holder.hh similarity index 100% rename from modules/iplt/base/tests/test_value_holder.hh rename to modules/img/base/tests/test_value_holder.hh diff --git a/modules/iplt/base/tests/tests.cc b/modules/img/base/tests/tests.cc similarity index 96% rename from modules/iplt/base/tests/tests.cc rename to modules/img/base/tests/tests.cc index cbb9acbfc..b4f51634a 100644 --- a/modules/iplt/base/tests/tests.cc +++ b/modules/img/base/tests/tests.cc @@ -56,7 +56,7 @@ test_suite* CreateResidueTest(); test_suite* CreateCoordGroupTest(); test_suite* CreateDomainsTest(); -bool init_ost_iplt_base_unit_tests() { +bool init_ost_img_base_unit_tests() { try { framework::master_test_suite().add(CreateDataTest()); framework::master_test_suite().add(CreateExtentTest()); @@ -80,6 +80,6 @@ bool init_ost_iplt_base_unit_tests() { int main(int argc, char** argv) { - return boost::unit_test::unit_test_main(init_ost_iplt_base_unit_tests, + return boost::unit_test::unit_test_main(init_ost_img_base_unit_tests, argc, argv); } diff --git a/modules/io/pymod/CMakeLists.txt b/modules/io/pymod/CMakeLists.txt index 975d8dd02..55ea4a5f3 100644 --- a/modules/io/pymod/CMakeLists.txt +++ b/modules/io/pymod/CMakeLists.txt @@ -3,7 +3,7 @@ set(OST_IO_PYMOD_SOURCES export_pdb_io.cc ) -if (ENABLE_IPLT) +if (ENABLE_IMG) set(OST_IO_PYMOD_SOURCES ${OST_IO_PYMOD_SOURCES} export_map_io.cc) endif() diff --git a/modules/io/pymod/__init__.py b/modules/io/pymod/__init__.py index e1d282ead..a0fc73cc9 100644 --- a/modules/io/pymod/__init__.py +++ b/modules/io/pymod/__init__.py @@ -74,7 +74,7 @@ def SavePDB(models, filename): writer.Write(model) try: - from ost import iplt + from ost import img LoadMap = LoadImage SaveMap = SaveImage except ImportError: @@ -83,7 +83,7 @@ except ImportError: ## loads several images and puts them in an ImageList # \sa \ref fft_li.py "View Fourier Transform Example" def LoadImageList (files): - image_list=iplt.ImageList() + image_list=img.ImageList() for file in files: image=LoadImage(file) image_list.append(image) diff --git a/modules/io/pymod/export_map_io.cc b/modules/io/pymod/export_map_io.cc index 7207c554a..44c668af2 100644 --- a/modules/io/pymod/export_map_io.cc +++ b/modules/io/pymod/export_map_io.cc @@ -17,39 +17,39 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ #include <boost/python.hpp> -#include <ost/io/iplt/map_io_dx_handler.hh> -#include <ost/io/iplt/map_io_spi_handler.hh> -#include <ost/io/iplt/map_io_mrc_handler.hh> -#include <ost/io/iplt/map_io_dm3_handler.hh> -#include <ost/io/iplt/map_io_situs_handler.hh> -#include <ost/io/iplt/map_io_tiff_handler.hh> -#include <ost/io/iplt/map_io_png_handler.hh> -#include <ost/io/iplt/map_io_dat_handler.hh> -#include <ost/io/iplt/map_io_jpk_handler.hh> -#include <ost/io/iplt/map_io_nanoscope_handler.hh> -#include <ost/io/iplt/image_format.hh> -#include <ost/io/iplt/load_map.hh> +#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/image_format.hh> +#include <ost/io/img/load_map.hh> using namespace boost::python; using namespace ost; using namespace ost::io; -void save_image1(const iplt::ImageHandle& image,const boost::filesystem::path& loc) +void save_image1(const img::ImageHandle& image,const boost::filesystem::path& loc) { SaveImage(image,loc); } -void save_image2(const iplt::ImageHandle& image,const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) +void save_image2(const img::ImageHandle& image,const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) { SaveImage(image,loc,formatstruct); } -iplt::ImageHandle load_image1(const boost::filesystem::path& loc) +img::ImageHandle load_image1(const boost::filesystem::path& loc) { return LoadImage(loc); } -iplt::ImageHandle load_image2(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) +img::ImageHandle load_image2(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) { return LoadImage(loc,formatstruct); } diff --git a/modules/io/pymod/wrap_io.cc b/modules/io/pymod/wrap_io.cc index af181e9d9..4e58c969f 100644 --- a/modules/io/pymod/wrap_io.cc +++ b/modules/io/pymod/wrap_io.cc @@ -72,7 +72,7 @@ BOOST_PYTHON_FUNCTION_OVERLOADS(save_charmm_trj_ov, } void export_pdb_io(); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED void export_map_io(); #endif BOOST_PYTHON_MODULE(_io) @@ -114,7 +114,7 @@ BOOST_PYTHON_MODULE(_io) def("LoadCHARMMTraj",LoadCHARMMTraj,load_charmm_trj_ov()); def("SaveCHARMMTraj",SaveCHARMMTraj,save_charmm_trj_ov()); export_pdb_io(); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED export_map_io(); #endif } diff --git a/modules/io/src/CMakeLists.txt b/modules/io/src/CMakeLists.txt index acc26b50d..3dafdc92e 100644 --- a/modules/io/src/CMakeLists.txt +++ b/modules/io/src/CMakeLists.txt @@ -1,6 +1,6 @@ add_subdirectory(mol) add_subdirectory(seq) -add_subdirectory(iplt) +add_subdirectory(img) set(OST_IO_HEADERS binary_data_sink.hh @@ -28,14 +28,14 @@ foreach(fname ${OST_IO_SEQ_SOURCES}) set(OST_IO_SOURCES ${OST_IO_SOURCES} seq/${fname}) endforeach(fname ${OST_IO_SEQ_SOURCES}) -if (ENABLE_IPLT) - foreach(fname ${OST_IO_IPLT_SOURCES}) - set(OST_IO_SOURCES ${OST_IO_SOURCES} iplt/${fname}) - endforeach(fname ${OST_IO_IPLT_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}) - foreach(fname ${OST_IO_IPLT_HEADERS}) - set(OST_IO_HEADERS ${OST_IO_HEADERS} iplt/${fname}) - endforeach(fname ${OST_IO_IPLT_HEADERS}) + 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_MOL_HEADERS}) @@ -49,12 +49,12 @@ endforeach(fname ${OST_IO_SEQ_HEADERS}) set(OST_IO_DEPENDENCIES base;conop;seq) -if (ENABLE_IPLT) - set(OST_IO_DEPENDENCIES ${OST_IO_DEPENDENCIES};iplt;iplt_alg) +if (ENABLE_IMG) + set(OST_IO_DEPENDENCIES ${OST_IO_DEPENDENCIES};img;img_alg) endif() module(NAME io SOURCES "${OST_IO_SOURCES}" HEADERS ${OST_IO_MOL_HEADERS} IN_DIR mol - ${OST_IO_IPLT_HEADERS} IN_DIR iplt + ${OST_IO_IMG_HEADERS} IN_DIR img ${OST_IO_SEQ_HEADERS} IN_DIR seq ${OST_IO_HEADERS} DEPENDS_ON ${OST_IO_DEPENDENCIES}) @@ -62,6 +62,6 @@ if (NOT WIN32) # see note in modules/gui/src/CMakeLists.txt target_link_libraries(ost_io ${BOOST_IOSTREAM_LIBRARIES}) endif() -if (ENABLE_IPLT) +if (ENABLE_IMG) target_link_libraries(ost_io ${TIFF_LIBRARIES} ${PNG_LIBRARIES}) endif() \ No newline at end of file diff --git a/modules/io/src/iplt/CMakeLists.txt b/modules/io/src/img/CMakeLists.txt similarity index 93% rename from modules/io/src/iplt/CMakeLists.txt rename to modules/io/src/img/CMakeLists.txt index c2c50adf0..4ed3e1999 100644 --- a/modules/io/src/iplt/CMakeLists.txt +++ b/modules/io/src/img/CMakeLists.txt @@ -1,4 +1,4 @@ -set(OST_IO_IPLT_SOURCES +set(OST_IO_IMG_SOURCES load_map.cc map_io_dx_handler.cc map_io_spi_handler.cc @@ -16,7 +16,7 @@ tiff_util.cc PARENT_SCOPE ) -set(OST_IO_IPLT_HEADERS +set(OST_IO_IMG_HEADERS load_map.hh image_format.hh image_format_conversion.cc diff --git a/modules/io/src/iplt/convert_vax_data.c b/modules/io/src/img/convert_vax_data.c similarity index 100% rename from modules/io/src/iplt/convert_vax_data.c rename to modules/io/src/img/convert_vax_data.c diff --git a/modules/io/src/iplt/convert_vax_data.h b/modules/io/src/img/convert_vax_data.h similarity index 100% rename from modules/io/src/iplt/convert_vax_data.h rename to modules/io/src/img/convert_vax_data.h diff --git a/modules/io/src/iplt/image_format.cc b/modules/io/src/img/image_format.cc similarity index 72% rename from modules/io/src/iplt/image_format.cc rename to modules/io/src/img/image_format.cc index cfdd8ee47..fa8c33630 100644 --- a/modules/io/src/iplt/image_format.cc +++ b/modules/io/src/img/image_format.cc @@ -1,4 +1,4 @@ -#include <ost/io/iplt/image_format.hh> +#include <ost/io/img/image_format.hh> namespace ost { namespace io { diff --git a/modules/io/src/iplt/image_format.hh b/modules/io/src/img/image_format.hh similarity index 98% rename from modules/io/src/iplt/image_format.hh rename to modules/io/src/img/image_format.hh index 811fa0ca7..5428337cd 100644 --- a/modules/io/src/iplt/image_format.hh +++ b/modules/io/src/img/image_format.hh @@ -27,7 +27,7 @@ #ifndef IPLT_IMAGE_FORMAT_H #define IPLT_IMAGE_FORMAT_H -#include <ost/iplt/data_types.hh> +#include <ost/img/data_types.hh> #include <ost/base.hh> #include <ost/io/convert.hh> #include <ost/io/module_config.hh> diff --git a/modules/io/src/iplt/image_format_conversion.cc b/modules/io/src/img/image_format_conversion.cc similarity index 100% rename from modules/io/src/iplt/image_format_conversion.cc rename to modules/io/src/img/image_format_conversion.cc diff --git a/modules/io/src/iplt/image_io_plugin.hh b/modules/io/src/img/image_io_plugin.hh similarity index 94% rename from modules/io/src/iplt/image_io_plugin.hh rename to modules/io/src/img/image_io_plugin.hh index f9ce9a33f..316de18eb 100644 --- a/modules/io/src/iplt/image_io_plugin.hh +++ b/modules/io/src/img/image_io_plugin.hh @@ -31,13 +31,13 @@ #include <boost/filesystem/operations.hpp> #include <boost/shared_ptr.hpp> -#include <iplt/base.hh> -#include <iplt/image.hh> -#include <iplt/normalizer_impl.hh> -#include <iplt/message.hh> +#include <img/base.hh> +#include <img/image.hh> +#include <img/normalizer_impl.hh> +#include <img/message.hh> #include "image_format.hh" -namespace ost { namespace iplt { namespace io { +namespace ost { namespace img { namespace io { using boost::filesystem::path; diff --git a/modules/io/src/iplt/jpk_util.hh b/modules/io/src/img/jpk_util.hh similarity index 100% rename from modules/io/src/iplt/jpk_util.hh rename to modules/io/src/img/jpk_util.hh diff --git a/modules/io/src/iplt/load_map.cc b/modules/io/src/img/load_map.cc similarity index 71% rename from modules/io/src/iplt/load_map.cc rename to modules/io/src/img/load_map.cc index 94b155c20..8d0ce47e1 100644 --- a/modules/io/src/iplt/load_map.cc +++ b/modules/io/src/img/load_map.cc @@ -19,21 +19,21 @@ // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ #include <ost/log.hh> -#include <ost/iplt/map.hh> -#include <ost/iplt/alg/stat_min_max.hh> +#include <ost/img/map.hh> +#include <ost/img/alg/stat_min_max.hh> #include <ost/io/io_manager.hh> #include "load_map.hh" #include "map_io_handler.hh" namespace ost { namespace io { -DLLEXPORT_OST_IO iplt::ImageHandle LoadImage(const boost::filesystem::path& loc) +DLLEXPORT_OST_IO img::ImageHandle LoadImage(const boost::filesystem::path& loc) { UndefinedImageFormat undefined; return LoadImage(loc,undefined); } -DLLEXPORT_OST_IO iplt::ImageHandle LoadImage(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) +DLLEXPORT_OST_IO img::ImageHandle LoadImage(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) { if(!boost::filesystem::exists(loc)){ throw IOException("file not found: " + loc.string()); @@ -47,7 +47,7 @@ DLLEXPORT_OST_IO iplt::ImageHandle LoadImage(const boost::filesystem::path& loc, throw IOException("could not find io-plugin for " + loc.string()); } - iplt::ImageHandle ih = CreateImage(iplt::Extent(),iplt::REAL,iplt::SPATIAL); + img::ImageHandle ih = CreateImage(img::Extent(),img::REAL,img::SPATIAL); LOG_DUMP("calling import on map io handle" << std::endl); map_io->Import(ih,loc,formatstruct); @@ -59,13 +59,13 @@ DLLEXPORT_OST_IO iplt::ImageHandle LoadImage(const boost::filesystem::path& loc, return ih; } -DLLEXPORT_OST_IO void SaveImage(const iplt::ImageHandle& image, const boost::filesystem::path& loc) +DLLEXPORT_OST_IO void SaveImage(const img::ImageHandle& image, const boost::filesystem::path& loc) { UndefinedImageFormat undefined; SaveImage(image,loc,undefined); } -DLLEXPORT_OST_IO void SaveImage(const iplt::ImageHandle& image, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) +DLLEXPORT_OST_IO void SaveImage(const img::ImageHandle& image, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) { MapIOHandlerPtr map_io = IOManager::Instance().FindMapExportHandlerFile(loc,formatstruct); @@ -77,22 +77,22 @@ DLLEXPORT_OST_IO void SaveImage(const iplt::ImageHandle& image, const boost::fil } -DLLEXPORT_OST_IO iplt::MapHandle LoadMap(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) +DLLEXPORT_OST_IO img::MapHandle LoadMap(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) { return LoadImage(loc,formatstruct); } -DLLEXPORT_OST_IO iplt::MapHandle LoadMap(const boost::filesystem::path& loc) +DLLEXPORT_OST_IO img::MapHandle LoadMap(const boost::filesystem::path& loc) { return LoadImage(loc); } -DLLEXPORT_OST_IO void SaveMap(const iplt::ImageHandle& image, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) +DLLEXPORT_OST_IO void SaveMap(const img::ImageHandle& image, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) { SaveImage(image,loc,formatstruct); } -DLLEXPORT_OST_IO void SaveMap(const iplt::ImageHandle& image, const boost::filesystem::path& loc) +DLLEXPORT_OST_IO void SaveMap(const img::ImageHandle& image, const boost::filesystem::path& loc) { SaveImage(image,loc); } diff --git a/modules/io/src/iplt/load_map.hh b/modules/io/src/img/load_map.hh similarity index 73% rename from modules/io/src/iplt/load_map.hh rename to modules/io/src/img/load_map.hh index 2514ea5fa..30e0ec056 100644 --- a/modules/io/src/iplt/load_map.hh +++ b/modules/io/src/img/load_map.hh @@ -21,9 +21,9 @@ #define OST_IO_LOAD_MAP_HH #include <ost/io/module_config.hh> -#include <ost/iplt/map.hh> -#include <ost/iplt/alg/normalizer_factory.hh> -#include <ost/io/iplt/image_format.hh> +#include <ost/img/map.hh> +#include <ost/img/alg/normalizer_factory.hh> +#include <ost/io/img/image_format.hh> namespace ost { @@ -35,34 +35,34 @@ namespace io { /// extension. In case the extension is not available, the content of the file will /// be examined. This analysis will be sufficient to determine the format type for /// many files. In case the file format cannot be determined, the function will throw an error. -DLLEXPORT_OST_IO iplt::ImageHandle LoadImage(const boost::filesystem::path& loc); +DLLEXPORT_OST_IO img::ImageHandle LoadImage(const boost::filesystem::path& loc); /// \brief Function that loads an image from a file with a specific format /// /// This function reads an image file from disk and transfers the data into memory /// The function assumes that the file has the specified format -DLLEXPORT_OST_IO iplt::ImageHandle LoadImage(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); +DLLEXPORT_OST_IO img::ImageHandle LoadImage(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); /// \brief Function that saves an image to a file /// /// This function saves an image on disk. The function automatically determines the file format by looking at the filename /// extension. In case the extension is not availabel, the function will throw an error /// \sa \ref spoke_pattern.py "Spoke Pattern Example" -DLLEXPORT_OST_IO void SaveImage(const iplt::ImageHandle& image, const boost::filesystem::path& loc); +DLLEXPORT_OST_IO void SaveImage(const img::ImageHandle& image, const boost::filesystem::path& loc); /// \brief Function that saves an image to a file using a specified format /// /// This function saves an image on disk using the format specified in the function call /// \sa \ref spoke_pattern.py "Spoke Pattern Example" -DLLEXPORT_OST_IO void SaveImage(const iplt::ImageHandle& image, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); +DLLEXPORT_OST_IO void SaveImage(const img::ImageHandle& image, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); /// \brief Alias for the equivalent LoadImage function -DLLEXPORT_OST_IO iplt::MapHandle LoadMap(const boost::filesystem::path& loc); +DLLEXPORT_OST_IO img::MapHandle LoadMap(const boost::filesystem::path& loc); /// \brief Alias for the equivalent LoadImage function -DLLEXPORT_OST_IO iplt::MapHandle LoadMap(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); +DLLEXPORT_OST_IO img::MapHandle LoadMap(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); /// \brief Alias for the equivalent SaveImage function -DLLEXPORT_OST_IO void SaveMap(const iplt::ImageHandle& image, const boost::filesystem::path& loc); +DLLEXPORT_OST_IO void SaveMap(const img::ImageHandle& image, const boost::filesystem::path& loc); /// \brief Alias for the equivalent SaveImage function -DLLEXPORT_OST_IO void SaveMap(const iplt::ImageHandle& image, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); +DLLEXPORT_OST_IO void SaveMap(const img::ImageHandle& image, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); }} // ns #endif diff --git a/modules/io/src/iplt/map_io_dat_handler.cc b/modules/io/src/img/map_io_dat_handler.cc similarity index 74% rename from modules/io/src/iplt/map_io_dat_handler.cc rename to modules/io/src/img/map_io_dat_handler.cc index 199f7bc6a..dc375df8e 100644 --- a/modules/io/src/iplt/map_io_dat_handler.cc +++ b/modules/io/src/img/map_io_dat_handler.cc @@ -20,9 +20,9 @@ #include <boost/shared_array.hpp> #include <boost/filesystem/operations.hpp> #include <boost/filesystem/fstream.hpp> -#include <ost/iplt/image.hh> -#include <ost/iplt/alg/normalizer_factory.hh> -#include <ost/iplt/progress.hh> +#include <ost/img/image.hh> +#include <ost/img/alg/normalizer_factory.hh> +#include <ost/img/progress.hh> #include <ost/io/io_exception.hh> #include <ost/io/convert.hh> #include <ost/io/converting_streams.hh> @@ -82,7 +82,7 @@ bool MapIODatHandler::MatchSuffix(const String& suffix) return false; } -void MapIODatHandler::Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) +void MapIODatHandler::Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) { boost::filesystem::ifstream infile(loc, std::ios::binary); if(!infile) { @@ -93,46 +93,46 @@ void MapIODatHandler::Import(iplt::MapHandle& sh, const boost::filesystem::path& } template <int CONVERSIONTYPE> -void real_filler(iplt::MapHandle& sh, std::istream& file) +void real_filler(img::MapHandle& sh, std::istream& file) { BinaryIStream<CONVERSIONTYPE> file_bin(file); - iplt::Size size = sh.GetSize(); - char this_dummy; //create dummy variable to give to iplt::Progress as this - iplt::Progress::Instance().Register(&this_dummy,size[1],100); + img::Size size = sh.GetSize(); + char this_dummy; //create dummy variable to give to img::Progress as this + img::Progress::Instance().Register(&this_dummy,size[1],100); for(unsigned int row=0;row<size[1];row++) { for(unsigned int column=0;column<size[0];column++) { short value; file_bin >> value; - sh.SetReal(iplt::Point(column,row),static_cast<Real>(value)); + sh.SetReal(img::Point(column,row),static_cast<Real>(value)); } - iplt::Progress::Instance().AdvanceProgress(&this_dummy); + img::Progress::Instance().AdvanceProgress(&this_dummy); } - iplt::Progress::Instance().DeRegister(&this_dummy); + img::Progress::Instance().DeRegister(&this_dummy); } template <int CONVERSIONTYPE> -void real_dumper(const iplt::MapHandle& sh, std::ostream& file, const DAT& formatdat) +void real_dumper(const img::MapHandle& sh, std::ostream& file, const DAT& formatdat) { BinaryOStream<CONVERSIONTYPE> file_bin(file); - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if (formatdat.GetNormalizeOnSave() == true) { - norm = iplt::alg::CreateLinearRangeNormalizer(sh,formatdat.GetMinimum(),formatdat.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(sh,formatdat.GetMinimum(),formatdat.GetMaximum()); } - iplt::Size size = sh.GetSize(); - char this_dummy; //create dummy variable to give to iplt::Progress as this - iplt::Progress::Instance().Register(&this_dummy,size[1],100); + img::Size size = sh.GetSize(); + char this_dummy; //create dummy variable to give to img::Progress as this + img::Progress::Instance().Register(&this_dummy,size[1],100); for(unsigned int row=0;row<size[1];row++) { for(unsigned int column=0;column<size[0];column++) { - file_bin << static_cast<short>(norm.Convert(sh.GetReal(iplt::Point(column,row)))); + file_bin << static_cast<short>(norm.Convert(sh.GetReal(img::Point(column,row)))); } - iplt::Progress::Instance().AdvanceProgress(&this_dummy); + img::Progress::Instance().AdvanceProgress(&this_dummy); } - iplt::Progress::Instance().DeRegister(&this_dummy); + img::Progress::Instance().DeRegister(&this_dummy); } -void MapIODatHandler::Import(iplt::MapHandle& sh, std::istream& file, const ImageFormatBase& formatstruct) +void MapIODatHandler::Import(img::MapHandle& sh, std::istream& file, const ImageFormatBase& formatstruct) { DAT form; @@ -153,7 +153,7 @@ void MapIODatHandler::Import(iplt::MapHandle& sh, std::istream& file, const Imag unsigned int size=static_cast<unsigned int>(sqrt(filesize/2.0)); // default origin is top-left - sh.Reset(iplt::Extent(iplt::Point(0,0),iplt::Size(size,size)), iplt::REAL, iplt::SPATIAL); + sh.Reset(img::Extent(img::Point(0,0),img::Size(size,size)), img::REAL, img::SPATIAL); switch(formatdat.GetEndianess()) { case OST_BIG_ENDIAN: @@ -168,7 +168,7 @@ void MapIODatHandler::Import(iplt::MapHandle& sh, std::istream& file, const Imag } } -void MapIODatHandler::Export(const iplt::MapHandle& mh2, +void MapIODatHandler::Export(const img::MapHandle& mh2, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const { boost::filesystem::ofstream outfile(loc, std::ios::binary); @@ -180,7 +180,7 @@ void MapIODatHandler::Export(const iplt::MapHandle& mh2, outfile.close(); } -void MapIODatHandler::Export(const iplt::MapHandle& sh, std::ostream& file,const ImageFormatBase& formatstruct) const +void MapIODatHandler::Export(const img::MapHandle& sh, std::ostream& file,const ImageFormatBase& formatstruct) const { DAT form; @@ -191,7 +191,7 @@ void MapIODatHandler::Export(const iplt::MapHandle& sh, std::ostream& file,const assert (formatstruct.GetFormatString()==UndefinedImageFormat::FORMAT_STRING); } - iplt::Size size = sh.GetSize(); + img::Size size = sh.GetSize(); if (size[2]!=1 || (size[0]!=size[1])) { throw IOException("DAT IO: Dat format only supports square 2D images"); diff --git a/modules/io/src/iplt/map_io_dat_handler.hh b/modules/io/src/img/map_io_dat_handler.hh similarity index 82% rename from modules/io/src/iplt/map_io_dat_handler.hh rename to modules/io/src/img/map_io_dat_handler.hh index 3574fe5d2..25f5404e1 100644 --- a/modules/io/src/iplt/map_io_dat_handler.hh +++ b/modules/io/src/img/map_io_dat_handler.hh @@ -54,10 +54,10 @@ class DLLEXPORT_OST_IO MapIODatHandler: public MapIOHandler /// \brief Map IO handler to read/write Spider map files /// /// This map IO handler reads and writes Spider formatted map files. - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); - virtual void Import(iplt::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); + virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); diff --git a/modules/io/src/iplt/map_io_dm3_handler.cc b/modules/io/src/img/map_io_dm3_handler.cc similarity index 92% rename from modules/io/src/iplt/map_io_dm3_handler.cc rename to modules/io/src/img/map_io_dm3_handler.cc index 4517affbc..395499d7f 100644 --- a/modules/io/src/iplt/map_io_dm3_handler.cc +++ b/modules/io/src/img/map_io_dm3_handler.cc @@ -33,10 +33,10 @@ #include <boost/filesystem/fstream.hpp> #include <boost/algorithm/string.hpp> #include <ost/log.hh> -#include <ost/iplt/util.hh> -#include <ost/iplt/image.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/progress.hh> +#include <ost/img/util.hh> +#include <ost/img/image.hh> +#include <ost/img/image_state.hh> +#include <ost/img/progress.hh> #include <ost/io/io_exception.hh> #include <ost/io/swap_util.hh> @@ -107,20 +107,20 @@ void tag_value_convert(int number_type, void* src_ptr, DEST* dest_ptr, size_t n= template<typename SOURCE, typename DEST> -void img_data_convert2(void* src_ptr, iplt::RealSpatialImageState& isi) +void img_data_convert2(void* src_ptr, img::RealSpatialImageState& isi) { SOURCE* r_src_ptr = reinterpret_cast<SOURCE*>(src_ptr); int width=isi.GetSize()[0]; int height=isi.GetSize()[1]; for(int hi=0;hi<height;++hi) { for(int wi=0;wi<width;++wi) { - isi.Value(iplt::Point(wi,hi))=static_cast<DEST>(r_src_ptr[hi*width+wi]); + isi.Value(img::Point(wi,hi))=static_cast<DEST>(r_src_ptr[hi*width+wi]); } } } template<typename DEST> -void img_data_convert(int number_type, void* src_ptr, iplt::RealSpatialImageState& isi) +void img_data_convert(int number_type, void* src_ptr, img::RealSpatialImageState& isi) { if(number_type==2) { img_data_convert2<short,DEST>(src_ptr,isi); @@ -151,7 +151,7 @@ public: // parse file void ParseFile(const bf::path& loc); void ParseStream(std::istream& is); - iplt::ImageHandle RetrieveImage() const; + img::ImageHandle RetrieveImage() const; private: typedef std::vector<uint> TagTypeInfo; @@ -176,7 +176,7 @@ private: bool swap_tag_; bool swap_data_; - std::vector<iplt::ImageHandle> image_handle_list_; + std::vector<img::ImageHandle> image_handle_list_; boost::shared_array<uchar> image_data_; uint image_data_byte_size_; uint image_number_type_; @@ -204,13 +204,13 @@ size_t DM3Collector::file_read ( void * ptr, size_t size, size_t count, std::ist stream.read(reinterpret_cast<char*>(ptr),size*count); size_t s=stream.gcount(); size_t pos=stream.tellg(); - iplt::Progress::Instance().AdvanceProgress(this,pos-0); + img::Progress::Instance().AdvanceProgress(this,pos-0); return s; } void DM3Collector::ParseFile(const bf::path& loc) { - iplt::Progress::Instance().Register(this,bf::file_size(loc),1000); + img::Progress::Instance().Register(this,bf::file_size(loc),1000); bf::ifstream ifile(loc, std::ios::binary); if(!ifile) { @@ -236,7 +236,7 @@ void DM3Collector::ParseStream(std::istream& fp) LOG_MESSAGE("endianess: " << endianess << std::endl); parse_tag_group(0,"ROOT",fp); - iplt::Progress::Instance().DeRegister(this); + img::Progress::Instance().DeRegister(this); if(fp.eof()==0) { LOG_ERROR("file not parsed completely" << std::endl); } else { @@ -245,11 +245,11 @@ void DM3Collector::ParseStream(std::istream& fp) } -iplt::ImageHandle DM3Collector::RetrieveImage() const +img::ImageHandle DM3Collector::RetrieveImage() const { - iplt::ImageHandle ih; + img::ImageHandle ih; int maxdim=0; - for(std::vector<iplt::ImageHandle>::const_iterator it=image_handle_list_.begin(); + for(std::vector<img::ImageHandle>::const_iterator it=image_handle_list_.begin(); it!=image_handle_list_.end();++it) { if(it->GetExtent().GetVolume()>maxdim) { ih=*it; @@ -302,8 +302,8 @@ void DM3Collector::check_image() LOG_VERBOSE("assembling image " << image_width_ << "x" << image_height_ << std::endl); // implicit row-major to colimn major conversion - iplt::ImageHandle ih=CreateImage(iplt::Extent(iplt::Size(image_height_,image_width_)),iplt::REAL,iplt::SPATIAL); - iplt::RealSpatialImageState* is = dynamic_cast<iplt::RealSpatialImageState*>(ih.ImageStatePtr().get()); + img::ImageHandle ih=CreateImage(img::Extent(img::Size(image_height_,image_width_)),img::REAL,img::SPATIAL); + img::RealSpatialImageState* is = dynamic_cast<img::RealSpatialImageState*>(ih.ImageStatePtr().get()); if(!is) { throw IOException("I/O Dm3: unexpected failure in dynamic_cast in check_image"); @@ -583,14 +583,14 @@ void DM3Collector::parse_tag_type_array_struct(int depth, const String& name, Ta } // ns detail -void MapIODm3Handler::Import(iplt::MapHandle& mh, const bf::path& loc,const ImageFormatBase& formatstruct) +void MapIODm3Handler::Import(img::MapHandle& mh, const bf::path& loc,const ImageFormatBase& formatstruct) { detail::DM3Collector collector; collector.ParseFile(loc); mh=collector.RetrieveImage(); } -void MapIODm3Handler::Import(iplt::MapHandle& mh, std::istream& is,const ImageFormatBase& formatstruct) +void MapIODm3Handler::Import(img::MapHandle& mh, std::istream& is,const ImageFormatBase& formatstruct) { DM3 form; DM3& formatdat = form; @@ -605,12 +605,12 @@ void MapIODm3Handler::Import(iplt::MapHandle& mh, std::istream& is,const ImageFo mh=collector.RetrieveImage(); } -void MapIODm3Handler::Export(const iplt::MapHandle& sh, const bf::path& loc, const ImageFormatBase& formatstruct) const +void MapIODm3Handler::Export(const img::MapHandle& sh, const bf::path& loc, const ImageFormatBase& formatstruct) const { throw IOException("This file format is not supported for export"); } -void MapIODm3Handler::Export(const iplt::MapHandle& sh, std::ostream& loc, const ImageFormatBase& formatstruct) const +void MapIODm3Handler::Export(const img::MapHandle& sh, std::ostream& loc, const ImageFormatBase& formatstruct) const { throw IOException("This file format is not supported for export"); } diff --git a/modules/io/src/iplt/map_io_dm3_handler.hh b/modules/io/src/img/map_io_dm3_handler.hh similarity index 79% rename from modules/io/src/iplt/map_io_dm3_handler.hh rename to modules/io/src/img/map_io_dm3_handler.hh index 5d6752931..e0bedce17 100644 --- a/modules/io/src/iplt/map_io_dm3_handler.hh +++ b/modules/io/src/img/map_io_dm3_handler.hh @@ -42,10 +42,10 @@ class DLLEXPORT_OST_IO MapIODm3Handler: public MapIOHandler /// \brief Map IO handler to read/write Spider map files /// /// This map IO handler reads and writes Spider formatted map files. - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); - virtual void Import(iplt::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); + virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); diff --git a/modules/io/src/iplt/map_io_dx_handler.cc b/modules/io/src/img/map_io_dx_handler.cc similarity index 91% rename from modules/io/src/iplt/map_io_dx_handler.cc rename to modules/io/src/img/map_io_dx_handler.cc index d83ad07da..4d5b50c48 100644 --- a/modules/io/src/iplt/map_io_dx_handler.cc +++ b/modules/io/src/img/map_io_dx_handler.cc @@ -31,9 +31,9 @@ #include <boost/algorithm/string/trim.hpp> #include <boost/algorithm/string/split.hpp> #include <boost/format.hpp> -#include <ost/iplt/alg/normalizer_factory.hh> +#include <ost/img/alg/normalizer_factory.hh> #include <ost/io/io_exception.hh> -#include <ost/iplt/map.hh> +#include <ost/img/map.hh> #include "map_io_dx_handler.hh" @@ -61,7 +61,7 @@ void DX::SetNormalizeOnSave(bool normalize_on_save) normalize_on_save_ = normalize_on_save; } -void MapIODxHandler::Import(iplt::MapHandle& mh, const bf::path& loc,const ImageFormatBase& form) +void MapIODxHandler::Import(img::MapHandle& mh, const bf::path& loc,const ImageFormatBase& form) { boost::filesystem::ifstream infile(loc); if(!infile) @@ -73,7 +73,7 @@ void MapIODxHandler::Import(iplt::MapHandle& mh, const bf::path& loc,const Image infile.close(); } -void MapIODxHandler::Import(iplt::MapHandle& mh, std::istream& infile, const ImageFormatBase& formatstruct) +void MapIODxHandler::Import(img::MapHandle& mh, std::istream& infile, const ImageFormatBase& formatstruct) { DX form; DX& formatdx = form; @@ -88,7 +88,7 @@ void MapIODxHandler::Import(iplt::MapHandle& mh, std::istream& infile, const Ima Real x_orig=0, y_orig=0, z_orig=0; Real u_spacing=0, v_spacing=0, w_spacing=0; int num_gridpoints; - iplt::MapHandle mh2; + img::MapHandle mh2; std::vector<String> tokens; while (std::getline(infile,line)) { // read gridpoints line @@ -159,7 +159,7 @@ void MapIODxHandler::Import(iplt::MapHandle& mh, std::istream& infile, const Ima } // create map handle if(u_spacing != 0 && v_spacing != 0 && w_spacing != 0) { - mh2 = CreateMap(iplt::Size(u_size,v_size,w_size)); + mh2 = CreateMap(img::Size(u_size,v_size,w_size)); mh2.SetAbsoluteOrigin(geom::Vec3(x_orig, y_orig, z_orig)); mh2.SetSpatialSampling(geom::Vec3(u_spacing,v_spacing,w_spacing)); } @@ -191,7 +191,7 @@ void MapIODxHandler::Import(iplt::MapHandle& mh, std::istream& infile, const Ima format fmer = format("Bad value line: Can't convert grid point value '%s' to Real constant.") % line; throw IOException(fmer.str()); } - mh2.SetReal(iplt::Point(((i+j)/(v_size*w_size))%u_size,((i+j)/w_size)%v_size, (i+j)%w_size), value); + mh2.SetReal(img::Point(((i+j)/(v_size*w_size))%u_size,((i+j)/w_size)%v_size, (i+j)%w_size), value); } } } @@ -199,7 +199,7 @@ void MapIODxHandler::Import(iplt::MapHandle& mh, std::istream& infile, const Ima mh.Swap(mh2); } -void MapIODxHandler::Export(const iplt::MapHandle& mh2, +void MapIODxHandler::Export(const img::MapHandle& mh2, const bf::path& loc,const ImageFormatBase& formatstruct) const { boost::filesystem::ofstream outfile(loc); @@ -210,7 +210,7 @@ void MapIODxHandler::Export(const iplt::MapHandle& mh2, this->Export(mh2,outfile,formatstruct); } -void MapIODxHandler::Export(const iplt::MapHandle& mh2, +void MapIODxHandler::Export(const img::MapHandle& mh2, std::ostream& outfile,const ImageFormatBase& formatstruct) const { DX form; @@ -227,7 +227,7 @@ void MapIODxHandler::Export(const iplt::MapHandle& mh2, int num_gridpoints = u_size*v_size*w_size; outstring << "# Data created by OpenStructure" << std::endl; outstring << "object 1 class gridpositions counts " << u_size << " " << v_size << " " << w_size << std::endl; - geom::Vec3 ori=mh2.IndexToCoord(iplt::Point(0,0,0)); + geom::Vec3 ori=mh2.IndexToCoord(img::Point(0,0,0)); geom::Vec3 spa=mh2.GetSpatialSampling(); outstring << format("origin %.6e %.6e %.6e") % ori[0] % ori[1] % ori[2] << std::endl; outstring << format("delta %.6e 0.000000e+00 0.000000e+00") % spa[0] << std::endl; @@ -236,15 +236,15 @@ void MapIODxHandler::Export(const iplt::MapHandle& mh2, outstring << "object 2 class gridconnections counts " << u_size << " " << v_size << " " << w_size << std::endl; outstring << "object 3 class array type Real rank 0 items " << num_gridpoints << " data follows" << std::endl; - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if (formatdx.GetNormalizeOnSave() == true) { - norm = iplt::alg::CreateLinearRangeNormalizer(mh2,formatdx.GetMinimum(),formatdx.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(mh2,formatdx.GetMinimum(),formatdx.GetMaximum()); } for(int i=0; i<num_gridpoints; i+=3) { for(int j=0; j<3; j++) { // three values per line if((i+j)<num_gridpoints) { - outstring << format("%.6e ") % norm.Convert(mh2.GetReal(iplt::Point(((i+j)/(v_size*w_size))%u_size,((i+j)/w_size)%v_size, (i+j)%w_size))); + outstring << format("%.6e ") % norm.Convert(mh2.GetReal(img::Point(((i+j)/(v_size*w_size))%u_size,((i+j)/w_size)%v_size, (i+j)%w_size))); } } outstring << std::endl; diff --git a/modules/io/src/iplt/map_io_dx_handler.hh b/modules/io/src/img/map_io_dx_handler.hh similarity index 90% rename from modules/io/src/iplt/map_io_dx_handler.hh rename to modules/io/src/img/map_io_dx_handler.hh index da220a99b..ead4ea87b 100644 --- a/modules/io/src/iplt/map_io_dx_handler.hh +++ b/modules/io/src/img/map_io_dx_handler.hh @@ -51,12 +51,12 @@ class DLLEXPORT_OST_IO MapIODxHandler: public MapIOHandler /// grid spacing (in x,y,z) grid origin (in x,y,z) and the actual values for /// each grid point. The other lines are ignored. Thus, when writing the /// grid to a file, not exactly the same file is produced. - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc, + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct); - virtual void Import(iplt::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, + virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, + virtual void Export(const img::MapHandle& sh, std::ostream& loc, const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); diff --git a/modules/io/src/iplt/map_io_handler.hh b/modules/io/src/img/map_io_handler.hh similarity index 80% rename from modules/io/src/iplt/map_io_handler.hh rename to modules/io/src/img/map_io_handler.hh index 4bb58c3bc..d90bf353e 100644 --- a/modules/io/src/iplt/map_io_handler.hh +++ b/modules/io/src/img/map_io_handler.hh @@ -23,19 +23,19 @@ #include <boost/shared_ptr.hpp> #include <boost/filesystem/operations.hpp> #include <ost/io/module_config.hh> -#include <ost/iplt/map.hh> -#include <ost/iplt/alg/normalizer.hh> -#include <ost/io/iplt/image_format.hh> +#include <ost/img/map.hh> +#include <ost/img/alg/normalizer.hh> +#include <ost/io/img/image_format.hh> namespace ost { namespace io { class DLLEXPORT_OST_IO MapIOHandler { public: virtual ~MapIOHandler() {}; - virtual void Import(iplt::MapHandle& surf, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) = 0; - virtual void Import(iplt::MapHandle& surf, std::istream& stream,const ImageFormatBase& formatstruct) = 0; - virtual void Export(const iplt::MapHandle& ent, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const = 0; - virtual void Export(const iplt::MapHandle& ent, std::ostream& stream,const ImageFormatBase& formatstruct) const = 0; + virtual void Import(img::MapHandle& surf, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) = 0; + virtual void Import(img::MapHandle& surf, std::istream& stream,const ImageFormatBase& formatstruct) = 0; + virtual void Export(const img::MapHandle& ent, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const = 0; + virtual void Export(const img::MapHandle& ent, std::ostream& stream,const ImageFormatBase& formatstruct) const = 0; }; typedef boost::shared_ptr<MapIOHandler> MapIOHandlerPtr; diff --git a/modules/io/src/iplt/map_io_jpk_handler.cc b/modules/io/src/img/map_io_jpk_handler.cc similarity index 87% rename from modules/io/src/iplt/map_io_jpk_handler.cc rename to modules/io/src/img/map_io_jpk_handler.cc index 2e805f62b..8bf3b2bf0 100644 --- a/modules/io/src/iplt/map_io_jpk_handler.cc +++ b/modules/io/src/img/map_io_jpk_handler.cc @@ -21,11 +21,11 @@ #include <limits> #include <string> #include <ost/units.hh> -#include <ost/iplt/alg/transform.hh> +#include <ost/img/alg/transform.hh> #include <ost/units.hh> -#include <ost/iplt/alg/transform.hh> -#include <ost/iplt/image_handle.hh> -#include <ost/iplt/progress.hh> +#include <ost/img/alg/transform.hh> +#include <ost/img/image_handle.hh> +#include <ost/img/progress.hh> #include <ost/geom/vec3.hh> #include <ost/geom/mat4.hh> #include <ost/log.hh> @@ -47,7 +47,7 @@ String JPK::FORMAT_STRING = "defined_jpk"; {} -void MapIOJpkHandler::Import(iplt::ImageHandle& image, const boost::filesystem::path& location, const ImageFormatBase& formatstruct) +void MapIOJpkHandler::Import(img::ImageHandle& image, const boost::filesystem::path& location, const ImageFormatBase& formatstruct) { JPK form; @@ -130,21 +130,21 @@ void MapIOJpkHandler::Import(iplt::ImageHandle& image, const boost::filesystem:: if(TIFFGetField(tfile,jpk_tags::GRID_REFLECT,&dummy,&reflect)){ if(reflect){ int maxsize=std::max<int>(image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[1]); - iplt::ImageHandle tmp=CreateImage(iplt::Extent(iplt::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + img::ImageHandle tmp=CreateImage(img::Extent(img::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); tmp.Paste(image); - tmp.ApplyIP(iplt::alg::Transform(iplt::alg::Transformation(geom::Mat4(1,0,0,0, + tmp.ApplyIP(img::alg::Transform(img::alg::Transformation(geom::Mat4(1,0,0,0, 0,-1,0,image.GetExtent().GetSize()[0]-1, 0,0,1,0, 0,0,0,1)))); - image.Reset(iplt::Extent(iplt::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + image.Reset(img::Extent(img::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); image.Paste(tmp); } } TIFFClose(tfile); } -void MapIOJpkHandler::Import(iplt::MapHandle& image, std::istream& loc,const ImageFormatBase& formatstruct) +void MapIOJpkHandler::Import(img::MapHandle& image, std::istream& loc,const ImageFormatBase& formatstruct) { JPK form; JPK& formatjpk = form; @@ -225,21 +225,21 @@ void MapIOJpkHandler::Import(iplt::MapHandle& image, std::istream& loc,const Ima if(TIFFGetField(tfile,jpk_tags::GRID_REFLECT,&dummy,&reflect)){ if(reflect){ int maxsize=std::max<int>(image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[1]); - iplt::ImageHandle tmp=iplt::CreateImage(iplt::Extent(iplt::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + img::ImageHandle tmp=img::CreateImage(img::Extent(img::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); tmp.Paste(image); - tmp.ApplyIP(iplt::alg::Transform(iplt::alg::Transformation(geom::Mat4(1,0,0,0, + tmp.ApplyIP(img::alg::Transform(img::alg::Transformation(geom::Mat4(1,0,0,0, 0,-1,0,image.GetExtent().GetSize()[0]-1, 0,0,1,0, 0,0,0,1)))); - image.Reset(iplt::Extent(iplt::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + image.Reset(img::Extent(img::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); image.Paste(tmp); } } TIFFClose(tfile); } -void MapIOJpkHandler::Export(const iplt::MapHandle& image , const boost::filesystem::path& location,const ImageFormatBase& formatstruct) const +void MapIOJpkHandler::Export(const img::MapHandle& image , const boost::filesystem::path& location,const ImageFormatBase& formatstruct) const { const String& filename = location.string(); TIFF* tfile=TIFFOpen(filename.c_str(),"w"); @@ -258,7 +258,7 @@ void MapIOJpkHandler::Export(const iplt::MapHandle& image , const boost::filesys do_export(image,tfile,formattif); } -void MapIOJpkHandler::Export(const iplt::MapHandle& image, std::ostream& loc,const ImageFormatBase& formatstruct) const +void MapIOJpkHandler::Export(const img::MapHandle& image, std::ostream& loc,const ImageFormatBase& formatstruct) const { const String& filename = "stream"; TIFF* tfile=TIFFClientOpen(filename.c_str(), diff --git a/modules/io/src/iplt/map_io_jpk_handler.hh b/modules/io/src/img/map_io_jpk_handler.hh similarity index 81% rename from modules/io/src/iplt/map_io_jpk_handler.hh rename to modules/io/src/img/map_io_jpk_handler.hh index 599beb2fe..8cb5bfbce 100644 --- a/modules/io/src/iplt/map_io_jpk_handler.hh +++ b/modules/io/src/img/map_io_jpk_handler.hh @@ -40,10 +40,10 @@ class DLLEXPORT_OST_IO MapIOJpkHandler: public MapIOTiffHandler /// /// This map IO handler reads Jpk formatted map files, as /// generated by the software released together with hardware from JPK - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); - virtual void Import(iplt::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); - void Export(const iplt::MapHandle& image , const boost::filesystem::path& location,const ImageFormatBase& formatstruct) const; - void Export(const iplt::MapHandle& image, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); + virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); + void Export(const img::MapHandle& image , const boost::filesystem::path& location,const ImageFormatBase& formatstruct) const; + void Export(const img::MapHandle& image, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); diff --git a/modules/io/src/iplt/map_io_mrc_handler.cc b/modules/io/src/img/map_io_mrc_handler.cc similarity index 90% rename from modules/io/src/iplt/map_io_mrc_handler.cc rename to modules/io/src/img/map_io_mrc_handler.cc index 043cd0d46..4858491bd 100644 --- a/modules/io/src/iplt/map_io_mrc_handler.cc +++ b/modules/io/src/img/map_io_mrc_handler.cc @@ -67,13 +67,13 @@ u v w x . . . d*c*b*a b c d 3 #include <ost/log.hh> #include <ost/base.hh> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/alg/stat.hh> -#include <ost/iplt/alg/normalizer_factory.hh> +#include <ost/img/image_state.hh> +#include <ost/img/alg/stat.hh> +#include <ost/img/alg/normalizer_factory.hh> #include <ost/io/io_exception.hh> -#include <ost/iplt/util.hh> -#include <ost/iplt/progress.hh> -#include <ost/io/iplt/image_format.hh> +#include <ost/img/util.hh> +#include <ost/img/progress.hh> +#include <ost/io/img/image_format.hh> #include <ost/io/swap_util.hh> #include <ost/io/converting_streams.hh> @@ -152,7 +152,7 @@ public: label[i]=' '; } } - header_base(const iplt::ConstImageHandle& im): + header_base(const img::ConstImageHandle& im): nc(), nr(static_cast<int>(im.GetExtent().GetSize().GetHeight())), ns(static_cast<int>(im.GetExtent().GetSize().GetDepth())), @@ -174,7 +174,7 @@ public: nlabel(1), label() { - if(im.GetType()==iplt::REAL){ + if(im.GetType()==img::REAL){ nc=static_cast<int>(im.GetExtent().GetSize().GetWidth()); mode=2; x=im.GetExtent().GetSize().GetWidth()*im.GetSpatialSampling()[0]; @@ -187,7 +187,7 @@ public: y=1.0; z=1.0; } - ost::iplt::alg::Stat stat; + ost::img::alg::Stat stat; im.Apply(stat); amin=stat.GetMinimum(); amax=stat.GetMaximum(); @@ -271,7 +271,7 @@ public: yorigin(0.0) { } - mrc_header(const iplt::ConstImageHandle& im): + mrc_header(const img::ConstImageHandle& im): header_base(im), xorigin(0.0), // todo determine origin yorigin(0.0) @@ -361,7 +361,7 @@ public: arms() { } - ccp4_header(const iplt::ConstImageHandle& im): + ccp4_header(const img::ConstImageHandle& im): header_base(im), lskflag(), skwmat(), @@ -491,12 +491,12 @@ BinaryOStream<CONVERSIONTYPE>& operator<< (BinaryOStream<CONVERSIONTYPE>& out, c return out; } -using namespace ost::iplt; +using namespace ost::img; using namespace ost; template <typename B,int CONVERSIONTYPE> -void real_filler(iplt::image_state::RealSpatialImageState& isi, +void real_filler(img::image_state::RealSpatialImageState& isi, BinaryIStream<CONVERSIONTYPE>& f, const header_base& header) { @@ -504,9 +504,9 @@ void real_filler(iplt::image_state::RealSpatialImageState& isi, int mapr=header.mapr-1; int maps=header.maps-1; - iplt::Point pnt; - char this_dummy; //create dummy variable to give to iplt::Progress as this - iplt::Progress::Instance().Register(&this_dummy,header.ns*header.nr,100); + img::Point pnt; + char this_dummy; //create dummy variable to give to img::Progress as this + img::Progress::Instance().Register(&this_dummy,header.ns*header.nr,100); for(int is=0;is<header.ns;++is) { pnt[maps]=header.nsstart+is; for(int ir=0;ir<header.nr;++ir) { @@ -517,14 +517,14 @@ void real_filler(iplt::image_state::RealSpatialImageState& isi, f >> tmp; isi.Value(pnt) = static_cast<Real>(tmp); } - iplt::Progress::Instance().AdvanceProgress(&this_dummy); + img::Progress::Instance().AdvanceProgress(&this_dummy); } } - iplt::Progress::Instance().DeRegister(&this_dummy); + img::Progress::Instance().DeRegister(&this_dummy); } template <typename B,int CONVERSIONTYPE> -void complex_filler(iplt::image_state::ComplexHalfFrequencyImageState& isi, +void complex_filler(img::image_state::ComplexHalfFrequencyImageState& isi, BinaryIStream<CONVERSIONTYPE> & fhandle, header_base& header) { @@ -612,12 +612,12 @@ void real_dumper(BinaryOStream<CONVERSIONTYPE>& f, header_base& header, const Co int mapr=header.mapr-1; int maps=header.maps-1; - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if (formatmrc.GetNormalizeOnSave() == true) { - norm = iplt::alg::CreateLinearRangeNormalizer(image,formatmrc.GetMinimum(),formatmrc.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(image,formatmrc.GetMinimum(),formatmrc.GetMaximum()); } - iplt::Point pnt; + img::Point pnt; char this_dummy; //create dummy variable to give to Progress as this Progress::Instance().Register(&this_dummy,header.ns*header.nr,100); Point start=image.GetExtent().GetStart(); @@ -644,9 +644,9 @@ void complex_dumper(BinaryOStream<CONVERSIONTYPE>& f, int mapr=header.mapr-1; int maps=header.maps-1; - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if (formatmrc.GetNormalizeOnSave() == true) { - norm = iplt::alg::CreateLinearRangeNormalizer(image,formatmrc.GetMinimum(),formatmrc.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(image,formatmrc.GetMinimum(),formatmrc.GetMaximum()); } image_state::ComplexHalfFrequencyImageState *isc=dynamic_cast<image_state::ComplexHalfFrequencyImageState*>(image.ImageStatePtr().get()); @@ -655,7 +655,7 @@ void complex_dumper(BinaryOStream<CONVERSIONTYPE>& f, } char this_dummy; //create dummy variable to give to Progress as this Progress::Instance().Register(&this_dummy,header.ns*header.nr,100); - iplt::Point pnt; + img::Point pnt; for(int ss=0;ss<header.ns;++ss) { pnt[maps]=ss; // first half @@ -664,7 +664,7 @@ void complex_dumper(BinaryOStream<CONVERSIONTYPE>& f, pnt[mapr]=header.nr/2-sr; for(int sc=0;sc<header.nc-1;++sc) { pnt[mapc]=-sc; - iplt::Complex val = conj(norm.Convert(isc->Value(pnt))); + img::Complex val = conj(norm.Convert(isc->Value(pnt))); f << static_cast<B>(val.real()) << static_cast<B>(val.imag()); LOG_DEBUG(" " << pnt << " " << val << std::endl); } @@ -677,12 +677,12 @@ void complex_dumper(BinaryOStream<CONVERSIONTYPE>& f, int sc=0; for(;sc<header.nc-1;++sc) { pnt[mapc]=sc; - iplt::Complex val =norm.Convert(isc->Value(pnt)); + img::Complex val =norm.Convert(isc->Value(pnt)); f << static_cast<B>(val.real()) << static_cast<B>(val.imag()); LOG_DEBUG(" " << pnt << " " << val << std::endl); } pnt[mapc]=sc; - iplt::Complex val = norm.Convert(conj(isc->Value(pnt))); + img::Complex val = norm.Convert(conj(isc->Value(pnt))); f << static_cast<B>(val.real()) << static_cast<B>(val.imag()); LOG_DEBUG(" " << pnt << " " << val << std::endl); Progress::Instance().AdvanceProgress(&this_dummy); @@ -692,7 +692,7 @@ void complex_dumper(BinaryOStream<CONVERSIONTYPE>& f, } template<class HEADER,int CONVERSIONTYPE> -void import_helper(iplt::MapHandle& image, std::istream& in, const MRC& formatmrc) +void import_helper(img::MapHandle& image, std::istream& in, const MRC& formatmrc) { BinaryIStream<CONVERSIONTYPE> f(in); HEADER header; @@ -704,8 +704,8 @@ void import_helper(iplt::MapHandle& image, std::istream& in, const MRC& formatmr } if(header.mode==3 || header.mode==4) { // always assume half-complex mode - image.Reset(iplt::Size((header.nx-1)*2,header.ny,header.nz),iplt::COMPLEX,iplt::HALF_FREQUENCY); - if(iplt::image_state::ComplexHalfFrequencyImageState *cs=dynamic_cast<iplt::image_state::ComplexHalfFrequencyImageState*>(image.ImageStatePtr().get())) { + image.Reset(img::Size((header.nx-1)*2,header.ny,header.nz),img::COMPLEX,img::HALF_FREQUENCY); + if(img::image_state::ComplexHalfFrequencyImageState *cs=dynamic_cast<img::image_state::ComplexHalfFrequencyImageState*>(image.ImageStatePtr().get())) { if (header.mode==3) { detail::complex_filler<ushort,CONVERSIONTYPE>(*cs,f,header); } else if(header.mode==4) { @@ -715,15 +715,15 @@ void import_helper(iplt::MapHandle& image, std::istream& in, const MRC& formatmr throw IOException("internal error in MRC io: expected ComplexHalfFrequencyImageState"); } } else if (header.mode>=0 && header.mode<=2) { - iplt::Size msize; + img::Size msize; msize[header.mapc-1]=header.nc; msize[header.mapr-1]=header.nr; msize[header.maps-1]=header.ns; - iplt::Point mstart; + img::Point mstart; mstart[header.mapc-1]=header.ncstart; mstart[header.mapr-1]=header.nrstart; mstart[header.maps-1]=header.nsstart; - image.Reset(iplt::Extent(mstart,msize),iplt::REAL,iplt::SPATIAL); + image.Reset(img::Extent(mstart,msize),img::REAL,img::SPATIAL); if(header.x>0.0 && header.y >0.0 && header.z > 0){ image.SetSpatialSampling(geom::Vec3(static_cast<Real>(header.x)/static_cast<Real>(header.nx), static_cast<Real>(header.y)/static_cast<Real>(header.ny), @@ -732,8 +732,8 @@ void import_helper(iplt::MapHandle& image, std::istream& in, const MRC& formatmr LOG_MESSAGE("Suspicious dell dimensions found. Cannot set sampling."); } LOG_MESSAGE("resulting image extent: " << image.GetExtent() << std::endl); - image.Reset(iplt::Extent(mstart,msize),iplt::REAL,iplt::SPATIAL); - if(iplt::image_state::RealSpatialImageState *rs=dynamic_cast<iplt::image_state::RealSpatialImageState*>(image.ImageStatePtr().get())) { + image.Reset(img::Extent(mstart,msize),img::REAL,img::SPATIAL); + if(img::image_state::RealSpatialImageState *rs=dynamic_cast<img::image_state::RealSpatialImageState*>(image.ImageStatePtr().get())) { if(header.mode==0) { detail::real_filler<uchar,CONVERSIONTYPE>(*rs,f,header); } else if(header.mode==1) { @@ -753,7 +753,7 @@ void import_helper(iplt::MapHandle& image, std::istream& in, const MRC& formatmr } template<class HEADER> -void import_endianess_switcher(iplt::MapHandle& image, +void import_endianess_switcher(img::MapHandle& image, std::istream& f, const MRC& formatmrc) { @@ -771,7 +771,7 @@ void import_endianess_switcher(iplt::MapHandle& image, } template<class HEADER,int CONVERSIONTYPE> -void export_helper(const iplt::MapHandle& image, +void export_helper(const img::MapHandle& image, std::ostream& out, const MRC& formatmrc) { @@ -779,10 +779,10 @@ void export_helper(const iplt::MapHandle& image, HEADER header(image); f << header; - if(image.GetType()==iplt::REAL) { + if(image.GetType()==img::REAL) { detail::real_dumper<float,CONVERSIONTYPE>(f,header,image,formatmrc); } else { - if(image.GetDomain()==iplt::HALF_FREQUENCY){ + if(image.GetDomain()==img::HALF_FREQUENCY){ detail::complex_dumper<float,CONVERSIONTYPE>(f,header,image,formatmrc); } else { throw(IOException("MRC/CCP4 export: full complex export not supported.")); @@ -794,7 +794,7 @@ void export_helper(const iplt::MapHandle& image, } template<class HEADER> -void export_endianess_switcher(const iplt::MapHandle& image, +void export_endianess_switcher(const img::MapHandle& image, std::ostream& f, const MRC& formatmrc) { @@ -816,7 +816,7 @@ switch(formatmrc.GetEndianessOnSave()){ namespace bf = boost::filesystem; -void MapIOMrcHandler::Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) +void MapIOMrcHandler::Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) { boost::filesystem:: ifstream infile(loc, std::ios::binary); @@ -830,7 +830,7 @@ void MapIOMrcHandler::Import(iplt::MapHandle& sh, const boost::filesystem::path& infile.close(); } -void MapIOMrcHandler::Import(iplt::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct) +void MapIOMrcHandler::Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct) { MRC form; MRC& formatmrc = form; @@ -863,7 +863,7 @@ void MapIOMrcHandler::Import(iplt::MapHandle& sh, std::istream& loc, const Image } } -void MapIOMrcHandler::Export(const iplt::MapHandle& image, +void MapIOMrcHandler::Export(const img::MapHandle& image, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const { bf::ofstream outfile(loc, std::ios::binary); @@ -878,7 +878,7 @@ void MapIOMrcHandler::Export(const iplt::MapHandle& image, } -void MapIOMrcHandler::Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const +void MapIOMrcHandler::Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const { MRC form; MRC& formatmrc = form; diff --git a/modules/io/src/iplt/map_io_mrc_handler.hh b/modules/io/src/img/map_io_mrc_handler.hh similarity index 85% rename from modules/io/src/iplt/map_io_mrc_handler.hh rename to modules/io/src/img/map_io_mrc_handler.hh index 99033836c..32b28c3c5 100644 --- a/modules/io/src/iplt/map_io_mrc_handler.hh +++ b/modules/io/src/img/map_io_mrc_handler.hh @@ -68,10 +68,10 @@ public: /// /// This map IO handler reads and writes MRC formatted map files, as /// generated by the MRC electron crystallography processing package - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); - virtual void Import(iplt::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); + virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); diff --git a/modules/io/src/iplt/map_io_nanoscope_handler.cc b/modules/io/src/img/map_io_nanoscope_handler.cc similarity index 91% rename from modules/io/src/iplt/map_io_nanoscope_handler.cc rename to modules/io/src/img/map_io_nanoscope_handler.cc index 8d400437c..7288f703b 100644 --- a/modules/io/src/iplt/map_io_nanoscope_handler.cc +++ b/modules/io/src/img/map_io_nanoscope_handler.cc @@ -31,9 +31,9 @@ #include <boost/filesystem/fstream.hpp> #include <ost/base.hh> -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/image.hh> -#include <ost/iplt/progress.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/image.hh> +#include <ost/img/progress.hh> #include <ost/units.hh> #include <ost/log.hh> #include <ost/io/io_exception.hh> @@ -194,7 +194,7 @@ void print_header (const NHeader& header, int inum) } -void real_filler(iplt::ImageHandle& image, std::istream& ff, +void real_filler(img::ImageHandle& image, std::istream& ff, const NHeader& header) { ff.clear(); @@ -212,7 +212,7 @@ void real_filler(iplt::ImageHandle& image, std::istream& ff, } short* pdata = reinterpret_cast<short*>(&bdata[0]); for(uint col=0;col<header.px;++col) { - image.SetReal(iplt::Point(col,header.py-row-1),static_cast<Real>(pdata[col])); + image.SetReal(img::Point(col,header.py-row-1),static_cast<Real>(pdata[col])); } } @@ -242,7 +242,7 @@ bool MapIONanoscopeHandler::MatchSuffix(const String& suffix) return false; } -void MapIONanoscopeHandler::Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) +void MapIONanoscopeHandler::Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) { boost::filesystem::ifstream infile(loc, std::ios::binary); if(!infile) @@ -253,7 +253,7 @@ void MapIONanoscopeHandler::Import(iplt::MapHandle& sh, const boost::filesystem: infile.close(); } -void MapIONanoscopeHandler::Import(iplt::MapHandle& image, std::istream& ff, const ImageFormatBase& formatstruct) +void MapIONanoscopeHandler::Import(img::MapHandle& image, std::istream& ff, const ImageFormatBase& formatstruct) { Nanoscope form; Nanoscope& formatnanoscope = form; @@ -310,7 +310,7 @@ void MapIONanoscopeHandler::Import(iplt::MapHandle& image, std::istream& ff, con detail::print_header(header,inum); - image.Reset(iplt::Size(header.px,header.py), iplt::REAL, iplt::SPATIAL); + image.Reset(img::Size(header.px,header.py), img::REAL, img::SPATIAL); image.SetSpatialSampling(header.sampling*Units::nm); @@ -318,13 +318,13 @@ void MapIONanoscopeHandler::Import(iplt::MapHandle& image, std::istream& ff, con } -void MapIONanoscopeHandler::Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const +void MapIONanoscopeHandler::Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const { throw IOException("This format is not supported for Export"); } -void MapIONanoscopeHandler::Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const +void MapIONanoscopeHandler::Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const { throw IOException("This format is not supported for Export"); } diff --git a/modules/io/src/iplt/map_io_nanoscope_handler.hh b/modules/io/src/img/map_io_nanoscope_handler.hh similarity index 81% rename from modules/io/src/iplt/map_io_nanoscope_handler.hh rename to modules/io/src/img/map_io_nanoscope_handler.hh index 9957d9bc3..f6103066b 100644 --- a/modules/io/src/iplt/map_io_nanoscope_handler.hh +++ b/modules/io/src/img/map_io_nanoscope_handler.hh @@ -50,10 +50,10 @@ public: /// /// This map IO handler reads and writes MRC formatted map files, as /// generated by the MRC electron crystallography processing package - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); - virtual void Import(iplt::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); + virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); diff --git a/modules/io/src/iplt/map_io_png_handler.cc b/modules/io/src/img/map_io_png_handler.cc similarity index 80% rename from modules/io/src/iplt/map_io_png_handler.cc rename to modules/io/src/img/map_io_png_handler.cc index a7ad659db..f11e472b3 100644 --- a/modules/io/src/iplt/map_io_png_handler.cc +++ b/modules/io/src/img/map_io_png_handler.cc @@ -31,11 +31,11 @@ #include <boost/filesystem/fstream.hpp> -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/raster_image/raster_image.hh> -#include <ost/iplt/image.hh> -#include <ost/iplt/progress.hh> -#include <ost/iplt/alg/normalizer_factory.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/raster_image/raster_image.hh> +#include <ost/img/image.hh> +#include <ost/img/progress.hh> +#include <ost/img/alg/normalizer_factory.hh> #include <ost/io/io_exception.hh> #include "map_io_png_handler.hh" @@ -83,7 +83,7 @@ void user_flush_data(png_structp pngPtr) { } // ns -void MapIOPngHandler::Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) +void MapIOPngHandler::Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ) { boost::filesystem::ifstream infile(loc, std::ios::binary); if(!infile) @@ -95,7 +95,7 @@ void MapIOPngHandler::Import(iplt::MapHandle& sh, const boost::filesystem::path& } -void MapIOPngHandler::Import(iplt::MapHandle& image, std::istream& f,const ImageFormatBase& formatstruct) +void MapIOPngHandler::Import(img::MapHandle& image, std::istream& f,const ImageFormatBase& formatstruct) { png_structp png_ptr; png_infop info_ptr; @@ -157,26 +157,26 @@ void MapIOPngHandler::Import(iplt::MapHandle& image, std::istream& f,const Image png_data= (png_byte *)malloc(width*height*sizeof(png_byte)); // default origin is top-left - image.Reset(iplt::Extent(iplt::Point(0,0),iplt::Size(width,height)), iplt::REAL, iplt::SPATIAL); - iplt::image_state::RealSpatialImageState *isr=dynamic_cast<iplt::image_state::RealSpatialImageState*>(image.ImageStatePtr().get());; + image.Reset(img::Extent(img::Point(0,0),img::Size(width,height)), img::REAL, img::SPATIAL); + img::image_state::RealSpatialImageState *isr=dynamic_cast<img::image_state::RealSpatialImageState*>(image.ImageStatePtr().get());; row_pointers = png_get_rows(png_ptr, info_ptr); - iplt::Progress::Instance().Register(this,height,100); + img::Progress::Instance().Register(this,height,100); for(row=0;row<height;row++) { for(column=0;column<width;column++) { - isr->Value(iplt::Index(column,row,0))=((Real)(row_pointers[row])[column*channels]); + isr->Value(img::Index(column,row,0))=((Real)(row_pointers[row])[column*channels]); } - iplt::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().AdvanceProgress(this); } - iplt::Progress::Instance().DeRegister(this); + img::Progress::Instance().DeRegister(this); free(png_data); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); } -void MapIOPngHandler::Export(const iplt::MapHandle& image, +void MapIOPngHandler::Export(const img::MapHandle& image, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const { boost::filesystem::ofstream outfile(loc, std::ios::binary); @@ -190,7 +190,7 @@ void MapIOPngHandler::Export(const iplt::MapHandle& image, } -void MapIOPngHandler::Export(const iplt::MapHandle& image, std::ostream& f,const ImageFormatBase& formatstruct) const +void MapIOPngHandler::Export(const img::MapHandle& image, std::ostream& f,const ImageFormatBase& formatstruct) const { png_structp png_ptr; png_infop info_ptr; @@ -204,12 +204,12 @@ void MapIOPngHandler::Export(const iplt::MapHandle& image, std::ostream& f,const assert (formatstruct.GetFormatString()==UndefinedImageFormat::FORMAT_STRING); } - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if (formatpng.GetNormalizeOnSave() == true) { - norm = iplt::alg::CreateLinearRangeNormalizer(image,formatpng.GetMinimum(),formatpng.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(image,formatpng.GetMinimum(),formatpng.GetMaximum()); } - iplt::Size size=image.GetSize(); + img::Size size=image.GetSize(); png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); @@ -230,7 +230,7 @@ void MapIOPngHandler::Export(const iplt::MapHandle& image, std::ostream& f,const png_set_write_fn(png_ptr,&f,detail::user_write_data,detail::user_flush_data); - int png_color_type = (image.GetType()==iplt::COMPLEX) ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_GRAY; + int png_color_type = (image.GetType()==img::COMPLEX) ? PNG_COLOR_TYPE_RGB : PNG_COLOR_TYPE_GRAY; unsigned int bpp = 8; png_set_IHDR(png_ptr, info_ptr, size.GetWidth(), size.GetHeight(), bpp, @@ -242,34 +242,34 @@ void MapIOPngHandler::Export(const iplt::MapHandle& image, std::ostream& f,const png_bytep* row_pointers = new png_bytep[size.GetHeight()]; - if(image.GetType()==iplt::COMPLEX) { + if(image.GetType()==img::COMPLEX) { uint width=size.GetWidth(); uint height=size.GetHeight(); - iplt::RasterImage ri(width,height); - ri.Fill(image, 0, image.GetExtent().GetStart().ToVec3(), 0,norm.GetImplementation(), iplt::RasterImage::PHASECOLOR); + img::RasterImage ri(width,height); + ri.Fill(image, 0, image.GetExtent().GetStart().ToVec3(), 0,norm.GetImplementation(), img::RasterImage::PHASECOLOR); png_byte* png_data = (png_byte *) ri.GetDataPtr(); - iplt::Progress::Instance().Register(this,height+1,100); + img::Progress::Instance().Register(this,height+1,100); for(uint i=0;i<height;i++){ row_pointers[i]=&png_data[i*3*width]; - iplt::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().AdvanceProgress(this); } png_write_image(png_ptr, row_pointers); - iplt::Progress::Instance().AdvanceProgress(this); - iplt::Progress::Instance().DeRegister(this); + img::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().DeRegister(this); } else { png_byte* png_data = new png_byte[size.GetSlab()]; int byte_val; - iplt::Point start=image.GetExtent().GetStart(); + img::Point start=image.GetExtent().GetStart(); uint height=size.GetHeight(); uint width=size.GetWidth(); for(uint j=0;j<height;j++) { for(uint i=0;i<width;i++) { - iplt::Point loc=iplt::Point(i,j)+start; + img::Point loc=img::Point(i,j)+start; byte_val = static_cast<int>(norm.Convert(image.GetReal(loc))); byte_val = (byte_val<0) ? 0 : byte_val; byte_val = (byte_val>255) ? 255 : byte_val; diff --git a/modules/io/src/iplt/map_io_png_handler.hh b/modules/io/src/img/map_io_png_handler.hh similarity index 81% rename from modules/io/src/iplt/map_io_png_handler.hh rename to modules/io/src/img/map_io_png_handler.hh index b3e842700..94f79fe9a 100644 --- a/modules/io/src/iplt/map_io_png_handler.hh +++ b/modules/io/src/img/map_io_png_handler.hh @@ -47,10 +47,10 @@ public: /// /// This map IO handler reads and writes MRC formatted map files, as /// generated by the MRC electron crystallography processing package - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); - virtual void Import(iplt::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); + virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); diff --git a/modules/io/src/iplt/map_io_situs_handler.cc b/modules/io/src/img/map_io_situs_handler.cc similarity index 81% rename from modules/io/src/iplt/map_io_situs_handler.cc rename to modules/io/src/img/map_io_situs_handler.cc index 5288f136e..33a0391fa 100644 --- a/modules/io/src/iplt/map_io_situs_handler.cc +++ b/modules/io/src/img/map_io_situs_handler.cc @@ -31,9 +31,9 @@ #include <boost/format.hpp> #include <boost/algorithm/string.hpp> #include <ost/io/swap_util.hh> -#include <ost/iplt/alg/normalizer_factory.hh> +#include <ost/img/alg/normalizer_factory.hh> #include <ost/io/io_exception.hh> -#include <ost/iplt/progress.hh> +#include <ost/img/progress.hh> #include "map_io_situs_handler.hh" @@ -72,7 +72,7 @@ struct situs_header { unsigned extx,exty,extz; }; -void prep_header(situs_header& header, const iplt::Size& size, const geom::Vec3& pixel_sampling, const geom::Vec3& start_coord) +void prep_header(situs_header& header, const img::Size& size, const geom::Vec3& pixel_sampling, const geom::Vec3& start_coord) { header.dwidth=pixel_sampling[0]; header.extx=size[0]; @@ -118,29 +118,29 @@ void header_dumper(std::ostream& f, const situs_header& header) f << "\n"; } -void real_filler(std::istream& f, const situs_header& header, iplt::ImageHandle& mh,Real scale) +void real_filler(std::istream& f, const situs_header& header, img::ImageHandle& mh,Real scale) { Real raw; - iplt::Point pnt; + img::Point pnt; char this_dummy; //create dummy variable to give to Progress as this - iplt::Progress::Instance().Register(&this_dummy,header.extx*header.exty*header.extz,100); - iplt::Size size = mh.GetSize(); + img::Progress::Instance().Register(&this_dummy,header.extx*header.exty*header.extz,100); + img::Size size = mh.GetSize(); for(uint z_i=0;z_i<size[3];++z_i) { for(uint y_i=0;y_i<size[2];++y_i) { for(uint x_i=0;x_i<size[1];++x_i) { f >> raw; - mh.SetReal(iplt::Point(x_i,y_i,z_i),raw); + mh.SetReal(img::Point(x_i,y_i,z_i),raw); } - iplt::Progress::Instance().AdvanceProgress(&this_dummy); + img::Progress::Instance().AdvanceProgress(&this_dummy); } } - iplt::Progress::Instance().DeRegister(&this_dummy); + img::Progress::Instance().DeRegister(&this_dummy); } -void real_dumper(std::ostream& f, const situs_header& header, const iplt::ImageHandle& mh, const iplt::alg::Normalizer& norm) +void real_dumper(std::ostream& f, const situs_header& header, const img::ImageHandle& mh, const img::alg::Normalizer& norm) { char this_dummy; //create dummy variable to give to Progress as this - iplt::Progress::Instance().Register(&this_dummy,header.extx*header.exty*header.extz,100); + img::Progress::Instance().Register(&this_dummy,header.extx*header.exty*header.extz,100); int counter=0; uint ext_z=header.extz; uint ext_y=header.exty; @@ -148,7 +148,7 @@ void real_dumper(std::ostream& f, const situs_header& header, const iplt::Image for(uint z_i=0;z_i<ext_z;++z_i) { for(uint y_i=0;y_i<ext_y;++y_i) { for(uint x_i=0;x_i<ext_x;++x_i) { - Real raw=norm.Convert(mh.GetReal(iplt::Point(x_i,y_i,z_i))); + Real raw=norm.Convert(mh.GetReal(img::Point(x_i,y_i,z_i))); f << " " << format("%10f") % raw << " "; ++counter; if (counter == 10) { @@ -156,18 +156,18 @@ void real_dumper(std::ostream& f, const situs_header& header, const iplt::Image counter=0; } } - iplt::Progress::Instance().AdvanceProgress(&this_dummy); + img::Progress::Instance().AdvanceProgress(&this_dummy); } } f << "\n"; - iplt::Progress::Instance().DeRegister(&this_dummy); + img::Progress::Instance().DeRegister(&this_dummy); } } // detail -void MapIOSitusHandler::Import(iplt::MapHandle& mh, const bf::path& loc,const ImageFormatBase& formatstruct) +void MapIOSitusHandler::Import(img::MapHandle& mh, const bf::path& loc,const ImageFormatBase& formatstruct) { boost::filesystem::ifstream infile(loc); if(!infile) @@ -179,7 +179,7 @@ void MapIOSitusHandler::Import(iplt::MapHandle& mh, const bf::path& loc,const Im infile.close(); } -void MapIOSitusHandler::Import(iplt::MapHandle& mh, std::istream& infile,const ImageFormatBase& formatstruct) +void MapIOSitusHandler::Import(img::MapHandle& mh, std::istream& infile,const ImageFormatBase& formatstruct) { Situs form; Situs& formatsitus = form; @@ -193,7 +193,7 @@ void MapIOSitusHandler::Import(iplt::MapHandle& mh, std::istream& infile,const I detail::header_filler(infile,header); detail::print_header(header); - iplt::Size msize; + img::Size msize; msize[0]=header.extx; msize[1]=header.exty; msize[2]=header.extz; @@ -215,7 +215,7 @@ void MapIOSitusHandler::Import(iplt::MapHandle& mh, std::istream& infile,const I } -void MapIOSitusHandler::Export(const iplt::MapHandle& mh2, +void MapIOSitusHandler::Export(const img::MapHandle& mh2, const bf::path& loc,const ImageFormatBase& formatstruct) const { boost::filesystem::ofstream outfile(loc); @@ -229,7 +229,7 @@ void MapIOSitusHandler::Export(const iplt::MapHandle& mh2, } -void MapIOSitusHandler::Export(const iplt::MapHandle& mh2, +void MapIOSitusHandler::Export(const img::MapHandle& mh2, std::ostream& outfile,const ImageFormatBase& formatstruct) const { Situs form; @@ -240,9 +240,9 @@ void MapIOSitusHandler::Export(const iplt::MapHandle& mh2, assert (formatstruct.GetFormatString()==UndefinedImageFormat::FORMAT_STRING); } - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if (formatsitus.GetNormalizeOnSave() == true) { - norm = iplt::alg::CreateLinearRangeNormalizer(mh2,formatsitus.GetMinimum(),formatsitus.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(mh2,formatsitus.GetMinimum(),formatsitus.GetMaximum()); } detail::situs_header header; diff --git a/modules/io/src/iplt/map_io_situs_handler.hh b/modules/io/src/img/map_io_situs_handler.hh similarity index 81% rename from modules/io/src/iplt/map_io_situs_handler.hh rename to modules/io/src/img/map_io_situs_handler.hh index 3162bedda..877741a0d 100644 --- a/modules/io/src/iplt/map_io_situs_handler.hh +++ b/modules/io/src/img/map_io_situs_handler.hh @@ -46,10 +46,10 @@ class DLLEXPORT_OST_IO MapIOSitusHandler: public MapIOHandler /// /// This map IO handler reads and writes Situs formatted map files, as /// generated by Situs multi-resolution fitting program. - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); - virtual void Import(iplt::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); + virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); diff --git a/modules/io/src/iplt/map_io_spi_handler.cc b/modules/io/src/img/map_io_spi_handler.cc similarity index 90% rename from modules/io/src/iplt/map_io_spi_handler.cc rename to modules/io/src/img/map_io_spi_handler.cc index ad1251762..7be3859b5 100644 --- a/modules/io/src/iplt/map_io_spi_handler.cc +++ b/modules/io/src/img/map_io_spi_handler.cc @@ -31,13 +31,13 @@ #include <boost/filesystem/fstream.hpp> #include <boost/scoped_array.hpp> #include <boost/format.hpp> -#include <ost/iplt/progress.hh> -#include <ost/iplt/alg/normalizer_factory.hh> +#include <ost/img/progress.hh> +#include <ost/img/alg/normalizer_factory.hh> #include <ost/log.hh> #include <ost/io/converting_streams.hh> #include <ost/io/io_exception.hh> #include <ost/io/swap_util.hh> -#include <ost/iplt/alg/stat.hh> +#include <ost/img/alg/stat.hh> #include "map_io_spi_handler.hh" @@ -134,7 +134,7 @@ struct spider_header { char szITit[160]; // array dimensioned 160, title }; -void prep_header(spider_header& header, const iplt::Size& size, const geom::Vec3& spacing, float min, float max, float mean, float std_dev) +void prep_header(spider_header& header, const img::Size& size, const geom::Vec3& spacing, float min, float max, float mean, float std_dev) { if (spacing[0] != spacing[1] || spacing[1] != spacing[2] || @@ -152,7 +152,7 @@ void prep_header(spider_header& header, const iplt::Size& size, const geom::Vec3 ost::String date_for_header=time_string.substr(8,2) + "-" + time_string.substr(4,3) + "-" + time_string.substr(22,4) + " "; ost::String time_for_header=time_string.substr(11,8); - ost::String title_for_header = "Generated by OST (www.iplt.org)"; + ost::String title_for_header = "Generated by OST (www.img.org)"; header.fNslice = nslice; header.fNrow = nrow; @@ -299,7 +299,7 @@ void header_dumper(std::ostream& f, const spider_header& header,bool swap_flag) } template <int CONVERSIONTYPE,typename B> -void real_filler(std::istream& in, const spider_header& header, iplt::ImageHandle& mh,double scale) +void real_filler(std::istream& in, const spider_header& header, img::ImageHandle& mh,double scale) { BinaryIStream<CONVERSIONTYPE> f(in); @@ -308,7 +308,7 @@ void real_filler(std::istream& in, const spider_header& header, iplt::ImageHandl f.seekg(size,std::ios::beg); // move position of original stream to beginning of data char this_dummy; //create dummy variable to give to Progress as this - iplt::Progress::Instance().Register(&this_dummy,static_cast<int>(header.fNslice*header.fNrow),100); + img::Progress::Instance().Register(&this_dummy,static_cast<int>(header.fNslice*header.fNrow),100); for(int w=0;w<static_cast<int>(header.fNslice);++w) { int rawp_index=0; @@ -317,31 +317,31 @@ void real_filler(std::istream& in, const spider_header& header, iplt::ImageHandl for(int u=0;u<static_cast<int>(header.fNcol);++u) { float buffer; f >> buffer; - mh.SetReal(iplt::Point(u,v,w),static_cast<double>(buffer)); + mh.SetReal(img::Point(u,v,w),static_cast<double>(buffer)); ++rawp_index; } - iplt::Progress::Instance().AdvanceProgress(&this_dummy); + img::Progress::Instance().AdvanceProgress(&this_dummy); } } - iplt:: Progress::Instance().DeRegister(&this_dummy); + img:: Progress::Instance().DeRegister(&this_dummy); } template <typename B > -void real_dumper(std::ostream& f, const spider_header& header, const iplt::ImageHandle& mh,const iplt::alg::Normalizer& norm, bool swap_flag) +void real_dumper(std::ostream& f, const spider_header& header, const img::ImageHandle& mh,const img::alg::Normalizer& norm, bool swap_flag) { int slice_size=static_cast<int>(header.fNcol) * static_cast<int>(header.fNrow); boost::scoped_array<B> rawp(new B[slice_size]); char this_dummy; //create dummy variable to give to Progress as this - iplt::Progress::Instance().Register(&this_dummy,static_cast<int>(header.fNslice*header.fNrow),100); + img::Progress::Instance().Register(&this_dummy,static_cast<int>(header.fNslice*header.fNrow),100); for(int w=0;w< static_cast<int>(header.fNslice);++w) { int rawp_index=0; for(int v=0;v< static_cast<int>(header.fNrow);++v) { for(int u=0;u< static_cast<int>(header.fNcol);++u) { - rawp[rawp_index]=static_cast<B>(norm.Convert(mh.GetReal(mh.GetSpatialOrigin() + iplt::Point(u,v,w))));; + rawp[rawp_index]=static_cast<B>(norm.Convert(mh.GetReal(mh.GetSpatialOrigin() + img::Point(u,v,w))));; ++rawp_index; } - iplt::Progress::Instance().AdvanceProgress(&this_dummy); + img::Progress::Instance().AdvanceProgress(&this_dummy); } if(swap_flag) { @@ -350,16 +350,16 @@ void real_dumper(std::ostream& f, const spider_header& header, const iplt::Imag f.write(reinterpret_cast<char*>(&rawp[0]),sizeof(B)*slice_size); } - iplt::Progress::Instance().DeRegister(&this_dummy); + img::Progress::Instance().DeRegister(&this_dummy); } template<int CONVERSIONTYPE> -void ExportSpiderHelper(const iplt::MapHandle& mh2, std::ostream& outfile,const Spider& formatspider) +void ExportSpiderHelper(const img::MapHandle& mh2, std::ostream& outfile,const Spider& formatspider) { bool swap_flag=false; - iplt::alg::Stat stat; + img::alg::Stat stat; mh2.Apply(stat); if (CONVERSIONTYPE==OST_BIG_ENDIAN && OST_LOCAL_ENDIAN==OST_LITTLE_ENDIAN) { @@ -378,9 +378,9 @@ void ExportSpiderHelper(const iplt::MapHandle& mh2, std::ostream& outfile,const detail::print_header(header); - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if (formatspider.GetNormalizeOnSave() == true) { - norm = iplt::alg::CreateLinearRangeNormalizer(mh2,formatspider.GetMinimum(),formatspider.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(mh2,formatspider.GetMinimum(),formatspider.GetMaximum()); } detail::real_dumper<float>(outfile,header,mh2,norm,swap_flag); @@ -388,7 +388,7 @@ void ExportSpiderHelper(const iplt::MapHandle& mh2, std::ostream& outfile,const } // ns detail -void MapIOSpiHandler::Import(iplt::MapHandle& mh, const bf::path& loc,const ImageFormatBase& formatstruct) +void MapIOSpiHandler::Import(img::MapHandle& mh, const bf::path& loc,const ImageFormatBase& formatstruct) { bf::ifstream infile(loc, std::ios::binary); if(!infile) @@ -399,7 +399,7 @@ void MapIOSpiHandler::Import(iplt::MapHandle& mh, const bf::path& loc,const Imag infile.close(); } -void MapIOSpiHandler::Import(iplt::MapHandle& mh, std::istream& infile,const ImageFormatBase& formatstruct) +void MapIOSpiHandler::Import(img::MapHandle& mh, std::istream& infile,const ImageFormatBase& formatstruct) { Spider form; Spider& formatspider = form; @@ -425,7 +425,7 @@ void MapIOSpiHandler::Import(iplt::MapHandle& mh, std::istream& infile,const Ima detail::print_header(header); - iplt::Size msize; + img::Size msize; msize[0]=static_cast<unsigned int>(header.fNcol); msize[1]=static_cast<unsigned int>(header.fNrow); msize[2]=static_cast<unsigned int>(header.fNslice); @@ -462,7 +462,7 @@ void MapIOSpiHandler::Import(iplt::MapHandle& mh, std::istream& infile,const Ima } -void MapIOSpiHandler::Export(const iplt::MapHandle& mh2, +void MapIOSpiHandler::Export(const img::MapHandle& mh2, const bf::path& loc,const ImageFormatBase& formatstruct) const { bf::ofstream outfile(loc, std::ios::binary); @@ -474,7 +474,7 @@ void MapIOSpiHandler::Export(const iplt::MapHandle& mh2, outfile.close(); } -void MapIOSpiHandler::Export(const iplt::MapHandle& mh2, +void MapIOSpiHandler::Export(const img::MapHandle& mh2, std::ostream& outfile,const ImageFormatBase& formatstruct) const { Spider form; diff --git a/modules/io/src/iplt/map_io_spi_handler.hh b/modules/io/src/img/map_io_spi_handler.hh similarity index 79% rename from modules/io/src/iplt/map_io_spi_handler.hh rename to modules/io/src/img/map_io_spi_handler.hh index d3ef36e7f..6d93c0475 100644 --- a/modules/io/src/iplt/map_io_spi_handler.hh +++ b/modules/io/src/img/map_io_spi_handler.hh @@ -56,15 +56,15 @@ class DLLEXPORT_OST_IO MapIOSpiHandler: public MapIOHandler /// \brief Map IO handler to read/write Spider map files /// /// This map IO handler reads and writes Spider formatted map files. - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); - virtual void Import(iplt::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); + virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); protected: - void do_import(iplt::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); + void do_import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); }; typedef MapIOHandlerFactory<MapIOSpiHandler> MapIOSpiHandlerFactory; diff --git a/modules/io/src/iplt/map_io_tiff_handler.cc b/modules/io/src/img/map_io_tiff_handler.cc similarity index 70% rename from modules/io/src/iplt/map_io_tiff_handler.cc rename to modules/io/src/img/map_io_tiff_handler.cc index 745b12473..b2a5d4f9e 100644 --- a/modules/io/src/iplt/map_io_tiff_handler.cc +++ b/modules/io/src/img/map_io_tiff_handler.cc @@ -31,11 +31,11 @@ #include <boost/function.hpp> #include <boost/bind.hpp> -#include <ost/iplt/image_state.hh> -#include <ost/iplt/progress.hh> +#include <ost/img/image_state.hh> +#include <ost/img/progress.hh> #include <ost/units.hh> -#include <ost/iplt/normalizer_impl.hh> -#include <ost/iplt/alg/transform.hh> +#include <ost/img/normalizer_impl.hh> +#include <ost/img/alg/transform.hh> #include <ost/log.hh> #include <ost/io/io_exception.hh> @@ -123,7 +123,7 @@ void TIF::SetSubimage (int subimage) subimage_ = subimage; } -void MapIOTiffHandler::Import(iplt::MapHandle& image, const boost::filesystem::path& location,const ImageFormatBase& formatstruct) +void MapIOTiffHandler::Import(img::MapHandle& image, const boost::filesystem::path& location,const ImageFormatBase& formatstruct) { TIF form; TIF& formattif = form; @@ -140,7 +140,7 @@ void MapIOTiffHandler::Import(iplt::MapHandle& image, const boost::filesystem::p TIFFClose(tfile); } -void MapIOTiffHandler::Import(iplt::ImageHandle& image, std::istream& location, const ImageFormatBase& formatstruct) +void MapIOTiffHandler::Import(img::ImageHandle& image, std::istream& location, const ImageFormatBase& formatstruct) { TIF form; TIF& formattif = form; @@ -157,7 +157,7 @@ void MapIOTiffHandler::Import(iplt::ImageHandle& image, std::istream& location, TIFFClose(tfile); } -void MapIOTiffHandler::Export(const iplt::MapHandle& image , const boost::filesystem::path& location,const ImageFormatBase& formatstruct) const +void MapIOTiffHandler::Export(const img::MapHandle& image , const boost::filesystem::path& location,const ImageFormatBase& formatstruct) const { const String& filename = location.string(); TIFF* tfile=TIFFOpen(filename.c_str(),"w"); @@ -175,7 +175,7 @@ void MapIOTiffHandler::Export(const iplt::MapHandle& image , const boost::filesy do_export(image,tfile,formattif); } -void MapIOTiffHandler::Export(const iplt::MapHandle& image, std::ostream& loc,const ImageFormatBase& formatstruct) const +void MapIOTiffHandler::Export(const img::MapHandle& image, std::ostream& loc,const ImageFormatBase& formatstruct) const { const String& filename = "stream"; TIFF* tfile=TIFFClientOpen(filename.c_str(), @@ -203,21 +203,21 @@ void MapIOTiffHandler::Export(const iplt::MapHandle& image, std::ostream& loc,co do_export(image,tfile,formattif); } -void MapIOTiffHandler::do_export(const iplt::MapHandle& image,TIFF* tfile,TIF& formattif) const +void MapIOTiffHandler::do_export(const img::MapHandle& image,TIFF* tfile,TIF& formattif) const { if (image.IsFrequency()==true) { formattif.SetSigned(true); } - iplt::alg::Normalizer norm = iplt::alg::CreateNoOpNormalizer(); + img::alg::Normalizer norm = img::alg::CreateNoOpNormalizer(); if(boost::logic::indeterminate(formattif.GetNormalizeOnSave())){ switch(formattif.GetBitDepth()){ case OST_BIT8_FORMAT: case OST_BIT16_FORMAT: case OST_BIT32_FORMAT: case OST_DEFAULT_FORMAT: - norm = iplt::alg::CreateLinearRangeNormalizer(image,formattif.GetMinimum(),formattif.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(image,formattif.GetMinimum(),formattif.GetMaximum()); LOGN_VERBOSE("Autodetecting normalization for export: normalization on"); break; case OST_FLOAT_FORMAT: @@ -227,27 +227,27 @@ void MapIOTiffHandler::do_export(const iplt::MapHandle& image,TIFF* tfile,TIF& f } } else if (formattif.GetNormalizeOnSave() == true) { LOGN_VERBOSE("Normalization used for export."); - norm = iplt::alg::CreateLinearRangeNormalizer(image,formattif.GetMinimum(),formattif.GetMaximum()); + norm = img::alg::CreateLinearRangeNormalizer(image,formattif.GetMinimum(),formattif.GetMaximum()); } else { LOGN_VERBOSE("No normalization used for export."); } detail::tiff_warning_handler_wrapper twhw; - iplt::image_state::RealSpatialImageState *isr = NULL ; - iplt::image_state::ComplexSpatialImageState *isc = NULL; - iplt::image_state::WordSpatialImageState *isw = NULL; + img::image_state::RealSpatialImageState *isr = NULL ; + img::image_state::ComplexSpatialImageState *isc = NULL; + img::image_state::WordSpatialImageState *isw = NULL; - boost::function<void (TIFF *,iplt::image_state::RealSpatialImageState*,uint32_t,uint32_t,uint32_t,uint32_t,const iplt::NormalizerPtr& )> fsr; - boost::function<void (TIFF *,iplt::image_state::ComplexSpatialImageState*,uint32_t,uint32_t,uint32_t,uint32_t,const iplt::NormalizerPtr&)> fsc; - boost::function<void (TIFF *,iplt::image_state::WordSpatialImageState*,uint32_t,uint32_t,uint32_t,uint32_t,const iplt::NormalizerPtr&)> fsw; + boost::function<void (TIFF *,img::image_state::RealSpatialImageState*,uint32_t,uint32_t,uint32_t,uint32_t,const img::NormalizerPtr& )> fsr; + boost::function<void (TIFF *,img::image_state::ComplexSpatialImageState*,uint32_t,uint32_t,uint32_t,uint32_t,const img::NormalizerPtr&)> fsc; + boost::function<void (TIFF *,img::image_state::WordSpatialImageState*,uint32_t,uint32_t,uint32_t,uint32_t,const img::NormalizerPtr&)> fsw; uint32_t width=image.GetSize().GetWidth(); uint32_t height=image.GetSize().GetHeight(); uint16 spp=1; uint16 fmt =0; uint16 bpp =0 ; - iplt::Point ori=image.GetSpatialOrigin(); + img::Point ori=image.GetSpatialOrigin(); geom::Vec3 sampling=image.GetPixelSampling(); float xreso=sampling[0]/Units::cm,yreso=sampling[1]/Units::cm; float xpos=xreso*ori[0],ypos=yreso*ori[1]; @@ -261,42 +261,42 @@ void MapIOTiffHandler::do_export(const iplt::MapHandle& image,TIFF* tfile,TIF& f TIFFSetField(tfile,TIFFTAG_YRESOLUTION,yreso); TIFFSetField(tfile,TIFFTAG_PLANARCONFIG,1); TIFFSetField(tfile,TIFFTAG_ORIENTATION,ORIENTATION_TOPLEFT); - if(image.GetDomain()!=iplt::SPATIAL){ + if(image.GetDomain()!=img::SPATIAL){ throw IOException("Frequency export not implemented."); } - if(image.GetType()==iplt::REAL) { - isr= dynamic_cast<iplt::image_state::RealSpatialImageState*>(image.ImageStatePtr().get()); + if(image.GetType()==img::REAL) { + isr= dynamic_cast<img::image_state::RealSpatialImageState*>(image.ImageStatePtr().get()); if(formattif.GetSigned()){ // signed switch(formattif.GetBitDepth()){ case OST_BIT8_FORMAT: fmt=SAMPLEFORMAT_INT; bpp=8; - fsr=detail::do_tiff_write<Real,int8,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,int8,img::image_state::RealSpatialImageState>; break; case OST_BIT16_FORMAT: fmt=SAMPLEFORMAT_INT; bpp=16; - fsr=detail::do_tiff_write<Real,int16,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,int16,img::image_state::RealSpatialImageState>; break; case OST_BIT32_FORMAT: fmt=SAMPLEFORMAT_INT; bpp=32; - fsr=detail::do_tiff_write<Real,int32_t,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,int32_t,img::image_state::RealSpatialImageState>; break; case OST_FLOAT_FORMAT: fmt=SAMPLEFORMAT_IEEEFP; bpp=32; - fsr=detail::do_tiff_write<Real,float,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,float,img::image_state::RealSpatialImageState>; break; case OST_DOUBLE_FORMAT: fmt=SAMPLEFORMAT_IEEEFP; bpp=64; - fsr=detail::do_tiff_write<Real,Real,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,Real,img::image_state::RealSpatialImageState>; break; case OST_DEFAULT_FORMAT: fmt=SAMPLEFORMAT_INT; bpp=16; - fsr=detail::do_tiff_write<Real,int16,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,int16,img::image_state::RealSpatialImageState>; break; } }else{ // unsigned @@ -304,72 +304,72 @@ void MapIOTiffHandler::do_export(const iplt::MapHandle& image,TIFF* tfile,TIF& f case OST_BIT8_FORMAT: fmt=SAMPLEFORMAT_UINT; bpp=8; - fsr=detail::do_tiff_write<Real,uint8,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,uint8,img::image_state::RealSpatialImageState>; break; case OST_BIT16_FORMAT: fmt=SAMPLEFORMAT_UINT; bpp=16; - fsr=detail::do_tiff_write<Real,uint16,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,uint16,img::image_state::RealSpatialImageState>; break; case OST_BIT32_FORMAT: fmt=SAMPLEFORMAT_UINT; bpp=32; - fsr=detail::do_tiff_write<Real,uint32_t,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,uint32_t,img::image_state::RealSpatialImageState>; break; case OST_FLOAT_FORMAT: fmt=SAMPLEFORMAT_IEEEFP; bpp=32; - fsr=detail::do_tiff_write<Real,float,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,float,img::image_state::RealSpatialImageState>; break; case OST_DOUBLE_FORMAT: fmt=SAMPLEFORMAT_IEEEFP; bpp=64; - fsr=detail::do_tiff_write<Real,Real,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,Real,img::image_state::RealSpatialImageState>; break; case OST_DEFAULT_FORMAT: fmt=SAMPLEFORMAT_UINT; bpp=16; - fsr=detail::do_tiff_write<Real,uint16,iplt::image_state::RealSpatialImageState>; + fsr=detail::do_tiff_write<Real,uint16,img::image_state::RealSpatialImageState>; break; } } - } else if(image.GetType()==iplt::COMPLEX) { - isc= dynamic_cast<iplt::image_state::ComplexSpatialImageState*>(image.ImageStatePtr().get()); + } else if(image.GetType()==img::COMPLEX) { + isc= dynamic_cast<img::image_state::ComplexSpatialImageState*>(image.ImageStatePtr().get()); switch(formattif.GetBitDepth()){ case OST_BIT8_FORMAT: fmt=SAMPLEFORMAT_COMPLEXINT; bpp=16; - fsc=detail::do_tiff_write<iplt::Complex,std::complex<int8>,iplt::image_state::ComplexSpatialImageState>; + fsc=detail::do_tiff_write<img::Complex,std::complex<int8>,img::image_state::ComplexSpatialImageState>; break; case OST_BIT16_FORMAT: fmt=SAMPLEFORMAT_COMPLEXINT; bpp=32; - fsc=detail::do_tiff_write<iplt::Complex,std::complex<int16>,iplt::image_state::ComplexSpatialImageState>; + fsc=detail::do_tiff_write<img::Complex,std::complex<int16>,img::image_state::ComplexSpatialImageState>; break; case OST_BIT32_FORMAT: fmt=SAMPLEFORMAT_COMPLEXINT; bpp=64; - fsc=detail::do_tiff_write<iplt::Complex,std::complex<int32_t>,iplt::image_state::ComplexSpatialImageState>; + fsc=detail::do_tiff_write<img::Complex,std::complex<int32_t>,img::image_state::ComplexSpatialImageState>; break; case OST_FLOAT_FORMAT: fmt=SAMPLEFORMAT_COMPLEXIEEEFP; bpp=64; - fsc=detail::do_tiff_write<iplt::Complex,std::complex<float>,iplt::image_state::ComplexSpatialImageState>; + fsc=detail::do_tiff_write<img::Complex,std::complex<float>,img::image_state::ComplexSpatialImageState>; break; case OST_DOUBLE_FORMAT: fmt=SAMPLEFORMAT_COMPLEXIEEEFP; bpp=128; - fsc=detail::do_tiff_write<iplt::Complex,iplt::Complex,iplt::image_state::ComplexSpatialImageState>; + fsc=detail::do_tiff_write<img::Complex,img::Complex,img::image_state::ComplexSpatialImageState>; break; case OST_DEFAULT_FORMAT: fmt=SAMPLEFORMAT_COMPLEXIEEEFP; bpp=128; - fsc=detail::do_tiff_write<iplt::Complex,iplt::Complex,iplt::image_state::ComplexSpatialImageState>; + fsc=detail::do_tiff_write<img::Complex,img::Complex,img::image_state::ComplexSpatialImageState>; break; } - } else if(image.GetType()==iplt::WORD) { - isw= dynamic_cast<iplt::image_state::WordSpatialImageState*>(image.ImageStatePtr().get()); - fsw=detail::do_tiff_write<uint,uint,iplt::image_state::WordSpatialImageState>; + } else if(image.GetType()==img::WORD) { + isw= dynamic_cast<img::image_state::WordSpatialImageState*>(image.ImageStatePtr().get()); + fsw=detail::do_tiff_write<uint,uint,img::image_state::WordSpatialImageState>; fmt=SAMPLEFORMAT_UINT; bpp=16; } @@ -379,29 +379,29 @@ void MapIOTiffHandler::do_export(const iplt::MapHandle& image,TIFF* tfile,TIF& f TIFFSetField(tfile,TIFFTAG_ROWSPERSTRIP,rowsperstrip); TIFFSetField(tfile,TIFFTAG_SAMPLEFORMAT,fmt); unsigned int stripcount=static_cast<int>(ceil( height/static_cast<Real>(rowsperstrip))); - iplt::Progress::Instance().Register(this,stripcount,100); + img::Progress::Instance().Register(this,stripcount,100); - if(image.GetType()==iplt::REAL) { + if(image.GetType()==img::REAL) { for(unsigned int strip=0;strip<stripcount;++strip) { fsr(tfile,isr,rowsperstrip,width,height,strip,norm.GetImplementation()); - iplt::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().AdvanceProgress(this); } - } else if(image.GetType()==iplt::COMPLEX) { + } else if(image.GetType()==img::COMPLEX) { for(unsigned int strip=0;strip<stripcount;++strip) { fsc(tfile,isc,rowsperstrip,width,height,strip,norm.GetImplementation()); - iplt::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().AdvanceProgress(this); } - } else if(image.GetType()==iplt::WORD) { + } else if(image.GetType()==img::WORD) { for(unsigned int strip=0;strip<stripcount;++strip) { fsw(tfile,isw,rowsperstrip,width,height,strip,norm.GetImplementation()); - iplt::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().AdvanceProgress(this); } } - iplt::Progress::Instance().DeRegister(this); + img::Progress::Instance().DeRegister(this); TIFFClose(tfile); } @@ -486,7 +486,7 @@ TIFF* MapIOTiffHandler::open_subimage_stream(std::istream& location,const TIF& f return tfile; } -void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, const TIF& formattif) +void MapIOTiffHandler::load_image_data(TIFF* tfile, img::ImageHandle& image, const TIF& formattif) { uint32_t width,height,rps; uint16 bpp,spp,plc,ori,reso=RESUNIT_NONE,fmt=SAMPLEFORMAT_UINT; @@ -509,7 +509,7 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c LOG_MESSAGE ("I/O Tiff: Header: " << width << "x" << height << " " << bpp << "bpp" << std::endl); - iplt::Extent image_extent(iplt::Point(0,0),iplt::Size(width,height)); + img::Extent image_extent(img::Point(0,0),img::Size(width,height)); if(!TIFFGetField(tfile,TIFFTAG_RESOLUTIONUNIT,&reso)){ reso=RESUNIT_NONE; @@ -566,12 +566,12 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c LOG_MESSAGE("I/O Tiff: " << "allocating " << stripsize << " bytes for temporary read buffer" << std::endl); buf = _TIFFmalloc(stripsize); - if(image.GetType()==iplt::WORD) { + if(image.GetType()==img::WORD) { LOG_MESSAGE("I/O Tiff: " << "reseting target image to WORD " << image_extent << std::endl); - image.Reset(image_extent, iplt::WORD, iplt::SPATIAL); + image.Reset(image_extent, img::WORD, img::SPATIAL); - iplt::image_state::WordSpatialImageState *is = - dynamic_cast<iplt::image_state::WordSpatialImageState*>(image.ImageStatePtr().get()); + img::image_state::WordSpatialImageState *is = + dynamic_cast<img::image_state::WordSpatialImageState*>(image.ImageStatePtr().get()); if(!is) { throw IOException("unexpected failure of dynamic_cast in tiff io"); } @@ -579,24 +579,24 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c int current_row = 0; LOG_VERBOSE("I/O Tiff: " << "importing data" << std::endl); - iplt::Progress::Instance().Register(this,stripcount,100); + img::Progress::Instance().Register(this,stripcount,100); for (strip = 0; strip < stripcount; ++strip) { int cread=TIFFReadEncodedStrip(tfile, strip, buf, (tsize_t) -1); if(bpp==8) { int rowcount = cread/(width*spp); - detail::do_tiff_read<uchar,short,iplt::image_state::WordSpatialImageState>(buf,rowcount,width,is,current_row,spp); + detail::do_tiff_read<uchar,short,img::image_state::WordSpatialImageState>(buf,rowcount,width,is,current_row,spp); } else if(bpp==16) { uint rowcount = cread/(width*2*spp); - detail::do_tiff_read<uint16,short,iplt::image_state::WordSpatialImageState>(buf,rowcount,width,is,current_row,spp); + detail::do_tiff_read<uint16,short,img::image_state::WordSpatialImageState>(buf,rowcount,width,is,current_row,spp); } else if(bpp==32) { uint rowcount = cread/(width*4*spp); - detail::do_tiff_read<uint32_t,short,iplt::image_state::WordSpatialImageState>(buf,rowcount,width,is,current_row,spp); + detail::do_tiff_read<uint32_t,short,img::image_state::WordSpatialImageState>(buf,rowcount,width,is,current_row,spp); } - iplt::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().AdvanceProgress(this); } LOG_VERBOSE("I/O Tiff: " << "done" << std::endl); - iplt::Progress::Instance().DeRegister(this); + img::Progress::Instance().DeRegister(this); uint16 photometric; if(TIFFGetField(tfile,TIFFTAG_PHOTOMETRIC,&photometric)){ if(photometric==PHOTOMETRIC_PALETTE ){ @@ -611,20 +611,20 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c } } } else { - iplt::image_state::RealSpatialImageState *isr=0; - iplt::image_state::ComplexSpatialImageState *isc=0; + img::image_state::RealSpatialImageState *isr=0; + img::image_state::ComplexSpatialImageState *isc=0; if(fmt==SAMPLEFORMAT_COMPLEXINT || fmt==SAMPLEFORMAT_COMPLEXIEEEFP){ LOG_MESSAGE("I/O Tiff: " << "reseting target image to complex spatial " << image_extent << std::endl); - image.Reset(image_extent,iplt::COMPLEX,iplt::SPATIAL); - isc = dynamic_cast<iplt::image_state::ComplexSpatialImageState*>(image.ImageStatePtr().get()); + image.Reset(image_extent,img::COMPLEX,img::SPATIAL); + isc = dynamic_cast<img::image_state::ComplexSpatialImageState*>(image.ImageStatePtr().get()); if(!isc) { throw IOException("unexpected failure of dynamic_cast in tiff io"); } }else{ - LOG_MESSAGE("I/O Tiff: " << "reseting target image to Real iplt::SPATIAL" << image_extent << std::endl); - image.Reset(image_extent, iplt::REAL, iplt::SPATIAL); + LOG_MESSAGE("I/O Tiff: " << "reseting target image to Real img::SPATIAL" << image_extent << std::endl); + image.Reset(image_extent, img::REAL, img::SPATIAL); - isr= dynamic_cast<iplt::image_state::RealSpatialImageState*>(image.ImageStatePtr().get()); + isr= dynamic_cast<img::image_state::RealSpatialImageState*>(image.ImageStatePtr().get()); if(!isr) { throw IOException("unexpected failure of dynamic_cast in tiff io"); } @@ -634,16 +634,16 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c int current_row = 0; LOG_VERBOSE("I/O Tiff: " << "importing data" << std::endl); - iplt::Progress::Instance().Register(this,stripcount,100); + img::Progress::Instance().Register(this,stripcount,100); for (strip = 0; strip < stripcount; ++strip) { int cread=TIFFReadEncodedStrip(tfile, strip, buf, (tsize_t) -1); if(bpp==8) { int rowcount = cread/(width*spp); if(fmt==SAMPLEFORMAT_INT){ - detail::do_tiff_read<int8,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<int8,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else if(fmt==SAMPLEFORMAT_UINT){ - detail::do_tiff_read<uint8,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<uint8,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else{ std::ostringstream ostrs; ostrs << "TIFF images with "<<bpp << " bits per pixel and sample format "<< fmt<< " are not supported."; @@ -652,11 +652,11 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c } else if(bpp==16) { uint rowcount = cread/(width*2*spp); if(fmt==SAMPLEFORMAT_INT){ - detail::do_tiff_read<int16,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<int16,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else if(fmt==SAMPLEFORMAT_UINT){ - detail::do_tiff_read<uint16,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<uint16,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else if(fmt==SAMPLEFORMAT_COMPLEXINT){ - detail::do_tiff_read<detail::complexint8,iplt::Complex,iplt::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); + detail::do_tiff_read<detail::complexint8,img::Complex,img::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); }else{ std::ostringstream ostrs; ostrs << "TIFF images with "<<bpp << " bits per pixel and sample format "<< fmt<< " are not supported."; @@ -665,13 +665,13 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c } else if(bpp==32) { uint rowcount = cread/(width*4*spp); if(fmt==SAMPLEFORMAT_INT){ - detail::do_tiff_read<int32_t,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<int32_t,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else if(fmt==SAMPLEFORMAT_UINT){ - detail::do_tiff_read<uint32_t,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<uint32_t,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else if(fmt==SAMPLEFORMAT_IEEEFP){ - detail::do_tiff_read<float,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<float,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else if(fmt==SAMPLEFORMAT_COMPLEXINT){ - detail::do_tiff_read<detail::complexint16,iplt::Complex,iplt::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); + detail::do_tiff_read<detail::complexint16,img::Complex,img::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); }else{ std::ostringstream ostrs; ostrs << "TIFF images with "<<bpp << " bits per pixel and sample format "<< fmt<< " are not supported."; @@ -680,11 +680,11 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c } else if(bpp==64) { uint rowcount = cread/(width*8*spp); if(fmt==SAMPLEFORMAT_IEEEFP){ - detail::do_tiff_read<Real,Real,iplt::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); + detail::do_tiff_read<Real,Real,img::image_state::RealSpatialImageState>(buf,rowcount,width,isr,current_row,spp); }else if(fmt==SAMPLEFORMAT_COMPLEXINT){ - detail::do_tiff_read<detail::complexint32_t,iplt::Complex,iplt::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); + detail::do_tiff_read<detail::complexint32_t,img::Complex,img::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); }else if(fmt==SAMPLEFORMAT_COMPLEXIEEEFP){ - detail::do_tiff_read<std::complex<float>,iplt::Complex,iplt::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); + detail::do_tiff_read<std::complex<float>,img::Complex,img::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); }else{ std::ostringstream ostrs; ostrs << "TIFF images with "<<bpp << " bits per pixel and sample format "<< fmt<< " are not supported."; @@ -694,21 +694,21 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c uint rowcount = cread/(width*16*spp); if(fmt==SAMPLEFORMAT_COMPLEXIEEEFP){ // std::complex<double> refers to the dataformat used in the tiff file and is independend of single/double precision compilation - detail::do_tiff_read<std::complex<double>,iplt::Complex,iplt::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); + detail::do_tiff_read<std::complex<double>,img::Complex,img::image_state::ComplexSpatialImageState>(buf,rowcount,width,isc,current_row,spp); }else{ std::ostringstream ostrs; ostrs << "TIFF images with "<<bpp << " bits per pixel and sample format "<< fmt<< " are not supported."; throw IOException(ostrs.str()); } } - iplt::Progress::Instance().AdvanceProgress(this); + img::Progress::Instance().AdvanceProgress(this); } LOG_VERBOSE("I/O Tiff: " << "done" << std::endl); - iplt::Progress::Instance().DeRegister(this); + img::Progress::Instance().DeRegister(this); uint16 photometric; if(TIFFGetField(tfile,TIFFTAG_PHOTOMETRIC,&photometric)){ - if(photometric==PHOTOMETRIC_PALETTE && image.GetType()==iplt::REAL){ + if(photometric==PHOTOMETRIC_PALETTE && image.GetType()==img::REAL){ uint16* lookuptable_red; uint16* lookuptable_green; uint16* lookuptable_blue; @@ -722,57 +722,57 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c } switch(ori){ case ORIENTATION_TOPRIGHT: - image.ApplyIP(iplt::alg::Mirror(iplt::Plane::YZ)); + image.ApplyIP(img::alg::Mirror(img::Plane::YZ)); break; case ORIENTATION_BOTRIGHT: - image.ApplyIP(iplt::alg::Transform(iplt::alg::Transformation(geom::Mat4(-1,0,0,image.GetExtent().GetSize()[0]-1, + image.ApplyIP(img::alg::Transform(img::alg::Transformation(geom::Mat4(-1,0,0,image.GetExtent().GetSize()[0]-1, 0,-1,0,image.GetExtent().GetSize()[1]-1, 0,0,1,0, 0,0,0,1)))); break; case ORIENTATION_BOTLEFT: - image.ApplyIP(iplt::alg::Mirror(iplt::Plane::XZ)); + image.ApplyIP(img::alg::Mirror(img::Plane::XZ)); break; case ORIENTATION_LEFTTOP:{ int maxsize=std::max<int>(image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[1]); - iplt::ImageHandle tmp=CreateImage(iplt::Extent(iplt::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + img::ImageHandle tmp=CreateImage(img::Extent(img::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); tmp.Paste(image); - tmp.ApplyIP(iplt::alg::Transform(iplt::alg::Transformation(geom::Mat4(0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,1)))); - image.Reset(iplt::Extent(iplt::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + tmp.ApplyIP(img::alg::Transform(img::alg::Transformation(geom::Mat4(0,1,0,0,1,0,0,0,0,0,1,0,0,0,0,1)))); + image.Reset(img::Extent(img::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); image.Paste(tmp); } break; case ORIENTATION_RIGHTTOP:{ int maxsize=std::max<int>(image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[1]); - iplt::ImageHandle tmp=CreateImage(iplt::Extent(iplt::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + img::ImageHandle tmp=CreateImage(img::Extent(img::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); tmp.Paste(image); - tmp.ApplyIP(iplt::alg::Transform(ost::iplt::alg::Transformation(geom::Mat4(0,-1,0,image.GetExtent().GetSize()[1]-1, + tmp.ApplyIP(img::alg::Transform(ost::img::alg::Transformation(geom::Mat4(0,-1,0,image.GetExtent().GetSize()[1]-1, 1,0,0,0, 0,0,1,0, 0,0,0,1)))); - image.Reset(iplt::Extent(iplt::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + image.Reset(img::Extent(img::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); image.Paste(tmp); } break; case ORIENTATION_RIGHTBOT:{ int maxsize=std::max<int>(image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[1]); - iplt::ImageHandle tmp=CreateImage(iplt::Extent(iplt::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + img::ImageHandle tmp=CreateImage(img::Extent(img::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); tmp.Paste(image); - tmp.ApplyIP(iplt::alg::Transform(iplt::alg::Transformation(geom::Mat4(0,-1,0,image.GetExtent().GetSize()[1]-1 ,-1,0,0,image.GetExtent().GetSize()[0]-1 ,0,0,1,0, 0,0,0,1)))); - image.Reset(iplt::Extent(iplt::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + tmp.ApplyIP(img::alg::Transform(img::alg::Transformation(geom::Mat4(0,-1,0,image.GetExtent().GetSize()[1]-1 ,-1,0,0,image.GetExtent().GetSize()[0]-1 ,0,0,1,0, 0,0,0,1)))); + image.Reset(img::Extent(img::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); image.Paste(tmp); } break; case ORIENTATION_LEFTBOT:{ int maxsize=std::max<int>(image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[1]); - iplt::ImageHandle tmp=CreateImage(iplt::Extent(iplt::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + img::ImageHandle tmp=CreateImage(img::Extent(img::Size(maxsize,maxsize,image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); tmp.Paste(image); - tmp.ApplyIP(iplt::alg::Transform(iplt::alg::Transformation(geom::Mat4(0,1,0,0, + tmp.ApplyIP(img::alg::Transform(img::alg::Transformation(geom::Mat4(0,1,0,0, -1,0,0,image.GetExtent().GetSize()[0]-1, 0,0,1,0, 0,0,0,1)))); - image.Reset(iplt::Extent(iplt::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); + image.Reset(img::Extent(img::Size(image.GetExtent().GetSize()[1],image.GetExtent().GetSize()[0],image.GetExtent().GetSize()[2])),image.GetType(),image.GetDomain()); image.Paste(tmp); } break; @@ -785,11 +785,11 @@ void MapIOTiffHandler::load_image_data(TIFF* tfile, iplt::ImageHandle& image, c break; case RESUNIT_INCH: image.SetPixelSampling(geom::Vec3(xreso*Units::in,yreso*Units::in,1)); - image.SetSpatialOrigin(iplt::Point(static_cast<int>(round(xpos/xreso)),static_cast<int>(round(ypos/yreso)),0)); + image.SetSpatialOrigin(img::Point(static_cast<int>(round(xpos/xreso)),static_cast<int>(round(ypos/yreso)),0)); break; case RESUNIT_CENTIMETER: image.SetPixelSampling(geom::Vec3(xreso*Units::cm,yreso*Units::cm,1)); - image.SetSpatialOrigin(iplt::Point(static_cast<int>(round(xpos/xreso)),static_cast<int>(round(ypos/yreso)),0)); + image.SetSpatialOrigin(img::Point(static_cast<int>(round(xpos/xreso)),static_cast<int>(round(ypos/yreso)),0)); break; } _TIFFfree(buf); diff --git a/modules/io/src/iplt/map_io_tiff_handler.hh b/modules/io/src/img/map_io_tiff_handler.hh similarity index 80% rename from modules/io/src/iplt/map_io_tiff_handler.hh rename to modules/io/src/img/map_io_tiff_handler.hh index c372ee8d3..3351ff031 100644 --- a/modules/io/src/iplt/map_io_tiff_handler.hh +++ b/modules/io/src/img/map_io_tiff_handler.hh @@ -64,7 +64,7 @@ class DLLEXPORT_OST_IO TIF: public ImageFormatBase protected: TIF(String format_string, boost::logic::tribool normalize_on_save = boost::logic::indeterminate, Format bit_depth = OST_DEFAULT_FORMAT, bool sign = false, bool phasecolor = false, int subimage = -1); - void do_export(const iplt::MapHandle& image,TIFF* tfile,const TIF& formattif) const; + void do_export(const img::MapHandle& image,TIFF* tfile,const TIF& formattif) const; private: @@ -83,10 +83,10 @@ class DLLEXPORT_OST_IO MapIOTiffHandler: public MapIOHandler /// \brief Map IO handler to read/write Tiff files /// /// This map IO handler reads and writes tiff-formatted files. - virtual void Import(iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); - virtual void Import(iplt::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); - virtual void Export(const iplt::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const; - virtual void Export(const iplt::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; + virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); + virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); + virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const; + virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); @@ -96,8 +96,8 @@ class DLLEXPORT_OST_IO MapIOTiffHandler: public MapIOHandler TIFF* open_subimage_file(const boost::filesystem::path& location,const TIF& formattif); TIFF* open_subimage_stream(std::istream& location,const TIF& formattif); - void load_image_data(TIFF* tfile, iplt::ImageHandle& image, const TIF& formattif); - virtual void do_export(const iplt::MapHandle& sh,TIFF* tfile,TIF& formatstruct) const; + void load_image_data(TIFF* tfile, img::ImageHandle& image, const TIF& formattif); + virtual void do_export(const img::MapHandle& sh,TIFF* tfile,TIF& formatstruct) const; }; diff --git a/modules/io/src/iplt/tiff_util.cc b/modules/io/src/img/tiff_util.cc similarity index 100% rename from modules/io/src/iplt/tiff_util.cc rename to modules/io/src/img/tiff_util.cc diff --git a/modules/io/src/iplt/tiff_util.hh b/modules/io/src/img/tiff_util.hh similarity index 90% rename from modules/io/src/iplt/tiff_util.hh rename to modules/io/src/img/tiff_util.hh index cd54e81e4..01c601861 100644 --- a/modules/io/src/iplt/tiff_util.hh +++ b/modules/io/src/img/tiff_util.hh @@ -17,15 +17,15 @@ // along with this library; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA //------------------------------------------------------------------------------ -#ifndef OST_IPLT_IO_TIFF_HH -#define OST_IPLT_IO_TIFF_HH +#ifndef OST_IMG_IO_TIFF_HH +#define OST_IMG_IO_TIFF_HH #include <ost/stdint.hh> #include <tiff.h> #include <tiffio.h> #include <boost/filesystem.hpp> -#include <ost/iplt/alg/normalizer_factory.hh> -#include <ost/io/iplt/image_format.hh> +#include <ost/img/alg/normalizer_factory.hh> +#include <ost/io/img/image_format.hh> namespace ost { namespace io { namespace detail { @@ -110,7 +110,7 @@ void do_tiff_read(tdata_t buf,uint16 rps, uint32_t width, IST* is,int& current_r IN_TYPE* dp = static_cast<IN_TYPE*>(buf); for(uint r=0;r<rps;r++) { for(uint c=0;c<width;c++) { - is->Value(iplt::Point(c,current_row))=static_cast<OUT_TYPE>(dp[(r*width+c)*spp]); + is->Value(img::Point(c,current_row))=static_cast<OUT_TYPE>(dp[(r*width+c)*spp]); } current_row++; } @@ -118,19 +118,19 @@ void do_tiff_read(tdata_t buf,uint16 rps, uint32_t width, IST* is,int& current_r /// \internal template<typename IN_TYPE,typename OUT_TYPE, class IST> -void do_tiff_write(TIFF *tif, IST* is,uint32_t rowsperstrip,uint32_t width,uint32_t height, uint32_t strip,const iplt::NormalizerPtr& nptr) +void do_tiff_write(TIFF *tif, IST* is,uint32_t rowsperstrip,uint32_t width,uint32_t height, uint32_t strip,const img::NormalizerPtr& nptr) { uint datalength=rowsperstrip*width; if((strip+1)*rowsperstrip>height){ datalength=(height-strip*rowsperstrip)*width; } OUT_TYPE* buf=new OUT_TYPE[datalength]; - iplt::Point start = is->GetExtent().GetStart(); + img::Point start = is->GetExtent().GetStart(); uint i=0; for(uint r=strip*rowsperstrip;r<(strip+1)*rowsperstrip && r<height;r++) { for(uint c=0;c<width;c++) { - buf[i] = static_cast<OUT_TYPE>(nptr->Convert(is->Value(iplt::Point(c,r)+start))); + buf[i] = static_cast<OUT_TYPE>(nptr->Convert(is->Value(img::Point(c,r)+start))); ++i; } } diff --git a/modules/io/src/io_manager.cc b/modules/io/src/io_manager.cc index dd92f23bf..11002226b 100644 --- a/modules/io/src/io_manager.cc +++ b/modules/io/src/io_manager.cc @@ -24,17 +24,17 @@ #include <ost/io/seq/promod_io_handler.hh> #include <ost/io/mol/surface_io_msms_handler.hh> #include <ost/io/seq/clustal_io_handler.hh> -#if OST_IPLT_ENABLED -# include <ost/io/iplt/map_io_dx_handler.hh> -# include <ost/io/iplt/map_io_spi_handler.hh> -# include <ost/io/iplt/map_io_mrc_handler.hh> -# include <ost/io/iplt/map_io_dm3_handler.hh> -# include <ost/io/iplt/map_io_situs_handler.hh> -# include <ost/io/iplt/map_io_tiff_handler.hh> -# include <ost/io/iplt/map_io_png_handler.hh> -# include <ost/io/iplt/map_io_dat_handler.hh> -# include <ost/io/iplt/map_io_jpk_handler.hh> -# include <ost/io/iplt/map_io_nanoscope_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> #endif namespace ost { namespace io { @@ -47,7 +47,7 @@ IOManager::IOManager() RegisterFactory(SequenceIOHandlerFactoryBasePtr(new ClustalIOHandlerFactory)); RegisterFactory(SequenceIOHandlerFactoryBasePtr(new PromodIOHandlerFactory)); RegisterFactory(SurfaceIOHandlerFactoryBasePtr(new SurfaceIOMSMSHandlerFactory)); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIODxHandlerFactory)); RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIOSpiHandlerFactory)); RegisterFactory(MapIOHandlerFactoryBasePtr(new MapIOSitusHandlerFactory)); @@ -128,7 +128,7 @@ SurfaceIOHandlerPtr IOManager::FindSurfaceImportHandler(const String& filename, throw IOException("no suitable surface io handler found for "+filename); } -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED MapIOHandlerPtr IOManager::FindMapImportHandlerFile(const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) { @@ -246,7 +246,7 @@ void IOManager::RegisterFactory(const MapIOHandlerFactoryBasePtr& f) map_io_list_.push_back(f); } -#endif //OST_IPLT_ENABLED +#endif //OST_IMG_ENABLED void IOManager::RegisterFactory(const EntityIOHandlerFactoryBaseP& f) { diff --git a/modules/io/src/io_manager.hh b/modules/io/src/io_manager.hh index 816a0f51c..bca40128e 100644 --- a/modules/io/src/io_manager.hh +++ b/modules/io/src/io_manager.hh @@ -29,8 +29,8 @@ #include <ost/io/seq/sequence_io_handler.hh> #include <ost/io/mol/surface_io_handler.hh> -#if OST_IPLT_ENABLED -# include <ost/io/iplt/map_io_handler.hh> +#if OST_IMG_ENABLED +# include <ost/io/img/map_io_handler.hh> #endif #include <ost/io/io_exception.hh> @@ -42,7 +42,7 @@ class DLLEXPORT_OST_IO IOManager { typedef std::vector<SequenceIOHandlerFactoryBasePtr> AlignmentIOFList; typedef std::vector<SurfaceIOHandlerFactoryBasePtr> SurfaceIOFList; -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED typedef std::vector<MapIOHandlerFactoryBasePtr> MapIOFList; #endif @@ -96,7 +96,7 @@ public: /// \sa adding_io_handler void RegisterFactory(const SurfaceIOHandlerFactoryBasePtr&); -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED /// \name Image/Map IO //@{ /// \brief register map io handle factory @@ -129,7 +129,7 @@ private: AlignmentIOFList alignment_io_list_; SurfaceIOFList surface_io_list_; -#if OST_IPLT_ENABLED +#if OST_IMG_ENABLED MapIOFList map_io_list_; #endif }; diff --git a/modules/iplt/base/src/raster_image/CMakeLists.txt b/modules/iplt/base/src/raster_image/CMakeLists.txt deleted file mode 100644 index 7312701c1..000000000 --- a/modules/iplt/base/src/raster_image/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -set(OST_IPLT_RASTER_IMAGE_SOURCES -raster_image.cc -PARENT_SCOPE -) - -set(OST_IPLT_RASTER_IMAGE_HEADERS -raster_image.hh -PARENT_SCOPE -) diff --git a/scripts/dng_cl.in b/scripts/dng_cl.in index 96728a7dd..fc6caca34 100755 --- a/scripts/dng_cl.in +++ b/scripts/dng_cl.in @@ -72,7 +72,7 @@ else: from dng import io, mol, seq, gfx, SetPrefixPath try: - from dng import iplt + from dng import img except ImportError: pass SetPrefixPath(os.getenv('DNG_ROOT')) diff --git a/scripts/gipltng.in b/scripts/gipltng.in index 0568864c8..c7ebe96ca 100755 --- a/scripts/gipltng.in +++ b/scripts/gipltng.in @@ -35,4 +35,4 @@ export PATH=$BIN_DIR:$PATH # line. If the HERE documnt is fed directly into gosty, the backtrace shows the # full command in case of a segfault which is very confusing and not helpful # at all -cat $DNG_ROOT/lib/openstructure/init_iplt.py| gosty iplt $@ +cat $DNG_ROOT/lib/openstructure/init_img.py| gosty img $@ diff --git a/scripts/init.py b/scripts/init.py index 29f4b8967..bbd6cb12b 100644 --- a/scripts/init.py +++ b/scripts/init.py @@ -6,7 +6,7 @@ import optparse from ost import io, mol, seq, geom, conop import ost try: - from ost import iplt + from ost import img except ImportError: pass import httplib diff --git a/scripts/init_cl.py b/scripts/init_cl.py index ee5480001..8d3e184f1 100644 --- a/scripts/init_cl.py +++ b/scripts/init_cl.py @@ -7,7 +7,7 @@ else: from ost import io, mol, seq, gfx, conop import ost try: - from ost import iplt + from ost import img except ImportError: pass ost.SetPrefixPath(os.getenv('DNG_ROOT')) diff --git a/scripts/init_iplt.py b/scripts/init_iplt.py index c15eea881..fea91b20b 100644 --- a/scripts/init_iplt.py +++ b/scripts/init_iplt.py @@ -1,7 +1,7 @@ from ost import gui import sip -from ost.iplt import * -import ost.iplt.alg as alg +from ost.img import * +import ost.img.alg as alg from PyQt4 import QtGui, QtCore from ost.gui.init_menubar import _InitMenuBar @@ -15,7 +15,7 @@ def Viewer(image,title=""): def _InitPanels(app, panels): panels.AddWidgetToPool('ost.gui.PythonShell', 1) - if not panels.Restore("iplt/ui/perspective/panels"): + if not panels.Restore("img/ui/perspective/panels"): panels.AddWidget(gui.PanelPosition.BOTTOM_PANEL, app.py_shell) def _InitIPLTNextGen(): -- GitLab