InteractiveMasking.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef SYNTHESIS_INTERACTIVEMASKING_H
00029 #define SYNTHESIS_INTERACTIVEMASKING_H
00030 #include <casa/Logging/LogIO.h>
00031 #include <casa/Logging/LogMessage.h>
00032
00033 #include <casadbus/viewer/ViewerProxy.h>
00034 #include <casadbus/plotserver/PlotServerProxy.h>
00035 #include <casadbus/utilities/BusAccess.h>
00036 #include <casadbus/session/DBusSession.h>
00037
00038 namespace casa {
00039 Bool clone(const String& imageName, const String& newImageName);
00040 class ViewerProxy;
00041
00042 class new_interactive_clean_callback
00043 {
00044 public:
00045 new_interactive_clean_callback( ) { }
00046 casa::dbus::variant result( ) { return casa::dbus::toVariant(result_); }
00047 bool callback( const DBus::Message & msg );
00048 private:
00049 DBus::Variant result_;
00050 };
00051
00052 class InteractiveMasking
00053 {
00054 public:
00055 InteractiveMasking() :
00056 viewer_p(0), clean_panel_p(0), image_id_p(0), mask_id_p(0),
00057 prev_image_id_p(0), prev_mask_id_p(0)
00058 {};
00059
00060 ~InteractiveMasking()
00061 {
00062 if ( viewer_p )
00063 {
00064
00065 viewer_p->done();
00066 delete viewer_p;
00067 }
00068 };
00069
00070
00071
00072
00073
00074 Int interactivemask(const String& image, const String& mask,
00075 Int& niter, Int& cycleniter, String& thresh, String& cyclethresh,
00076 const Bool forceReload=False);
00077 private:
00078 ViewerProxy *viewer_p;
00079 int clean_panel_p;
00080 int image_id_p;
00081 int mask_id_p;
00082 int prev_image_id_p;
00083 int prev_mask_id_p;
00084 };
00085
00086 }
00087
00088 #endif