diff --git a/CMakeLists.txt b/CMakeLists.txt index b93777148d78e99d610e077dd812d41f2ed51110..ae7b8c217b42fe365510f9fcc3563d12700059f7 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 370d3d55f16b2d24ad9fbb169acc2dc32c9662a9..084244455aa1de3a693cfb13297556c161c1c899 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 3395919721becda83d33e4a188b5e705234fba0f..f272d4c22f52cd0746db2bb4d4e4e07d1468c0e3 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 0000000000000000000000000000000000000000..d81fd59cb43884ac6b66113a77f226db309e64ab --- /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 26f8cc05b4c45c73a970af0bf082ebdcee32a395..7a11e42a1e60a0337e96ce01dac6e9c701c03618 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 50bd3c28eb191e54faafd5d1dc54fa3cfba518e2..0228a0e02fcc36190d8308940409b58daf0e0f00 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 f39bd093652d78589b5370fe8ecbdf676d4e5b05..0000000000000000000000000000000000000000 --- 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 d7ecdde05f7a6a4dfd070003887e09f930bc8d0d..e5cb2135cb3e6750a88f877312b97919495761cb 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 258aff10e2687bfc218f952b3fd7f9023fcc30ee..54ec25a73c2c965ddb9f90cd6a8e1fca0ff5d38b 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 2bc9effd192e6a63a30948243baf059997a8e032..08f9f9ca50b6e334878ebf3ae9466b38cd54c3ac 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 76b81fa45924f99eb77beb0d4bab0cf670ae6c85..7293ce38cab08487c8de31c10edd58af9d0427cf 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 9e73c84fe470b729d928fb5c5049ff4b196acc47..292d504bdf3afbabf3583ae3c77bbaa484fc8b1f 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 c0293529448709c6d4a00561767af4dd4e0a9b6f..71c9ac3d7ceb3e1b1f63aa5b255ea63170eac414 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 69d74bff22fadc31472d9725c62f65b23b617439..1c4643acd6ec55c61df7a483d5c05a13282da574 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 c45d9340fb2bd72369fdd9feb5d0434e92a93f97..492f5384e40e370fc5e51ea95ff4acbb3a22f773 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 3417de2104c94d3e57cb2c38b311d67fff4816fc..f0542b0c4a80795fc7a9da0fcc3e8201e0558afa 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 58fd7e091c8c70b150c8be3171519ba4057095df..37207916c7e04a8817b672d2f589e0c7063428c5 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 91fdc4d4617bf546260539336722c6aeb14dcc04..c020f0e0b056ff1eab0d5d7cfee08211158effb1 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 2739e5609f8b9625c589fe4ab35236c096a9e135..dce1c04fa0cb82f99c1878cb620e9cd2c5d1df4a 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 e184011c1cf275894bc55340190d88d2fcf839d8..6e0af785a4e3d5792686a47442854812398f8b4b 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 097fe7b9f543a9282e7b4c662f28994be21c27e6..aee4cf6b77d1dd5bbfec678502f4ff26dbc309bb 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 e08dfbce147a40c38b3e6f84f94b2a50b2db10b5..5e17ea1d6e760db75cd79a1f339b42a758d0e4fa 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 a1a081784feb207cdb23da57517c376c7ae59296..4f3d49ab8ae15e609bb33220f5dcca7c9744862c 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 08d6cbf0ed10342c31376102320dfa058314acaf..392b177b042dc508bc62e42ced3eb950deb0fca5 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 249004d840143d2c73ae97eacd78225384d3a5e3..c3d9bd369bc68b024933c4e1b1e36ce9bf6c0c00 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 c94117fa1939b1d9237af21d08bb3288bc0ceee9..51a4afa3851322fc9849da6791a191aab4a8277d 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 249bbe844fd181f7809784cf83f201a74c7bbed9..0d1cf46e575c35878aae8631bfcabd7f6749083a 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 1a9c74a584933c40d66b3e308494d69a9832bce4..4b58eee6ab9343fd1f7c05500b4d1d484cfc16b0 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 78da0099da0686eb028f7addd6dc17e6e4a2e7e1..06e5fd1e633a59b3b3e7b65ca20c97fb59fce03b 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 2367d634a51bd4891368017a34c4914e3440b874..9d4fadcb9a049ed04f7a8a101fecb87a00521cbe 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 a279b9cdf1ac68e365239f0f2328762eb292b581..4db2b2fff6cfe09fd7d94b3c44322cc2389d3d67 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 aaf56f0fc56329d1d6ad3bfcdfe749ca66cba0a1..eff033c1151632cb884202f241ebdb5894873549 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 edd42bcb20e6731f83cfa473110df2a92f9d0a93..aa796891b38ddaa1b36eb609c98276708aa9c1ce 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 fd09c22898677d8d5db646031470f907a8015774..30e9adfa073c72d23b1e45b6a0a51581dc5a1a3a 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 e25b00332ab1b5115201aa1e2f359fd7fdf30539..be5f7a8db5c6f8b27a9454bf7c21fb1b7cfb52d6 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 e0e2a1c46b202387f2c114ff0a35a4b327baa8ad..8e453647dafa19b28272dfd147a9e6ddd8afd4b7 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 5b211ebae62b099e866483f25f8712ce18a8e39d..7238b36d71e82cf2f9e372855b0cc7ad9a07d840 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 50ea8cbc9fd5a97cd2816eb6996df34fa699c62f..d98ec7f5cdadce426a1e9bc295e465c3389cf29c 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 cd9899c7274b714ee14b7cb327f28ee7e59eaddd..1eea253b82adb65c950dfb86f305f55180435050 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 b7e5f80b2db5aceacb44b32d1c875839de2bdd2e..913de29c93116189ff3cbe4bafdee08ee1a8385d 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 3783de35f98c0f79af32a6462edf278ad1960fff..ca2e991c11b5df22748812ab78d4a17af0a69da7 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 2873980a9755021b13c7a0bd437117439317f1ec..68172d62fd38454c423673cdfae1e4791fac1a67 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 2f0ffbb7173252fcae4e2dfe6cf0d96d56c74fd0..f0c07cf6459c9d7fab6e0fba38d8a41fa1a48054 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 e166d260dcdf7dc69d474502650c3b1d5b545860..445559158581e795a9a1b482932c31c54aeb4399 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 a01e63fe61a26e3986c85c623b83ac1a43a092a1..60775444c124e0a5df69776c3d8b65c88d5189eb 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 cc2654fb5d4ac7ca457a19b488d92c8c59091eea..fc93c46d3b38471b532267093ac6ea15e27b286d 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 103d7032b0cfe52908aa16f3b90b19152d98ec04..9ded3f6a04407e730965c02d00e53b8f7f93cd0a 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 6a93ecb98b75438a1f9835f543ad82e8671c9741..186d41dc29ba16e48dbc1dc506a62c23da16d285 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 d468788afd175bb21e79ddf10438f7c23343f1c2..819b38618d0b2293038e70289ee0b273999db26b 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 8665442c9ebb02168ff230c2ee9f529054253379..b39ad8df5680223ca81c28f708ac623d42dcdbbd 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 2cf0d52402f26c03a70152911b0a4f36a235e8c0..23551d1277bfa0319b54a562cb68029ffe8404b7 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 7e34d2962c21dc3f0d90b1e2a3add63bdfcaedc3..aaf21719c825022cacd4206e4266764965016d71 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 d5ddbfd2d997fc8f8a57515a2b7f6b2f7eb220e0..e3ddea39f876e232ed54de55e0018c0eb8ef99c3 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 fd1971d1078a2d0e2a796565980bb3383149f5bb..a29bbab70ca799372ecd3ce2ff7efac653ed6692 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 f0f5955a0e2f2e2ecc978782bd098c048e58bd0d..15a615e95da8f7ca09cd46ad1ba1b7f4af5c36d3 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 22c03248abbe56adc4e8af6eae28c8dc5dc98233..6857779b6f8c4a53fc12ca30923916864082620b 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 65d7dfb6cee6c381fc67d6e7aaed6025c565557b..7c536a36001b22584a63936f6c790a30d62e36e3 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 2cb17efa082dc7a6b1d6a2290a55e6ed15224bf7..cc337c661eb88f1283b63c75ba2ee5bb6becdaf0 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 a25d8109b94469d0b66acaf9ae9a3c640b856384..a02a2f86203924d45505ed8a1b7b4ff1b852b706 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 7d2efc4cc5dd62c09f6809326a24d4bfb7676bb8..c53ffcb0deb72fb34dcc2edf6589ff37425a0a79 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 eb6cf5504276cfbdabcab56e7c69095d04a7dca0..b3fd252ddd453a3e052c6643089d4a24c310ebe7 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 dcca4e356dafc215ad52ed1cfbc73367257938da..93633bb6f46de5801af00745d9994923cc3be5b9 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 d3c4b08e885e72009d838e9aa6303da2dd4a0b8b..ecb6636d174c729f79ef9234f5700497a3a2d8d4 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 01468fcec3df3bdc5aa6992ec6d03d5e094c79d3..875436dfedbb4160c1c5548f03dc042ffc12ee16 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 f892ac6a7439b3fc95ffebe8a184ba5d9612963b..088010304a0e6f4560209f0973e56f4f3421809f 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 4413f786c9f0a447ce31c904c807bfaefd07ba54..8c9ef182b2eeefc5f8080049198483d45433a859 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 4616ec47c4b81e9cb4319a7332122ca687866eda..2218095964a0c13f1dce6fcdae4d7947e88369e5 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 7f4e566b58002e5ebd56a8e5f0c90f91b9df22a6..4bc62784c86e6788da7935591ef625d7855e7ed9 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 a6864c3acf7c93e4d3ede82e049fda3807bdb79b..d764d5f9c110ec6820982725b285e3ad07c14ec4 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 c7587a2298f9910ea52991283b22126e816403f5..e1020caa6cc61ee17c9dc0a622c2837391af300b 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 90879a79a3b98310af27a6ddde761188830e059d..d89a24c4699893718b6d0c418b2e1c7c5205fa18 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 171355cb60ced3333d57e7e0cc48492459e13654..4c8b9bd8beb8d5c3c138c745cc526e1dd8d0482c 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 cd8678f61e15c9e52a071b056e5a99fb7dcdbb35..7bdf2a514df7ca43215126c027d81b4eb3f18182 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 d32e774a3dda98242fa089bf6a3c07d7fa4bd59d..0c40bc31d672f6e792c853f4381a8a8628e16e61 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 9b97f7d87ca42162a548dee509606ee5f64932d0..a10082a3408b0988c2c38bda0230b6440d7916ff 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 8f3127aa492fff98832b7ffccfa4be1c8e59fa1a..bb1014cdffd9fcfd80fb7a8b426832f1d96f302a 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 75672a6f1ff416ce82e04ff9003acb3cca165f74..f7eae6fd7a357e5222730bdd94322fde62ec2507 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 03ea5341e09b8d36521cb00323b0b88a3a49f4a1..737bf94ecd3e760a260d06c267b87ef46ab1b82b 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 4e78cac0cba32209e63311daa67836fd6a02b04d..2272e4b0f5711168b205e55b77c232bb42add9ad 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 9ea9a1f74972c3fbdca59ed6859cc0acdb251f08..dd33e9d8764f3bd7827d0a82394535d74479e28b 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 14cb075878e0bbf7166f838fe559e406df804750..c198b10f5b2e9f41e3719ce1105c7e697f04674f 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 b40d1d5933eed5e6fa3120553ac6e2c5dd34ebcb..11cc0c7ccfbc3eb3f48543d4290654a4dc1231b6 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 9015b085edf9d879fe6644f110665690031ec043..1a0a654d88cb1f7c87cfa78d9524ba72032ed162 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 14c2b995c5c9f60ba81d5332f954a50c41d760fb..0b7ee9daa30b3ec077b3f7e3887a98c3632d73ed 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 d4d78b53b1b6f6a807d00cb12b41b8420899e4f0..c947d50cd1454a49bede8558efd6c9e020407c18 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 8a3d48dba9cf11937fe9ee42c03517b727acd002..83a4b1b63651aed8b5384233ed777d2556eef87c 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 21c308cc16a4eb066e9d9e107f65010cfbc5f6ff..fad9b719894d002ab6013b0ae7337f875632c7cc 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 9806a38d18918054fa300248f7983f14b649a4f7..c031b8eef986581d3ea6043a7f2a7ad4817d3eac 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 91484b711a8583c3060ce4d05b73c769f5d75bce..fd107f330eba7251db88b0b05359ef2f0a0b168e 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 34320581d11206996ad223a67629964af26a2d11..fe76e291ef0614e15764766646ec78a67ff353f7 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 67a2a003f6a7b3390a1f967d52e179b9df2759e7..d8433890a0b20049378ac9828d7095eefbaf42f5 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 70c882a4b96e9cdc92ae0aee4736ccf7832a152f..c23b593c632d82f636208af992a1a41aaedea035 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 ec6d4e8a39a29c6b055f2df86f69aaed3a7a0167..5d6c99971706c5c4b1c6b99df35272ea12675b87 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 b2301f49f61b74cb663a99e01b35168b9f649d0d..22f03f77cc1082ed392cfafa9c938161922727b5 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 3a3c2ddd966439ad50cc98d394ebf3a191764cf0..58eb7e0eacae1a9ab79e909718b242f66d96b8e8 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 6e4eee367dd43a777e68cee88bbd227116d1bc56..a4223a1c6f485d0fffa5236631a7b5544f6d56b4 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 7bcfa3f2866ed5dcf0240678cf05bece56ade90c..193908db8ba87899d5c9391ad76375368404aa96 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 cc9da598b4335c9abce350aab361bce2871a596d..49daa60504c455d8b95d4a0db944b817486eb906 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 0b5c3a3eb9f5462aa4480d1f04792d22f93ec73b..f61ebab28024c9d47725428881d93a0216697f3b 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 05ed4d4e3729b807ed5c399305b42749afa03386..7e4a6948fa9ec5cf16cef3fc0e3a1630e9880eaa 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 9ad6ef355113726ffb80da43beec37b432db5a26..8eed58bea578fe8bed58d89d65f30ef264138248 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 e420b5726ecb1543e5bcef2f616ab26b5b009da2..2bf1e2eee3f5a5b14b22d8835a48cb97597e512a 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 4c774dcb4b2096238d216a2cd712e1f9d225e1e2..224964ef17a5e69426157c2eec261ac69b4cb4dc 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 dc69a852190ec9cf14a7ca84230a593d08f07fc1..c257040e5f976609bd7c0c13469690c2260b758e 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 86d3fbd339c1b17baf614bc2467f15a7d8174b68..3ee71fbac890c2e7b39ed61cb9e6beadcb2f91c8 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 7609e2e6fe6168f71e21c85723f89e137241e259..9b2636c0c92a264603a8efc74070f31d7e907a91 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 8c96cff0a58554222f6e18654f473a9952bf898b..b36ff9a7abdab3dd70a4489ccc80f9f15e3c936f 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 cb9458a6dda9f01951bc52ef47a14ae0d2360f57..385a5dd6c4a28ffa711922a03a6c794c5f7c66fc 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 dae14415fd7d9be119578438554316da838aa19d..2a9f42cc72add271b1f37ad800470b5cb6eaacd6 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 f55f3d2f3e55c24f6d6487b08aed43de0e131e13..1f19c80ff3b60f6bfe41762eee9c056c25efb2c9 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 02dfc60f2707de313c60842a068ebc4bb574a3d7..1b676a42cb14db9875848549264be6a3c5a26c6b 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 cfcabbcb0e958ea9dbe604187687c6bb2fd0ff6f..da982b40c80144e34b7bb5d34f8206bdf959a309 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 eddaa2f874590149507c742db43df061db3aeda2..0a984c0c2656d37c8d64280f9d4b085050b283fd 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 56697bb80cf1f7417107a3183ae43c8f6b04545c..1826a0e2c46e9246a0b1a0b60fdf37cbc8391814 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 575f783d09ccaf6b9cd3d3ae884599b4d3f6d3b3..48c1100867aecbcc7dd095c1d76e61e94fcd235c 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 f7aa3164183cfd31fa1ce6df8152c6e2ac7e5af2..993f363fb21a1d1ea2350eb43d2743870511e171 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 d337e25ea827a802a61d609c3f1b81bc3d187c69..4bc23e362ccd5f671e0f37d9b5c9de94fc6c19ac 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 9664f40373e5ce8cb427a2cc7e4d0a81481d644d..35116a18094d6cf53f82cf14daf315ebb93fef81 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 1728bfe3750d80861ae080c5ac31c11e744fcd6e..a9f2cf41ec9ab3a819e3c4147f3f14c85f3c00c5 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 eecdd26a84fe0d1f00491158633421ae3fcd2912..4a9e22a954bc21941991df52f18b3b9fa890ddec 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 98333e92516f738fe5759f4ad35f1aed9427af4a..c40e136a2da997861bce210196dbef8038ee5e02 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 6f946c825907265578461d75732ff45a22c66dbb..9b72a6dc7975a65ee0bf69164fd31733a82d3481 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 5bb7d3c35bc88c404cb8d85ac9d48ef8981bc52b..f44f54f5c0cc084cf88cfaafe33b38c166a8a4c0 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 7efa11f6e22f59fe85e7622a1a146ce79a17fa93..50661df051a51680404126030e8abacfedd2756f 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 494e8de4b89c5ad5a8cd96df43bb8eff4fdd367a..640b161951ce1446bfccdadaad5a07a8f050e4f8 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 fd54a32b451d37b3a447069ea69095a19df727b4..afb3deed5c323366ae53203fea58471f5c9c286b 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 f3e887ba51b798b928313580680b27ad5cc18b1d..06d831e8b233c47c8ab111224090eeb6c8c78fa3 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 9c44cf4050d76f0cc38fb29d4f13b294fd0db907..d9833ee0543251a074318cf39aa1748f45eb894f 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 5c4afd5b6d3e2fe01d8ece1f6c1eecbc0f362239..e328b2818c3f6e4832d589dba75a708eaf51b21e 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 e838d42f745a6ee14be9012b41b486c7b31bfa05..506640598a101377dcc5cfced6b097da6ce71c93 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 11cdb12f358df26ccce76d96509337d4ae5d22c4..57f2d1183777356d2b8c180b16381c22535437c7 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 4523e4cdee0510a29434e3812edbd977f68b547e..5f4a70c8833f6cea852ddff90ee17a9f4062a115 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 f034dc11f92630439ad01c5cecbda434ca899b1f..f12533d815bca71f800bf1dee508a4a99bfd34d4 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 5f0242367d396dbb280500ece26238b133af0130..0135764784c2512fac91f504bb6bc09e0eb5b085 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 90cb76138fc0c34e592d4f6d33f996211f804193..315de118fc667f1d0cd6664973feeec42a5d48df 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 750628454d7234737c9cf7a315de2595a957b1dc..10f866cbc75a167ceace6333e7dd6879e9453017 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 c30433d62ca8f621d3a2da90a31f83b3d48da3b4..4c6aff95af1744a533d61f6e24b3d890ab4b291e 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 f9b3d7b6a272dd19079efd4390223a7ce64de43a..3398c820b8f05e528f6bcdfd5aa26ab47d328121 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 cc1a1291057348c075252345399aeb61013905a2..cfd13b108c7006ffbb2e3530d693edc9d78b99a5 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 be1e0b4bc9d1c949bb039df6b44a5c55794e77e5..f38bd69f0c0d753de11c615a4b1d80c5e7d76fb2 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 8bda9624f9d9b97f00c3d45d954502250cd8ad02..59f1774ef9efbe8bd9d24e689686cad6705f1f51 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 a6e94f2145e90b09029b97601ed411b7e37726e6..27f88107f605e4ddedf23ac9723b56792d16396f 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 ca54eb2b44b4960c1422a19171bd74888365c485..9ea483d86e0c7fcfef9f1b8eedef1f6e531e5b13 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 7d4aedfd38ede1c476387a3bd7b99adf3381f780..1d8f14cf6118912c49f44ce86fe7b8cd9ffa2ffd 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 f2ea776a2281976947cc026925b76935df867f67..9e11a82b07d1acd589ebc61b5037b45525ce9a25 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 6bdc5373f2eaef2de7fd5f5180a14ca75f69574c..8f06e37ee446527e4e58e5dd24736024feae8d41 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 9f56550ff116b3f297fca028cc0b733c955149b5..6e930a0860209476c1db439f554e117e8c5dfc86 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 195a712e8023f3a0c617e6e0b660e00e547fc335..4be921f60a28decebd7dc789ad356540528d1f78 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 527c565ee2aa26571b6097ff6b1096f03584c9d4..15910773bc9756ff1a49ca81e2b23e09ab791961 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 56b894a041fe8e5a945b3e1ef23b1f2f61f4b077..bd9ce6a7ba1aed20886a9971ef86afebff4ebf89 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 6e7e827888c188c18012a62d366c69528acb3cbd..f5f5317b051a75f490c492f1f89e0245a33b7944 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 492602c9978501bd03aed93796ccff7bcc9d134b..c38e0d151e3011d3103317a111bd7c3387f32457 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 aa4bceac26430ba71bb81a481fb8bed36d1be950..aaedb099410dbf3e292d3430037ee32c1fd9158a 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 dc979b71c514ad0d43348683423e8ca124f2d869..d61c8a84753eac1fc67c51b5c4fa6a6081269c6b 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 f6b2e5588ae036509a6d08db9ca517f2434ff9f4..50753ddc5545018b9fb30c9df3f87e766f8e1d83 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 635ff89e75a85280ba6d51cdee97f943fbe90a5f..e8d7210afd878839c5f1416752845778f303c75d 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 8966d77641fa2d027d7806795cce5c80af6614ae..f2e50c8c1be237b2ebc73a76f6244a079025a369 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 e5920f5168d6559c540775333829835c3d126da6..c8b2f2fd281af225676a0f2b4e9af952d28d6a3f 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 43154e783fd4710180434a8f3721d4604d6434a1..3067c46f2d201ea4f65e6db19c3361ff4dff1a42 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 70a6211414fba897858d3e6c971e4cae66f732b1..f303f4b28c5e0be3e341d694264ca5200b413a89 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 4fd4ea923163b4c8120dd9be4b43fcbcd35dd20f..84a23e1a3081413512e43c5fe0d5987e8f244108 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 6f585fffe1988061c0c13aa0c34ba75ee93e9a7d..b8bedca1e049b707952c01f750a4d8be6244ea75 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 d48a43e3b4ed7e7ed302fd469a2ec0889f3d362e..e3e45c98a3830b01eadf39427b1d3af3981028cf 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 95c0631ccaa6ba613118c1b5d289db7f7b6f656f..5f1488b3e60e203b674a4d306466c0b891cd1b11 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 1c5e48c471eac87ba2281c43a251189301e57c98..51d9061c713fc4fb1f200ad212e5e520fe85f59f 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 e4ece8b8239581e30b815cd672318f23d56dc244..5a8966bd2965961fdd55b57b0fa1d60d315e122b 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 3594e9762d067eedee9d17ed238fb5b28055ff88..d2fea62077184a488cb575c8ccf4eeb3946a4afe 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 92d32a5826f49fcf0e909e3903921d2db5655d89..36948743f4a4e1a412a2835e69368df0adb7e86f 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 4d29eee3cafce96f85c65794815a563b39a6b544..7b1668928010ae83f375721d96d1a047643fb40b 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 4673b351896910e0c0b0ef13ca464a4963d48048..bfcdbc6c0b17bc13ce75fd4027a3054ff149da88 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 61f8b2b420dce4c8acb311e2251a4d7ee82cd8ac..5861348476317f9697a8a75b984c2897066a0ba6 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 5cea312092c71647e0c9a3952d61fe0c309537a5..622fc93ae1b34062fe841df5c861791f62f271e7 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 53241efa1a5aa0e7f14648496ef3f793f86d0755..f4f059fb1c57aee9abc4d1be05f241283aef6707 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 0252884e39c4eff4822e7f682196999c47df753a..31d0d10d73b557c52a856370c94491331636e95a 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 3b04e0c40ff9263a35a07f52344eb33f65df80e0..994edbbe3d910d6ff708b35d16e109e158838737 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 db4ec772e30971420b7e6ce4937da87618ab5946..e017d1914fad2c8c3197e02a9f5624e856527f26 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 ae806214673a11f5f7d18db3cc2a5e839265f053..1c5a565755c5fe15c07302cc4c322d9eb766ec5b 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 6a75a2618adfdd10fb1ae68a04132bcff64816aa..cbd5711c0884e8a3e54cde2cc4f95a4c8b66a87a 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 e6734dfa9371dfbabc3f98c7c90ab21ded4997ec..46debe3c1b26c1070fda35010c7d2dc3c7faa5f8 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 74da275f946f996b75e8de12f48c70900d22f41a..28aa496ea82b53989a3bc60bf562aa3968c2b95f 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 653065f7de99ed8f6958266818d4b32ae3464264..38cd8ecf81fac47bef2faa85ba3e1cf8558120ed 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 1cabffb220c9a551935af2b9f50288134f7d96a5..49cffa5ebb8e8c35abba0819b436e2a4bd94c549 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 48a747712b10ff953df2efb6ad1e65cf4d957db4..9dd063ca2cba65a7a7b591f64a29b698f52b0c96 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 8ba3eaedb5ba8f642c577497343ea685b40971eb..06d088ecd50761ebb2e830f1cd71d6bc938777e3 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 73a7efef4ce3dcd8e4166501fc2b112eab7e409d..e4548824183d86f498958efa70ba10bd870baaa5 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 c38384898987c1d4ad52549bcee0f57775629657..4a4e7a29744d874c330145aae6d33b94a3726232 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 33846c76fb0cf435bc837fbd9a310597b6982f37..f4156cc5b91978b757eef1790ede8606f1edc8d4 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 b8f56346ae209b76232e51644a47bc0c32189e74..fad8bf38836637dcdfb79e50647a1f58c05ff98a 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 840b1d4e77d28d964ae3d470ac3a776caee09e2f..bf271ad1889abc5409d0205b490552420d8e6a04 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 2385fc120980a268a410d77dadd1d8908c77f5d9..37f98ccef6355e68d52ea2be281d482568a21a62 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 2d5004a9206da5480c841e6972b55b9d71abc23d..6e24552bfd9179844eb036d9c2fa94263e5ad00e 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 ebe494cc74705f08dfde2b601c8eaceb8ea383a7..6b0d0d9919661b8d01e7f6243351cf2f7d6d334c 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 33eec58258eeeec7303032e599b84713eb303c11..2408a7602aabff41b7f6bcc4a886ab7c25feb04f 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 109a899ef2e51ceb57dd996b79270cc72f0477a7..8278fab6ac48d1b49b98547e2e814b7b4c27031c 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 07c9991a1ea6fe36799b9f3fe304e9c3967dbbdf..34e695a13e10ec3dc4cd84029de63c3b4a7738bb 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 59596b5118f828bb80f94ad63f7ef69229b75837..ccd1ac9d18f9ce3428f45797fea2e6baff772de7 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 1c99adf5d441f543360f6ef5a78413f884176d65..4ddc8480f2733524e6502b901cb2db0d43756a4d 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 bf2e4317087665c5f56d1fed279a4b4d1692d482..8275ca0d8f8e4a4e743a1ad9b46ab9bcbf4aea7e 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 a1f958bcf8cfe41aee242314304a364bee3a32c2..f2226a0fd76e4134943606274199f8e32ad2e6a9 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 d1fcdc9bbe6b07da18ebb2fae86cd07b6e73e9f7..38decfcb483175e17ae40fbfb4146288d00e141a 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 3343396674cb0896070bd37bcb178ce497f5e583..85bae5f44c1f23a8661ac30e56a4b03b1fb951a0 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 83f60b6b08d9ba39234d603e20843c48ab506d8b..f70ad0e60bd48e0913962ee30a09ac56d32bce26 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 ab64947e6f695d4c052c044fd1d4e89138376194..818a7ddaeada031a6e7d5cd30b77ad607cbac0bd 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 9e1d707b8da687d30ce80ee555579279abffc835..b43d2a0e4488fc029a4ee1dfd217f6398079a935 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 0b1f2beaa19128be18fa7cfe71df31350f46af6e..30be5ab060e9f12513becff5bf43fa86b0c61b80 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 ed3b984d3302a476c24c108bf23f4f2bff24e6df..a06a7cd87114630a8453315d420e5794bd9087d1 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 0b80ef8b9a3e6b022a7534c9e787baacdb279399..080be24fa234ddafb49fafa439654cbcb802b642 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 06346c9fe68f44565b4899cfc2950989f1b6c3b9..d64b2603839f644e8bcb35cfe6dde26637f93f6d 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 eb6593b74b689630a60af9278e2a9858c198580e..bd563e57207100515fadfc5a6d2933875152d953 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 56c3c8ce27feced2a2bf763afd5ac2396dfcaa9d..cc45d6b7bb06c8793968bc5d7fe246bc38962023 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 5f7ec69457bbc6089563a54c5e9b2b53f7974345..6c6a7be3877d8e7cc09db94b38d23c8b1d250d2d 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 fd43545e27abcfe812fdf4ab6198fb8638a7a45f..46137342f343b52a47c65983e246e684b4150d5b 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 d649ccdf4d79a4a3d905c93aaeb8eba2a22726bd..8b2938c4e3c5aed3ebfd4caa233f8be347177e7b 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 33ef03e857d019c3958ef47466696ef2f073613b..c96c3abde47582339064cfb815955f036d546df4 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 a36d070f6386f82ae61f71df01ce3695facd910d..7ebf9b0a398252d19c63fe93a88508d605c7892f 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 5fe5573eb0f27b686e6b4bb80a9b21da8f2cbd9a..cffaea498a40c74e5dd9ed755b7d956ac936add9 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 796e0359a765a20b60084e624ef33a6841462ebf..7e7c89479fb302ea134bc7f8307889aca616daa6 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 126e966de59b5fbb01e2be1d8de50b2d29059844..aecb5eeb9386d66c5495af54ec897e3189dd4763 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 ad30819add3295c631098d6e3ee3f625d6003f66..b4564fed2d007d7957fa620303a744768fb417ab 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 13ebe3201ae44cd28e62170c4cf0c82e65dbc9df..a58f780d0b3ec657d85aa5885d651c3cb7de9e7f 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 704b60aa3d7f6e2e3e236f885b895f9b77ef959b..96bb5dfdf137d565cfd40fdae7de0ae9dc9f414f 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 88a6d56fe1d24e679417e7eae508c060ceb4451b..fb82c5ee17aecc40d0ef7b319d3adfcacba96e34 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 fe49b930fbfea989ce8fbd33986f08cb7f9c1bd3..3ff6fba48315d86d8848d96cdc42d7871f50e0bb 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 28e96774358d94ec4ad3edbd8d8253ea6c5fc57f..942e7b61cd427ab7b6b4a5c5f13bd9a824fb6b6a 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 b5977c1ec4d8b7aaf2f8404ba2bae67cde23d57a..6c06f7174d30742d72a5f11cfd1860b0ffdf8c29 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 d9610615e7499ad0aa18746effb3b70746d1bd96..eea108c524bd27607e42351122356eb9afccfe70 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 b26562142785ba8a2f4861f5fb023c2c9d71cacf..6db4cf05e80dd066460fed2215a83c58444a0396 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 8555455e54469855e6dd818bfc57fa8e1c914ce2..644f0baf975d05ac97a90500e139b8973091115c 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 e0dbc3f061ca23dc42eca7f7f05959eeda7ea544..d4e9b13c986de2d8fa206ff44edb6b34d2b59862 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 536a6fb426b77085b62dd8f771c02a34ad16b040..121e0a296ea6178e38b0ea2a6130067b359338c9 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 441d17a48bebdb0e5dc5b003a8d91fddb03febf8..7a15c854ca3a3edd7ae9383797a907d156d7f4ce 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 9a7344c5b6a8d982a112b2e433ade0b41ee4c3da..4021348c7741816f1a4e679dbd0e8e77b9fc8b97 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 6558b012fae9ca5871923b99d144b8679a78b7f3..7827faa8f3f4a7811072ac81b216b5a2979efdd5 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 e1f94a41ebebfcccc8083d79f03eeacab0973dfa..309d330c2bce5d96ece8459342ba6cfc44b906e3 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 b03e46db2dafa0ed6c94267795fab88e95477010..20576672d9578fbb56341c5a458bde8138835005 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 fbe789df48967ed4c8401697481d55714a340c90..0d0e7e47a5b42c6e028275471a66928d34d54c2c 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 796a3f10bae1241693fb0b12bc6ec0de8e575ecf..1fd3edc3dfd76650fa24594cb4b60abaeeb62025 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 64aec09ac75217106be4452946cb70d3a13250c7..606b5883633729c0338c026db56fa618c11453f1 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 875c1b963b14455950d6bf765bb881f22b8e9609..bc685c16df890711be25696e3c24c019e00c3aae 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 78507ac897e69faaa60e11010b425e024f2dea52..279fc1803e94863acf3552a95480fa4ee8fc9b23 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 8459cbbe67bab57c5c2bc2f7829dfff190d3022b..4e455258f784ca1ecf8fba9b97bf4875cc3aaa08 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 ca688d5beaab8c06095a3d74b8ac2f2529927dd3..8c71381f0569a38f7f39645eeec33df5d98ec9c6 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 fea3e75a2b87b62edb3a1a3ea7af5d3336f3e4f9..9745bf83c3bc5e136f3847cae601c219253c77cf 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 263d5feb39fcbba2f9ee16215bd9321911ed9f10..ecfecff13109a898f33da6154070d43544fa602b 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 38d8551b297a72dd1843e10ed5ddafb0158427f9..b4b3c163284b8742a93026a5591b6b10f808ff66 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 dce3f9ead2a9c4f4b91f13e67a1e7e22560ec954..2eaab697e2a632538486402719967007f4b49f9d 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 7db8308a17fbdaf49cad2bd0264a886e195ed6c7..978274e01539e04924a21ea3a0f45021ff36789d 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 8795b2ec50178f173c0779a84741d3d025b5857c..fb384bf5d994c29ddffbb104b558342fb564de86 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 1713490c30bc811534ae60d53ad420e8095ec7f0..b8316fc9482f62acc171d7e96507b32f4cb01aa9 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 76f10046758dbef7e22f74c7312e3a3905579410..0bd3b7085d2ec8d4fccc25238c9282bfc42173a3 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 83c35f1ab68385529e9e4f1d3e4f895a4fa02b7a..e80f6c35589f992c4727dfc8265463cabebbece7 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 ac3af978746360170a9cb91dbab423b54e4ceac9..d05e155d1c7fd1ab6c52f063ce91dfc5c7308b1c 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 e1981bee9c729a0adde7c61ef3f3325d52ce2a49..277326b4ee8e7dea65156920ee1dea46601e1aa5 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 d01d79e0eda1c9703e7fc9f3010a2163f141f05c..22e2c607ffe19d834c271b283c745ea9aa26c9b3 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 f4c4c7926899bdc5d3462e5d2a3a39c2aa7fb643..c8bd9f93312cd08af37fcff3aa690c72c99685c9 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 6a48d38b202f2551c7d3e89b8655b4daba2eb1d8..2672ae8df0cb33eb2a7f5d34b56f69e97f9ec49a 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 e8850ed79e8b281cf59ec9efb16d1177060b5a82..6531bf70bda6fc913a498f4b46688124268598c7 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 a99bfa23f846ca2d557e6c4892d0f31279265358..7f679a741c4010c32650b456b922b79d6d278a59 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 e4a1b7f180c7c9adb0065ff9db698850ed64ffe7..de1bd30837f8fdcf5fe15fec382304e1b3fdfddf 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 9a86af2f620476ef5550ed0eb88b31be3250ec4d..2d8cb01d424cf2488f94cd9b6d6dd8eb0eb5f7e2 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 3e3348621cc77dfdb7be8219dc0395b1a0f5c279..1048c02ee274651540e93c7b71a1e6ea8e1a8dda 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 90f55339598ed0b52c1d4a13ad1bdd35084ec9ca..503e340ab126a7432db9859c3e00dbce44bb0e08 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 e1fdafb44cf10d0038ee3eb31e57ba9c93c09286..d8470acf6a3bf0e1c781fcb9655ddffd5006948a 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 f2f76cc4eb20ca0a81621685bc22850804ee59e1..03a56b24ade11904bb5f81192acd9c6c2f5635d0 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 1b3839d1b9f5f4451b0261435ec2f5aaa5417746..ed8e1e1d873672cf4907f8b8fc18c1cb55b29fe8 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 f92032868cb1cf7e86aee0fb26413e76112c5783..125aac1141e21aadf36d3cc185c0323dbf944933 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 18fa047aed7bc3b4e613ca4798ee0bd326ef540c..2bd86943379635492e204659df21c217d2bce573 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 4b4d57e81c0bc625aa8e30818bfd2638eab9db81..fc1844ed8516e550285fc43684c974852e0ec794 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 ca5c843c33645f6d1b2644a33cb8084ed7f7f413..09ec52126be57a338f8ce8dc83febd2a60928910 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 17f48cc6cde8c25c772cf5c5c7bd0189482afd86..96880f534d23ca3a0feb311fdacea086bd5da16f 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 9e8a4d872898745e62485882fc744cd356cc05a3..ce894a0315c8cb998987d6447b0daaf79db1d834 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 9bb7f73459260ccce8e4f73d447a2a3767530fd3..f47c04dc97ecc05ba5ea62afdb97a490761755ba 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 cd6b2a1b6ab8f31aa3e143c313a5bdf97d1a9b47..35c0ec7b32a96b0d8c157ca13767fa9838422cc1 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 fd668e7491fc092819a2ec53703f772d9e843566..f02420efc2276c837f5a811e0975081164e599ce 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 03f0d7f6d6282c98b3e24b7a75c873e15503ba60..6ebd30fc8c11376816a0af1625fbfba3b9cb45b6 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 df12805b9ac554c66905e1820c7bb3de19ca5ca1..7c039fd7de88f4b0ce6c1e5e157e23c12cfbf340 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 9c3cd9d448ef12932f9515514b40610b62317360..88f4061c6b0871006a30a90ebaca1a16462abcd7 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 efcf4bc608c270c73a839e1a5c9f32295f5d0ff6..bd6990944e296339ce4be8a339ec2f9aa05931ac 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 6ac4b04926d9dfc372c1fa03ca10b667585d1499..afaa2e7e4c8dcbf271976912f263995b62afcdac 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 40f405911f52e1f33621bcad45e0a33b63dad3ed..c7fbbadab0cc9e9fd2255df241ba09edaf8625a2 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 e3f6434d703449cd473974919f890941728a18d1..11a6eab2e56bfa9b4c5f0678e79656339e8e001e 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 7dc7a5270705599b1d624d3101283d026ef3b39e..56f6194fd16dc27e1f61c6e6174d4f5f861da68c 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 94faf382c7ad75ea4daf20740bcf1632a4fae349..e0585ffd62c4e89047cb91097ed02c010dbeda2e 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 d039f9ffa171c376ce79ab1c862bb747f0a8cf78..745079083af52b8c8b33b7ef2ab02ae9b3505ab4 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 614462811a54d665131fe59699c53acb52f400ca..52765af207d134bca5c067eac823f2275f79607a 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 b7682eac41ce3eede560dfe0eaccf9cc9354a330..0e9dd4f31938b73b3b639da7e1efe890d9601c3d 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 1d76f3a3c4fb0e88c62e0e592b59b0096ed999d5..44bfc29e2d5aade264e56c33f1afded732526c59 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 af89b904ba29a32aead8bddb347985098e344e76..32010527100bc5ddf32c4f747b4b6bd1218d1c51 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 56c36f22095ab9d3fe65815c7e05b20b0db43c56..29fdc3909bae2fb5c0101258e52ea0a282395393 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 86833603531adfbd725bf4629cd2043a32d237a8..bd7b29cf29896732e50de9537394ed4d7b49f7ec 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 7220c9cba04c6ff591e879d81a99c23517461a27..29fb044e314c254d2772bf5c2dff419fb3dc0b71 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 441c034c949092a6e3fc1aaa031b47063c4b3858..f31adf013d83ce2bbfa2a95c6fa06c9f5a028564 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 7f7baf45ae1e955071a62978dcce2e99c26f98c6..06cc4465925be4b26e0ac48eed7dd9987aa7f978 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 7613381c95dae1f170212812805fb5487b8deab9..3364d57a3f18af5e4bad7dc2ba3aaabf56db668f 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 910fff1e82a7a257241bee2d1c97103258562a26..822f393a0b586df664b1c3fa6df1e42bd68c7141 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 a9f170f080d848b294fe267a0525046effc68093..5926a09e7dfa49e981baf7d71c736d0ce3594e70 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 a8cedab1a89cdd3b3723e1936d514aea65ea1ca3..f7f1652d26b0728925d7611d0bec717204e520f2 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 c8a9aad4d1c1fb79df501ab27be5de20158a05e8..96016959be03cd7d1da5aac23dd7951ff2dfa81f 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 b9af6d5eca7d6045c60c922dc441054fc77128f0..beee95d5283838039a85272d17d42282c4cc9d15 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 83fcbb334f12802a4e1e76d1fd6203fb234344aa..9b49c7c6f64b6b7ba577ed701d5970b2d5494dd1 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 12bb4eb9350a01c1e49facb55d21e1de20bc0560..1c71b921fb5d989790fb8b174797547a8705095c 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 8e8f190decb7d2334bad1398aa433e6a69986984..e9c96743fa542fe7b025fafa2a40768b5d33d89d 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 f0309d8ce5fb2588b363ce7e8f713bd522201e6e..57fb4b075bdf5d34906180465286069285ee7981 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 80cd9e14a66d9006e3fc180c22782ba3b5c5c691..3e8ab9c38eaf204b58f765e686073a48d994ce98 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 93c6f03182f57c6781ecf0e8c2dd882e9cc7cab6..b7ca5c9d31ae6648965722837570fba6cf34db9b 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 0c8ea23fc20e7ad9a35794cd44e0f2967e9a0612..5cea56762722b34845cf6990c44391672a3969b7 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 1f2d44b63b0db6dcb1001ccb621e8d34d3d3bcdd..899272a5e4e7efc92e232e56a5a2057f80c4154f 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 b5cbef543c805115959c4dfe2a1402863050d41b..c7ecd816f622cf0ff75d96769861e2cf20840d1b 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 e3f81a105ddf724bea41489e1c7f3a154e14bd01..0151f3dcce6fd9014fa898ab60d72f3c74a46c68 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 a74a83233cb4a927c5b837197766d0dafe0f1f92..798f062ed03d1da9345fc422f24276b55fe0cc7c 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 75142ba07de56619e2742b781964f5f41dd38d5a..f378d98f8c949547917b02347d3414779d0b1f18 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 830bbba5cff128513b7b2402a340d18cc2a82f8c..ed058701a17c51a3ec33c7801e21d9c9c2eb0787 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 eb4e70fa884c3007a341adc26ef04e945e154610..3e6dd0305c89e40e21dbb9b6ac73649e07ac76f5 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 2ee493873bbc26ad557a59a7a2119cca947aa5c1..048998ba678ed65f7c593f6c6e4a777db8f9a62a 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 482f76236dcf09eb95594028f4cfa44142906239..ed6aa77eb2d61ca3f7a5078499f43cc58f72e459 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 7eb6cd49a0fddc1a3a39f3663203afd693663ec4..cc954ea78173942632652dd87c23427b610148ec 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 ecb7294ffe80c333aa2f0b098f9120c20b2227a1..0205ffc00c9d9acde7e9c65737cf74f52392f5fc 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 6f69110701ec9a24ea401aae3138bb9511499d0c..e401a927892867ba33fb65741d5af00aa2d448e3 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 92ea74cfea9474f353a5cae644edfe3c066e96ca..633b68ca9ffa6374e120f90e0ffadc1625100009 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 5ee1a4ba9896b97f5c023ade4c70cac2bfd0dba4..c492851d42be2ffe899380c8f31392cfaf94fbf6 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 a7d2f46e19773f1aff575f67d33eaa0945c78928..b7a570012f200f569a18022bdb862159ac00bb17 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 a5df1494ae2e2d2ffa66af0438b3984ec369cad8..97f49358f4bff75edaff86c6e682f87041a5991f 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 4dab6134ee85f23d3dcb7e4751eb3934587e1a84..90d12a9ee050d77f95e3e574ad2a42fa2a58cfb2 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 9f5e86b8394214f77e5abef303d358fbe135c98f..2e403076facceb3684c225323e6f233b357c800c 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 d41676a668e2c79bcfb87e3ae514e4eaa4ac1fd0..3620328df6eadb04001d556d186ff636b29d7672 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 cffae432acaf5a70ee1ea23fddf1a62cf390c90d..3ec8c780c70c92e362b2837f32c56871331328c0 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 50059b4d34be36d986b0596305e1841608255ce5..190b96da5763c2618883c7a19ec26dd837a4a8dd 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 5fb91749faa9f014a79ca70514e89f8b1b19aadc..0c4d49acbc175c5ef6f6f3cb54b2ed5581a5fd38 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 a8ea8e9aaa01e0205f19930bd5b2afbdd257bc98..a81b3b3f83d38afd526a4d456ca6e62bb0e1b03b 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 61db6d3e7eacd0b3e55462a5bfaeb985b9a5139f..f0b676d128588efbf278e03d3e7f99393fdd2e23 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 ace6191e97cd5e251921ddd5c45714172d5c860c..5cff35235abfc6c634b2632b422d7ef7e1afe005 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 95b6f8add5c8d78b4f004bad4513d9c55ae8f951..77949c9c1390799d7ea15c9d0ded2db546060d89 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 ff2916161be65544924e3ac3e54574e07c020c4f..030600855c0e57e5349d63365ccb364c5cdcc23e 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 36497709a81adb08357828097578648ca7796adb..217477d099e4a40d13e4786fe547342279589cfd 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 33b0c0b01562d3a7e4034a8382d5fe5d48ccd2fe..922f78c20ccbcb8ce2f785d88f372e5a0b73da6c 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 93343cb25c3e505cb5ca796dbef08671ae09dfad..a2065d9d1143cea161dcf14f232992795cf499d4 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 c7481588cdc0637e97fc71330c39bc2b0afb0644..d1ed6c35b19fcdc432a0e1ef2c0f0db0479b02a7 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 5b64b0b7f1588193ce9e1063975ec2463c1ddfa1..033e82d1a5564c45a227ae1941a253f7f7e3d27d 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 4fde67b4cf029aea35d0e42a0c68f7878ddd2c5a..7b6ee5ed7bfa71fb5a1cf51993bd91896eec8cf6 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 0210698d5416d1147873f2ec49feb62630411b11..897ed365edd9781a643c3cb29b64dfe386d7e6ab 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 0000000000000000000000000000000000000000..65727367a7de4875a41a1511717e84cf8242a724 --- /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 d35ee40fcfc275c01cfb436aa35ba671f3849df8..cdf17a34baf18f949accfae46e1172a7cce59384 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 d633f8834d1f57937e9cf933e95cd1f58fea94fc..e92255771aa79cd2b2e2a98a854bae10f47a0c9f 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 68d5d0ac91a737adad5c76dd8621df5060088b66..197b18d031a38355eb9aa716c62d0741514d8c9b 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 1a957ce38aa8e411923145bb68658fe45b274ccb..539eda53269b5ac7316ea89a8163609581ec4f42 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 01b7c79c3143022bb761448ff43ebb68f89b84ea..b43508def37f66523fcb981b02515a7a1a568130 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 4823163cc72d1da52a2fe04b4ff81a9e21f7e5c5..ec532271cc5194306f777c5645e32e1ec6207afd 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 34a948a3da1cdc3af23e65a33fb25a6e74880cd3..3b2638ed37ce5d35394a48fb39b8f10674da182d 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 1d87de2405e686b88e08b68398db1bf10cce390f..79132af88eeb9b49444fe947ee50b4ea9e188318 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 d0940cf89ce381d35defb94ec6364fe1a0900554..01785d6db6ac56f5002a4014a0c8622b30089ce7 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 fc2208b909e614e7a9fbcd00872bdc53abfd854b..8e70a64ff12c85be42fc722b63042d4cc67589ad 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 fcd385da48e8b890497f013c8dceb85d66a98fb9..7bd94775b32dee1c47cedd763638311515f37c2f 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 f16555df5c3c7759631629c3e1b54d2ce7ad017e..d095e109ac87c746eff57c32c5fe4e8eee9f8239 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 1131b097a570454432613e00e47826958ea8645d..b51491b9dc147857dedca6bc811691baa756f115 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 79493e5e59cd4d689156f93f0bf7b6899995c13a..e75e71fcf73a9348d184fc2961c7858250b0c878 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 d73da44d5ece7a1d22b41f7a4c6a31df89c8416e..e0230934af89596e73964c6a026e53d5f6f1a922 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 1fde07db0041b69c904f9a3a69e8de91ac989668..83faeabffb877c56db4447540006a00566bbe1d2 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 17c43e5b7ae828a88ec6298c9fa85ba8ea280d5e..05cf10217f3faaf6a448618441d8f4bf56f32af9 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 8d6f06a1328f93e302ba02255a160041a0cb8afe..931bfb3e9532a2bfdc1e5bd2506928f4e51e5bed 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 ef52a71797bf5f970b1b2cb68fe286944ca25201..8496575d1f5f86ac351bf03796abc97211f4021e 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 3964d8eca2af8e213e7f0a9eafce500b1d468f88..38c4431e529f3f3fa8b37712ef97243f8d28b9f8 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 e3adf5be36593ac223fd6901bf1f699e1fe85878..b7669284f18ffb72d2e28f921d32b14321ec2ee5 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 23b1434332fde4304f7300342382c67d50aa23fb..5b4a1cbe89a22d8833c81fee88e5bc9aa3f05082 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 b38793601ee897a0a2bd061640404c87c520983f..553ff6dc9aa8fa9e54ab4c18545cc1825f7c2991 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 67ad0a13082d5d9e0ebdb6183d75c38b29ebc698..376fd4bdac3cc89583d17ef16bc16c82fd21b19b 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 2cc8848b8397a4d595b0cbaf21abceff506acfc6..b06a6740da27e9011756f4e75914948b0476a54e 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 e702dca8f9a9f55bdca26625bef0ed25e3196ab8..67c35f68ec96c622cd49713417f394b3a590ab6d 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 226c94b8ba36d936a1f2c64b03080a2c8588afcb..e273c38533e1f876295571c8579b31a5d082dadf 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 e4ebfb5458c6a9e03b50fc5b74310cd3c0570068..53a2bf7f737b42fe4c31d0ca445172f1e88d7ff7 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 f430196f82f6c0860f57883e548dc98ff10008db..a563940698f6f87158cac9bf5d4c272d2842854a 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 8058ebad8a9793f5c4e12ac936abcbdf7916315d..2b86e68ed6dd10de79081a9caade6c0ae612c985 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 cbb9acbfc2e276497971cb2fc9309358e7b897d9..b4f51634afdda10699f8f774910e3692dc6d075e 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 975d8dd0225c3da66cc7ec8311d8f4911f18bd7c..55ea4a5f35e51a9f040b09351d29f536e0aa3a07 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 e1d282eadbe8c7d87759d670f59acaa93702a1ab..a0fc73cc90d2983ace78bdb13f98e1769a714d48 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 7207c554aaa448ce6959521cbf213f98af43f9ce..44c668af269cb63ca0b177bc60ae981ed61c68fe 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 af181e9d903edc6a54fa0dbd7cc00bbdd3f1d82d..4e58c969f10f536f7047f56c933ad796c14a3d20 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 acc26b50dd09672c5086460d4b066611e2699ca6..3dafdc92e9fd34452d32d5aab64fb751ce8f2eab 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 c2c50adf086b918569d4496d47e541fc753da071..4ed3e1999b5be767123770d113d215c8bbe70b39 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 cfdd8ee47b6596a669fe2e422442a377d0bdcd9e..fa8c336308eebb007a8a0bfe7b39b8f48f231fb4 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 811fa0ca7da87b0f52304e12b8cb35e95b9ff07c..5428337cd443aefd530b3213c958f68d87de0757 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 f9ce9a33f9909d29b4d30778711965d91b92fd35..316de18eb2e6122ec317586a14798a49fc4c799f 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 94b155c2033748b14e54454cfcb4a32aded21255..8d0ce47e12591c070a77e145df8bc7ee7ced3265 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 2514ea5fac3424c45ddb0ab3c149a31a55327c6e..30e0ec0564a3f3123fb78311bb5dff7920775b7d 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 199f7bc6a133b6234030370cd97c94d6e2a305f3..dc375df8e78db14eac7e3297589200898a5e996c 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 3574fe5d254fba05fe650b321b2153320566f02d..25f5404e10c557e45d105bf370e080d8ca23c078 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 4517affbccccf19e2c2c135818ba6ba7e259123a..395499d7f296e7750709fc69b7dff6bd8bacb9db 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 5d67529319a9368cb7acf3027014073f8019eac8..e0bedce17f91fe35f3aee920c56b6e0531f21a4e 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 d83ad07da9310bb67bc272cdd15d133d143375da..4d5b50c4832e66bdb96b69b957a96dd81a7a0a4b 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 da220a99b4257ab0b3ffc391c8d30ed69ca68d69..ead4ea87b8e42350ac001c1a3178af4cbb476b12 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 4bb58c3bc11ad1e2065acafdbe11416fb04f7886..d90bf353eea1e2b52e278c0d464d3ab3c2092d98 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 2e805f62bfc355fde6a9b288761027640dd61325..8bf3b2bf026f28f72c76d0dfd2d3f20481e65cb5 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 599beb2fed29a438e4b8395257e7ddc8d5ac58d8..8cb5bfbcef554f9b1911c8a43070acf6228b5baf 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 043cd0d466d47eac8189824438d3acae91458172..4858491bd603d06cf936a57e87f05061856d502b 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 99033836c2008d8ba368bee86bc43f5314024e71..32b28c3c5c49efb73858a41c8cadd17a5090c75a 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 8d400437cfda22cf422099f578f9b850c72fe7af..7288f703b5f5df1be7839204ce2f0b2e7ab6b6b5 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 9957d9bc36d189348ac892de1b6dc5b99aebb3af..f6103066bc2d24a0f7f52c0064a9698ac385c788 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 a7ad659db10884507462c56fa1c7b77c3d6bd061..f11e472b3b73aa0751170492869b593dcddbb663 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 b3e84270062bfb30bb6ad48f4f83297dc646bc7a..94f79fe9af30800ca542c044230a882220f2b398 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 5288f136ed02f6b6e3febfeefe7adc7669aa9007..33a0391fa68f9ec82e393a80fc4948dd062ac576 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 3162beddae0ed0422afcc9f40da34148ade3778b..877741a0dd7d1030c7697ffb4258c29efc572c7c 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 ad1251762bbfab97ef43fad1e75b29c5bbc0b349..7be3859b56f3a3ebf08d3becc9987190fc328752 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 d3ef36e7f2eaf8a015d1119b903d2ccb23b57599..6d93c04757aa584f292f1523c5f0168ccc4d4a5e 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 745b1247372dbfeae96235a1d71cc05377a59018..b2a5d4f9ee086ee6b3000a6f6814f9f3c6532fd0 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 c372ee8d3a26202eedd1d56dff291af3414e99c3..3351ff0313b2a3ce73a2db62c12f2c524ce308ec 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 cd54e81e4125c9ab8d8a8a4f93e6bc99c5aa5d45..01c601861ed02ab6ba632550511872c67e991933 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 dd92f23bfdcaf369e015aa3f1b9de5135a7bc816..11002226b603233e917bd5d3759e9bd84d6cd101 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 816a0f51c05d9a3068534e3da8ad9c8d6032a651..bca40128e14055cb082e7e6f51e6f250a8c92a5b 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 7312701c166e3bde2233ade2632e41ab44fa38e1..0000000000000000000000000000000000000000 --- 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 96728a7dd63eea0387b29555a7e07af4275dffa4..fc6caca3428ea94eb298a64dbfa1dcf9cc439d10 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 0568864c856e94867a4fc3542150bd2f364feb81..c7ebe96ca37d7da3eec58c6c21e61e202ee94443 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 29f4b896742e13f0c099454be56ab261a2c85036..bbd6cb12bbf1ddce360ff39b296d52966d92ac8c 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 ee54800010f1b0f3cb9f6abaf9a7f8377b166c98..8d3e184f1991bb9abfad7c1d9e7ff1dc140f359e 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 c15eea881423fc91a5d392200ed5f5ab46e00115..fea91b20b2acd37cc50dba3a8be66558d7ef48dc 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():