00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWVolumeMaterialPropertyWidget.h,v $ 00004 00005 Copyright (c) Kitware, Inc. 00006 All rights reserved. 00007 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00022 #ifndef __vtkKWVolumeMaterialPropertyWidget_h 00023 #define __vtkKWVolumeMaterialPropertyWidget_h 00024 00025 #include "vtkKWMaterialPropertyWidget.h" 00026 00027 class vtkKWCheckButtonWithLabel; 00028 class vtkKWScalarComponentSelectionWidget; 00029 class vtkVolumeProperty; 00030 00031 class KWWidgets_EXPORT vtkKWVolumeMaterialPropertyWidget : public vtkKWMaterialPropertyWidget 00032 { 00033 // @cond section_public 00034 public: 00035 static vtkKWVolumeMaterialPropertyWidget *New(); 00036 vtkTypeRevisionMacro(vtkKWVolumeMaterialPropertyWidget, vtkKWMaterialPropertyWidget); 00037 void PrintSelf(ostream& os, vtkIndent indent); 00038 00040 00041 virtual void SetVolumeProperty(vtkVolumeProperty *prop); 00042 vtkGetObjectMacro(VolumeProperty, vtkVolumeProperty); 00044 00046 00047 virtual void SetSelectedComponent(int); 00048 vtkGetMacro(SelectedComponent, int); 00049 vtkGetObjectMacro(ComponentSelectionWidget, 00050 vtkKWScalarComponentSelectionWidget); 00052 00054 00055 virtual void SetNumberOfComponents(int); 00056 vtkGetMacro(NumberOfComponents, int); 00058 00060 00061 virtual void SetAllowEnableShading(int); 00062 vtkBooleanMacro(AllowEnableShading, int); 00063 vtkGetMacro(AllowEnableShading, int); 00065 00068 virtual void Update(); 00069 00076 virtual void UpdateEnableState(); 00077 00079 00080 virtual void EnableShadingCallback(int state); 00081 virtual void SelectedComponentCallback(int); 00083 00084 // @endcond 00085 // @cond section_protected 00086 protected: 00087 vtkKWVolumeMaterialPropertyWidget(); 00088 ~vtkKWVolumeMaterialPropertyWidget(); 00089 00091 virtual void CreateWidget(); 00092 00093 vtkVolumeProperty *VolumeProperty; 00094 00095 int SelectedComponent; 00096 int NumberOfComponents; 00097 int AllowEnableShading; 00098 00099 // UI 00100 00101 vtkKWScalarComponentSelectionWidget *ComponentSelectionWidget; 00102 vtkKWCheckButtonWithLabel *EnableShadingCheckButton; 00103 00105 virtual void Pack(); 00106 00108 00110 virtual int UpdatePropertyFromInterface(); 00111 virtual int UpdatePropertyFromPreset(const Preset *preset); 00113 00115 virtual void SendStateEvent(int event); 00116 00118 virtual int AreControlsEnabled(); 00119 00120 // @endcond 00121 // @cond section_private 00122 private: 00123 vtkKWVolumeMaterialPropertyWidget(const vtkKWVolumeMaterialPropertyWidget&); //Not implemented 00124 void operator=(const vtkKWVolumeMaterialPropertyWidget&); //Not implemented 00125 }; 00126 00127 #endif 00128 // @endcond
1.6.1