vtkModelMirrorGUI.h

Go to the documentation of this file.
00001 #ifndef __vtkModelMirrorGUI_h
00002 #define __vtkModelMirrorGUI_h
00003 
00004 #include "vtkModelMirrorWin32Header.h"
00005 #include "vtkSlicerModuleGUI.h"
00006 
00007 #include "vtkMRMLScene.h"
00008 #include "vtkModelMirrorLogic.h"
00009 #include "vtkModelMirrorIcons.h"
00010 
00011 // Had to add this to force loading of these support libraries
00012 // Only libraries with entries that will be dynamically called from TCL need to be instantiated
00013 #include "vtkTcl.h"
00014 extern "C" int Vtkslicermodelmirrormodulelogic_Init(Tcl_Interp *interp);
00015 
00016 class vtkKWFrame;
00017 class vtkSlicerNodeSelectorWidget;
00018 class vtkSlicerModuleCollapsibleFrame;
00019 class vtkKWPushButton;
00020 class vtkKWEntry;
00021 
00022 class vtkIntArray;
00023 
00024 class VTK_MODELMIRROR_EXPORT vtkModelMirrorGUI : public vtkSlicerModuleGUI
00025 {
00026   public:
00027   static vtkModelMirrorGUI *New();
00028   vtkTypeMacro(vtkModelMirrorGUI,vtkSlicerModuleGUI);
00029   void PrintSelf(ostream& os, vtkIndent indent);
00030 
00031   // Description:
00032   // Set the logic pointer from parent class pointer.
00033   // Overloads implementation in vtkSlicerModulesGUI
00034   // to allow loadable modules.
00035   virtual void SetModuleLogic ( vtkSlicerLogic *logic )
00036   {
00037   this->SetLogic(reinterpret_cast<vtkModelMirrorLogic*> (logic)); 
00038   }
00039 
00040    // Description: Get/Set MRML node
00041   vtkGetObjectMacro (Logic, vtkModelMirrorLogic);
00042   vtkSetObjectMacro (Logic, vtkModelMirrorLogic);
00043 
00044   vtkGetObjectMacro ( SpecificationFrame, vtkSlicerModuleCollapsibleFrame );
00045   vtkSetObjectMacro ( SpecificationFrame, vtkSlicerModuleCollapsibleFrame );
00046 
00047   vtkGetObjectMacro ( ModelSelector, vtkSlicerNodeSelectorWidget );
00048   vtkGetObjectMacro ( ModelNameEntry, vtkKWEntry );
00049   vtkGetObjectMacro ( AxialMirrorButton, vtkKWPushButton );
00050   vtkGetObjectMacro ( SaggitalMirrorButton, vtkKWPushButton );
00051   vtkGetObjectMacro ( CoronalMirrorButton, vtkKWPushButton );
00052   vtkGetObjectMacro ( GoButton, vtkKWPushButton );
00053   vtkGetObjectMacro ( ModelMirrorIcons, vtkModelMirrorIcons );
00054 
00055   
00056   virtual void BuildGUI ( );
00057   //BTX
00058   using vtkSlicerComponentGUI::BuildGUI; 
00059   //ETX
00060   virtual void TearDownGUI ( );
00061 
00062   vtkIntArray *NewObservableEvents();
00063 
00064   // Description:
00065   // Add obsereves to GUI widgets
00066   virtual void AddGUIObservers ( );
00067 
00068   // Description:
00069   // Remove obsereves to GUI widgets
00070   virtual void RemoveGUIObservers ( );
00071   virtual void RemoveMRMLNodeObservers ( );
00072   virtual void RemoveLogicObservers ( );
00073   
00074   // Description:
00075   // Pprocess events generated by Logic
00076   virtual void ProcessLogicEvents(vtkObject *vtkNotUsed(caller),
00077                                  unsigned long vtkNotUsed(event),
00078                                   void *vtkNotUsed(callData)){};
00079 
00080   // Description:
00081   // Pprocess events generated by GUI widgets
00082   virtual void ProcessGUIEvents ( vtkObject *caller, unsigned long event,
00083                                   void *callData );
00084 
00085   // Description:
00086   // Pprocess events generated by MRML
00087   virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, 
00088                                   void *callData);
00089   // Description:
00090   // Describe behavior at module startup and exit.
00091   virtual void Enter ( );
00092   //BTX
00093   using vtkSlicerComponentGUI::Enter; 
00094   //ETX
00095   virtual void Exit ( );
00096   virtual void Init ( );
00097 
00098   // Description:
00099   // Get the categorization of the module.  The category is used for
00100   // grouping modules together into menus.
00101   const char *GetCategory() const {return "Surface Models";}
00102 
00103   void SetMirrorPlaneToAxial();
00104   void SetMirrorPlaneToSaggital();
00105   void SetMirrorPlaneToCoronal();
00106 
00107 
00108 protected:
00109   vtkModelMirrorGUI();
00110   ~vtkModelMirrorGUI();
00111   vtkModelMirrorGUI(const vtkModelMirrorGUI&);
00112   void operator=(const vtkModelMirrorGUI&);
00113 
00114   // Description:
00115   // Updates GUI widgets based on parameters values in MRML node
00116   void UpdateGUI();
00117 
00118   // Description:
00119   // updates status text in the slicer window.
00120   void SetSlicerText( const char *txt);
00121 
00122   vtkModelMirrorLogic *Logic;
00123   vtkSlicerModuleCollapsibleFrame *SpecificationFrame;
00124   vtkSlicerNodeSelectorWidget *ModelSelector;
00125   vtkKWEntry *ModelNameEntry;
00126   
00127   vtkKWPushButton *AxialMirrorButton;
00128   vtkKWPushButton *CoronalMirrorButton;
00129   vtkKWPushButton *SaggitalMirrorButton;
00130 
00131   vtkKWPushButton *GoButton;
00132   
00133   vtkModelMirrorIcons *ModelMirrorIcons;
00134   
00135   int UpdatingGUI;
00136   int UpdatingMRML;
00137 
00138  
00139   // Description:
00140   // This flag gets set when the module is entered,
00141   // and unset when the module is exited. It is used
00142   // to put observers on and off the MRML Scene.
00143   bool Raised;
00144 
00145 };
00146 
00147 #endif
00148 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1