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: vtkSlicerNodeSelectorWidget.h,v $ 00010 Date: $Date: 2006/01/08 04:48:05 $ 00011 Version: $Revision: 1.45 $ 00012 00013 =========================================================================auto=*/ 00014 00015 // .NAME vtkSlicerFiberBundleDisplayWidget - GUI for setting parameters of a 00016 // vtkMRMLFiberBundleDisplayNode 00017 // .SECTION Description 00018 // 00019 00020 00021 #ifndef __vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget_h 00022 #define __vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget_h 00023 00024 #include "vtkVolumes.h" 00025 #include "vtkSmartPointer.h" 00026 00027 #include "vtkSlicerWidget.h" 00028 00029 #include "vtkSlicerNodeSelectorWidget.h" 00030 #include "vtkSlicerDiffusionTensorGlyphDisplayWidget.h" 00031 00032 #include "vtkKWCheckButtonWithLabel.h" 00033 #include "vtkKWScaleWithLabel.h" 00034 #include "vtkKWRange.h" 00035 #include "vtkKWChangeColorButton.h" 00036 #include "vtkKWMenuButtonWithLabel.h" 00037 #include "vtkKWFrameWithLabel.h" 00038 #include "vtkKWEntry.h" 00039 00040 #include "vtkMRMLDiffusionTensorVolumeNode.h" 00041 #include "vtkMRMLDiffusionTensorVolumeSliceDisplayNode.h" 00042 00043 00044 class VTK_VOLUMES_EXPORT vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget : public vtkSlicerWidget 00045 { 00046 00047 public: 00048 static vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget* New(); 00049 vtkTypeRevisionMacro(vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget,vtkSlicerWidget); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00052 // Description: 00053 // Set FiberBundleDisplayNode currently active in this GUI. 00054 // Internally this method sets the FiberBundleNodeID and FiberBundleDisplayNodeID, 00055 // and sets up observers. 00056 void SetDiffusionTensorVolumeNode ( vtkMRMLDiffusionTensorVolumeNode *node ); 00057 00058 // Description: 00059 // alternative method to propagate events generated in GUI to logic / mrml 00060 virtual void ProcessWidgetEvents ( vtkObject *caller, unsigned long event, void *callData ); 00061 00062 // Description: 00063 // alternative method to propagate events generated in GUI to logic / mrml 00064 virtual void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ); 00065 00066 protected: 00067 vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget(); 00068 virtual ~vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget(); 00069 00070 // Description: 00071 // add observers on display node 00072 virtual void AddMRMLObservers ( ); 00073 00074 // Description: 00075 // remove observers on display node 00076 virtual void RemoveMRMLObservers ( ); 00077 00078 // Description: 00079 // removes observers on widgets in the class 00080 virtual void RemoveWidgetObservers ( ); 00081 00082 // Description: 00083 // Create the widget. 00084 virtual void CreateWidget(); 00085 00086 // Description: 00087 // Update the widget's values to correspond to the MRML display node. 00088 void UpdateWidget(); 00089 00090 // Description: 00091 // Update the display node's values to correspond to the widget 00092 void UpdateMRML(); 00093 00094 // Description: 00095 // All of the widgets used in this widget 00096 vtkKWCheckButtonWithLabel *VisibilityButton[3]; 00097 vtkKWMenuButtonWithLabel *GeometryColorMenu; 00098 vtkSlicerNodeSelectorWidget *ColorSelectorWidget; 00099 vtkKWScaleWithLabel *OpacityScale; 00100 00101 vtkKWMenuButtonWithLabel *AutoScalarRangeMenu; 00102 vtkKWRange *ScalarRange; 00103 vtkKWEntry *MinRangeEntry; 00104 vtkKWEntry *MaxRangeEntry; 00105 00106 vtkSlicerDiffusionTensorGlyphDisplayWidget *GlyphDisplayWidget; 00107 00108 vtkKWFrameWithLabel *DisplayFrame; 00109 00110 00111 int UpdatingMRML; 00112 int UpdatingWidget; 00113 00114 00115 vtkMRMLDiffusionTensorVolumeNode *DiffusionTensorVolumeNode; 00116 00117 vtkMRMLDiffusionTensorDisplayPropertiesNode* GetCurrentDiffusionTensorDisplayPropertyNode(); 00118 00119 //BTX 00120 std::map <std::string, int> GeometryColorMap; 00121 std::vector< vtkSmartPointer< vtkMRMLDiffusionTensorVolumeSliceDisplayNode > > GlyphDisplayNodes; 00122 //ETX 00123 00124 private: 00125 00126 00127 vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget(const vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget&); // Not implemented 00128 void operator=(const vtkSlicerDiffusionTensorVolumeGlyphDisplayWidget&); // Not Implemented 00129 }; 00130 00131 #endif 00132
1.6.1