Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

curvature_ui.H

Go to the documentation of this file.
00001 #ifndef CURVATURE_UI_H_IS_INCLUDED
00002 #define CURVATURE_UI_H_IS_INCLUDED
00003 
00004 /*!
00005  *  \file curvature_ui.H
00006  *  \brief Contains the definitions of classes for the UI for manipulating
00007  *  curvature related gTextures (i.e. LineDrawingTexture, CurvatureTexture, etc.).
00008  *
00009  *  \sa curvature_ui.C
00010  *
00011  */
00012 
00013 #include <vector>
00014 #include <map>
00015 
00016 #include "std/hash.H"
00017 #include "disp/view.H"
00018 
00019 class CurvatureUI;
00020 
00021 /*!
00022  *  \brief Singleton class that provides a single, global access point for all
00023  *  CurvatureUI's.
00024  *
00025  */
00026 class CurvatureUISingleton {
00027    
00028    public:
00029    
00030       //! \brief Get the instance of the singleton.
00031       inline static CurvatureUISingleton &Instance();
00032       
00033       //! \brief Is the CurvatureUI for the given VIEW visible?
00034       bool is_vis(CVIEWptr& v);
00035       
00036       //! \brief Show the CurvatureUI for the given VIEW if it is not already
00037       //! shown.
00038       bool show(CVIEWptr& v);
00039       //! \brief Hide the CurvatureUI for the given VIEW if it is currently shown.
00040       bool hide(CVIEWptr& v);
00041       
00042       //! \brief Update the CurvatureUI for the given VIEW.
00043       bool update(CVIEWptr& v);
00044       
00045       float sc_thresh()
00046          { return _sc_thresh; }
00047       
00048       bool line_drawing_draw_contours()
00049          { return _line_drawing_draw_contours != 0; }
00050       bool line_drawing_draw_sugcontours()
00051          { return _line_drawing_draw_sugcontours != 0; }
00052       bool line_drawing_draw_color()
00053           { return _line_drawing_draw_color != 0; }
00054       
00055       bool curvature_draw_gaussian_curv()
00056          { return _curvature_draw_gaussian_curv != 0; }
00057       int curvature_gaussian_filter()
00058          { return _curvature_gaussian_filter; }
00059       bool curvature_draw_mean_curv()
00060          { return _curvature_draw_mean_curv != 0; }
00061       int curvature_mean_filter()
00062          { return _curvature_mean_filter; }
00063       bool curvature_draw_radial_curv()
00064          { return _curvature_draw_radial_curv != 0; }
00065       int curvature_radial_filter()
00066          { return _curvature_radial_filter; }
00067    
00068    private:
00069    
00070       float _sc_thresh;
00071       int _line_drawing_draw_contours;
00072       int _line_drawing_draw_sugcontours;
00073       int _line_drawing_draw_color;
00074       int _curvature_draw_gaussian_curv;
00075       int _curvature_draw_mean_curv;
00076       int _curvature_draw_radial_curv;
00077       int _curvature_gaussian_filter;
00078       int _curvature_mean_filter;
00079       int _curvature_radial_filter;
00080    
00081       //! \brief Get the CurvatureUI for the given VIEW.
00082       CurvatureUI *fetch(CVIEWptr& v);
00083       
00084       typedef std::map<VIEWimpl*, CurvatureUI*> view2ui_map_t;
00085       view2ui_map_t view2ui_map;
00086    
00087       CurvatureUISingleton();
00088       CurvatureUISingleton(const CurvatureUISingleton &);
00089       
00090       ~CurvatureUISingleton();
00091       
00092       CurvatureUISingleton &operator=(const CurvatureUISingleton &);
00093       
00094       friend class CurvatureUI;
00095    
00096 };
00097 
00098 inline CurvatureUISingleton&
00099 CurvatureUISingleton::Instance()
00100 {
00101    
00102    static CurvatureUISingleton instance;
00103    return instance;
00104    
00105 }
00106 
00107 #endif // CURVATURE_UI_H_IS_INCLUDED

Generated on Mon Sep 18 11:39:29 2006 for jot by  doxygen 1.4.4