vtkNeuroNavGUI.h

Go to the documentation of this file.
00001 // .NAME vtkNeuroNavGUI 
00002 // .SECTION Description
00003 // Main Volumes GUI and mediator methods for slicer3. 
00004 
00005 
00006 #ifndef __vtkNeuroNavGUI_h
00007 #define __vtkNeuroNavGUI_h
00008 
00009 
00010 #ifdef WIN32
00011 #include "vtkNeuroNavWin32Header.h"
00012 #endif
00013 
00014 #include "vtkSlicerModuleGUI.h"
00015 #include "vtkNeuroNavLogic.h"
00016 
00017 #include "vtkIGTDataManager.h"
00018 #include "vtkCallbackCommand.h"
00019 #include "vtkSlicerInteractorStyle.h"
00020 
00021 
00022 #include <string>
00023 
00024 class vtkKWPushButton;
00025 class vtkKWEntryWithLabel;
00026 class vtkKWMenuButtonWithLabel;
00027 class vtkKWMenuButton;
00028 class vtkKWCheckButton;
00029 class vtkKWScaleWithEntry;
00030 class vtkKWEntry;
00031 class vtkKWFrame;
00032 class vtkKWEntryWithLabel;
00033 class vtkKWLoadSaveButtonWithLabel;
00034 class vtkKWMultiColumnListWithScrollbars;
00035 class vtkSlicerNodeSelectorWidget;
00036 class vtkMRMLScalarVolumeNode;
00037 
00038 // Description:    
00039 // This class implements Slicer's Volumes GUI.
00040 //
00041 class VTK_NEURONAV_EXPORT vtkNeuroNavGUI : public vtkSlicerModuleGUI
00042 {
00043 public:
00044 
00045   // Description:    
00046   // Usual vtk class functions
00047   static vtkNeuroNavGUI* New (  );
00048   vtkTypeRevisionMacro ( vtkNeuroNavGUI, vtkSlicerModuleGUI );
00049   void PrintSelf (ostream& os, vtkIndent indent );
00050 
00051   // Description: 
00052   // Get the categorization of the module.
00053   const char *GetCategory() const { return "IGT"; }
00054 
00055   vtkGetMacro(ShowCrosshair, bool);
00056   vtkSetMacro(ShowCrosshair, bool);
00057 
00058   vtkGetMacro(LabelMapLoaded, bool);
00059   vtkSetMacro(LabelMapLoaded, bool);
00060 
00061   vtkGetMacro(LabelDetectionRunning, bool);
00062   vtkSetMacro(LabelDetectionRunning, bool);
00063   
00064 
00065   // Description:    
00066   // Get methods on class members (no Set methods required)
00067   vtkGetObjectMacro ( Logic, vtkNeuroNavLogic );
00068 
00069   // Description:
00070   // API for setting VolumeNode, VolumeLogic and
00071   // for both setting and observing them.
00072   void SetModuleLogic ( vtkSlicerLogic *logic )
00073     { this->SetLogic ( vtkObjectPointer (&this->Logic), logic ); }
00074   //void SetAndObserveModuleLogic ( vtkNeuroNavLogic *logic )
00075   //    { this->SetAndObserveLogic ( vtkObjectPointer (&this->Logic), logic ); }
00076 
00077   // Description:    
00078   // This method builds the IGTDemo module GUI
00079   virtual void BuildGUI ( );
00080 
00081   // Description:
00082   // Add/Remove observers on widgets in the GUI
00083   virtual void AddGUIObservers();
00084   virtual void RemoveGUIObservers();
00085 
00086 
00087   // Description:
00088   // Class's mediator methods for processing events invoked by
00089   // either the Logic, MRML or GUI.    
00090   virtual void ProcessLogicEvents ( vtkObject *caller, unsigned long event, void *callData );
00091   virtual void ProcessGUIEvents ( vtkObject *caller, unsigned long event, void *callData );
00092   virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData );
00093   void ProcessTimerEvents();
00094 
00095   void HandleMouseEvent(vtkSlicerInteractorStyle *style);
00096 
00097 
00098   // Description:
00099   // Describe behavior at module startup and exit.
00100   virtual void Enter ( );
00101   virtual void Exit ( );
00102 
00103   //BTX
00104   static void DataCallback(vtkObject *caller, 
00105                            unsigned long eid, void *clientData, void *callData);
00106 
00107   //ETX
00108   void TransformChangedCallback(double);
00109   void TransformChangingCallback(double);
00110 
00111 protected:
00112   vtkNeuroNavGUI ( );
00113   virtual ~vtkNeuroNavGUI ( );
00114 
00115   vtkKWCheckButton *LocatorCheckButton;
00116   vtkKWCheckButton *CrosshairCheckButton;
00117   vtkKWCheckButton *TractographyCheckButton;
00118   vtkKWCheckButton *HandleCheckButton;
00119   vtkKWCheckButton *GuideCheckButton;
00120 
00121   vtkKWCheckButton *LocatorModeCheckButton;
00122   vtkKWCheckButton *UserModeCheckButton;
00123   vtkKWCheckButton *FreezeCheckButton;
00124   vtkKWCheckButton *ObliqueCheckButton;
00125 
00126   vtkKWMenuButton *RedSliceMenu;
00127   vtkKWMenuButton *YellowSliceMenu;
00128   vtkKWMenuButton *GreenSliceMenu;
00129 
00130   //  vtkKWEntryWithLabel *TransformNodeNameEntry;
00131   vtkSlicerNodeSelectorWidget* TransformNodeNameEntry; 
00132   vtkSlicerNodeSelectorWidget* LabelMapSelector; 
00133   vtkKWEntryWithLabel *LabelMapNumberEntry;
00134   vtkKWPushButton* StartBeepingButton; 
00135   vtkKWPushButton* StopBeepingButton;
00136   vtkKWEntryWithLabel *FiducialListNodeNameEntry;
00137   vtkMRMLScalarVolumeNode *LabelMapNode;
00138 
00139   vtkKWEntryWithLabel *PatCoordinatesEntry;
00140   vtkKWEntryWithLabel *SlicerCoordinatesEntry;
00141   vtkKWPushButton *GetPatCoordinatesPushButton;
00142   vtkKWPushButton *AddPointPairPushButton;
00143 
00144   vtkKWMultiColumnListWithScrollbars *PointPairMultiColumnList;
00145 
00146  //    vtkKWPushButton *LoadPointPairPushButton;
00147  //    vtkKWPushButton *SavePointPairPushButton;
00148   vtkKWPushButton *DeletePointPairPushButton;
00149   vtkKWPushButton *DeleteAllPointPairPushButton;    
00150   vtkKWPushButton *RegisterPushButton;
00151   vtkKWPushButton *ResetPushButton;
00152 
00153 
00154   // Module logic and mrml pointers
00155   vtkNeuroNavLogic *Logic;
00156 
00157   vtkKWScaleWithEntry *TranslationScale;
00158 
00159 private:
00160   vtkNeuroNavGUI ( const vtkNeuroNavGUI& ); // Not implemented.
00161   void operator = ( const vtkNeuroNavGUI& ); //Not implemented.
00162 
00163   void BuildGUIForTrackingFrame ();
00164   void BuildGUIForRegistrationFrame ();
00165   void BuildGUIForHelpFrame ();
00166 
00167   void TrackerLoop();
00168 
00169   bool CloseScene;
00170   int TimerFlag;
00171   int TimerInterval;
00172   bool ShowCrosshair;
00173   bool LabelMapLoaded;
00174   bool LabelDetectionRunning;
00175 };
00176 
00177 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1