vtkSlicerTractographyFiducialSeedingGUI.h

Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003   Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See Doc/copyright/copyright.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   3D Slicer
00009   Module:    $RCSfile: vtkSlicerTractographyFiducialSeedingGUI.h,v $
00010   Date:      $Date: 2006/03/19 17:12:29 $
00011   Version:   $Revision: 1.3 $
00012 
00013 =========================================================================auto=*/
00014 #ifndef __vtkSlicerTractographyFiducialSeedingGUI_h
00015 #define __vtkSlicerTractographyFiducialSeedingGUI_h
00016 
00017 #include "vtkSlicerBaseGUIWin32Header.h"
00018 #include "vtkSlicerModuleGUI.h"
00019 
00020 #include "vtkMRMLScene.h"
00021 #include "vtkMRMLTransformableNode.h"
00022 #include "vtkMRMLNode.h"
00023 
00024 #include "vtkSlicerTractographyFiducialSeeding.h"
00025 #include "vtkMRMLTractographyFiducialSeedingNode.h"
00026 
00027 // Had to add this to force loading of these support libraries
00028 // Only libraries with entries that will be dynamically called from TCL need to be instantiated
00029 #include "vtkTcl.h"
00030 extern "C" int Vtkslicertractographymodulelogic_Init(Tcl_Interp *interp);
00031 
00032 class vtkSlicerTractographyFiducialSeedingLogic;
00033 class vtkSlicerNodeSelectorWidget;
00034 class vtkKWFrame;
00035 class vtkKWCheckButton;
00036 class vtkKWMenuButtonWithLabel;
00037 class vtkKWScaleWithLabel;
00038 class vtkKWEntryWithLabel;
00039 class vtkKWPushButton;
00040 
00041 class VTK_FIDUCIALSEEDING_EXPORT vtkSlicerTractographyFiducialSeedingGUI : public vtkSlicerModuleGUI
00042 {
00043   public:
00044   static vtkSlicerTractographyFiducialSeedingGUI *New();
00045   vtkTypeMacro(vtkSlicerTractographyFiducialSeedingGUI, vtkSlicerModuleGUI);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00048   // Description: 
00049   // Get the categorization of the module.
00050   const char *GetCategory() const
00051       { return "Diffusion.Tractography"; }
00052 
00053   // Description:
00054   // Events that this module GUI will observe. CLIENT MUST DELETE!
00055   virtual vtkIntArray* NewObservableEvents();
00056 
00057   // Description:
00058   // Create widgets
00059   virtual void BuildGUI ( void );
00060   virtual void BuildGUI ( vtkKWFrame * f ) { this->Superclass::BuildGUI(f); }
00061   virtual void BuildGUI ( vtkKWFrame * f, double * bgColor ) { this->Superclass::BuildGUI(f,bgColor); }
00062 
00063   // Description:
00064   // Module initialization
00065   virtual void Init ( );
00066 
00067   // Description:
00068   // Add obsereves to GUI widgets
00069   virtual void AddGUIObservers ( );
00070   
00071   // Description:
00072   // Remove obsereves to GUI widgets
00073   virtual void RemoveGUIObservers ( );
00074   
00075   // Description:
00076   // Pprocess events generated by Logic
00077   virtual void ProcessLogicEvents ( vtkObject * vtkNotUsed(caller), 
00078     unsigned long vtkNotUsed(event), 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   virtual void Enter ( vtkMRMLNode* node ) { this->Superclass::Enter(node); }
00093   virtual void Exit ( ){};
00094 
00095   // Description:
00096   // set the logic for this GUI
00097   virtual void SetModuleLogic ( vtkSlicerLogic* );
00098   
00099   // Description:
00100   // Type of anisotropy used to stop tractography.
00101   vtkGetStringMacro(StoppingMode);
00102   vtkSetStringMacro(StoppingMode);
00103   
00104   // If StoppingMode criterion becomes smaller than this number,
00105   // tracking stops.
00106   vtkGetMacro(StoppingThreshold,vtkFloatingPointType);
00107   vtkSetMacro(StoppingThreshold,vtkFloatingPointType);
00108 
00109   // Show warning or not
00110   vtkBooleanMacro(OverwritePolyDataWarning, int);
00111   vtkGetMacro(OverwritePolyDataWarning, int);
00112   vtkSetMacro(OverwritePolyDataWarning, int);
00113 
00114    // Description:
00115   // Set / get the maximum length of the hyperstreamline expressed as absolute
00116   // distance (i.e., arc length) value.
00117   vtkSetClampMacro(MaximumPropagationDistance,double,0.0,VTK_DOUBLE_MAX);
00118   vtkGetMacro(MaximumPropagationDistance,double);
00119 
00120   // Description:
00121   // Create tracts from fiducuials
00122   void CreateTracts();
00123 
00124   void SetVolumeSelector(vtkMRMLNode *node);
00125   void SetFiducialSelector(vtkMRMLNode *node);
00126   void SetOutFiberSelector(vtkMRMLNode *node);
00127 
00128   // Description: Get/Set MRML node
00129   vtkGetObjectMacro (TractographyFiducialSeedingNode, vtkMRMLTractographyFiducialSeedingNode);
00130 
00131   void AddTransformableNodeObserver(vtkMRMLTransformableNode *n);
00132   
00133 protected:
00134   vtkSlicerTractographyFiducialSeedingGUI();
00135   virtual ~vtkSlicerTractographyFiducialSeedingGUI();
00136   vtkSlicerTractographyFiducialSeedingGUI(const vtkSlicerTractographyFiducialSeedingGUI&);
00137   void operator=(const vtkSlicerTractographyFiducialSeedingGUI&);
00138 
00139   // Description:
00140   // Updates GUI widgets based on parameters values in MRML node
00141   void UpdateGUI();
00142 
00143   // Description:
00144   // Updates parameters values in MRML node based on GUI widgets 
00145   void UpdateMRML();
00146 
00147   char* StoppingMode;
00148   vtkFloatingPointType StoppingThreshold;
00149   double MaximumPropagationDistance;
00150   
00151   int OverwritePolyDataWarning;
00152 
00153   vtkSlicerNodeSelectorWidget* VolumeSelector;
00154   vtkSlicerNodeSelectorWidget* FiducialSelector;
00155   vtkSlicerNodeSelectorWidget* OutFiberSelector;
00156   
00157   vtkKWMenuButtonWithLabel *StoppingModeMenu;
00158   vtkKWScaleWithLabel *StoppingValueScale;
00159   vtkKWScaleWithLabel *StoppingCurvatureScale;
00160   vtkKWScaleWithLabel *IntegrationStepLengthScale;
00161   vtkKWScaleWithLabel *MinimumPathLengthScale;
00162 
00163   vtkKWScaleWithLabel *RegionSizeScale;
00164   vtkKWScaleWithLabel *RegionSampleSizeScale;
00165   vtkKWEntryWithLabel *MaxNumberOfSeedsEntry;
00166 
00167   vtkKWPushButton *DisplayMenu;
00168 
00169   vtkKWCheckButton *SeedSelectedFiducialsButton;
00170   vtkKWCheckButton *SeedButton;
00171 
00172   vtkSlicerNodeSelectorWidget* TractographyFiducialSeedingNodeSelector;
00173 
00174 
00175   vtkMRMLTransformableNode* TransformableNode;
00176   vtkMRMLTractographyFiducialSeedingNode *TractographyFiducialSeedingNode;
00177 
00178   int UpdatingMRML;
00179   int UpdatingGUI;
00180 
00181   vtkSlicerTractographyFiducialSeedingLogic *ModuleLogic;
00182 };
00183 
00184 #endif
00185 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1