00001 //============================================================================= 00002 // This file is part of VTKEdge. See vtkedge.org for more information. 00003 // 00004 // Copyright (c) 2010 Kitware, Inc. 00005 // 00006 // VTKEdge may be used under the terms of the BSD License 00007 // Please see the file Copyright.txt in the root directory of 00008 // VTKEdge for further information. 00009 // 00010 // Alternatively, you may see: 00011 // 00012 // http://www.vtkedge.org/vtkedge/project/license.html 00013 // 00014 // 00015 // For custom extensions, consulting services, or training for 00016 // this or any other Kitware supported open source project, please 00017 // contact Kitware at sales@kitware.com. 00018 // 00019 // 00020 //============================================================================= 00021 00022 #ifndef __vtkKWEPaintbrushRepresentationGrayscale2D_h 00023 #define __vtkKWEPaintbrushRepresentationGrayscale2D_h 00024 00025 #include "vtkKWEPaintbrushRepresentation2D.h" 00026 00027 class vtkActorCollection; 00028 class vtkMapperCollection; 00029 class vtkContourFilter; 00030 class vtkCollection; 00031 class vtkKWEPaintbrushSketch; 00032 00033 class VTKEdge_WIDGETS_EXPORT vtkKWEPaintbrushRepresentationGrayscale2D 00034 : public vtkKWEPaintbrushRepresentation2D 00035 { 00036 public: 00037 // Description: 00038 // Instantiate this class. 00039 static vtkKWEPaintbrushRepresentationGrayscale2D *New(); 00040 00041 // Description: 00042 // Standard VTK methods. 00043 vtkTypeRevisionMacro(vtkKWEPaintbrushRepresentationGrayscale2D, 00044 vtkKWEPaintbrushRepresentation2D); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00047 // Description: 00048 // These are methods that satisfy vtkWidgetRepresentation's API. 00049 virtual void BuildRepresentation(); 00050 00051 // Description: 00052 // Methods required by vtkProp superclass. 00053 virtual int RenderOverlay(vtkViewport *viewport); 00054 virtual int RenderOpaqueGeometry(vtkViewport *viewport); 00055 #if VTKEdge_VTK_VERSION_DATE > 20070305 00056 virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport); 00057 virtual int HasTranslucentPolygonalGeometry(); 00058 #else 00059 // Legacy method to support VTK source versions prior to 2007/03/05 00060 virtual int RenderTranslucentGeometry(vtkViewport *viewport); 00061 #endif 00062 00063 // Description: 00064 // Get the actors maintained by the representation, that need to be rendered. 00065 virtual void GetActors(vtkPropCollection *); 00066 00067 // Description: 00068 // Set/Get the isovalue for contours on the grayscale brush data 00069 vtkSetMacro( IsoValue, double ); 00070 vtkGetMacro( IsoValue, double ); 00071 00072 // Description: 00073 // See superclass documentation 00074 virtual void SetPaintbrushDrawing( vtkKWEPaintbrushDrawing * ); 00075 00076 // Descirption: 00077 // Deep copy.. synchronizes states etc.. 00078 virtual void DeepCopy(vtkWidgetRepresentation *r); 00079 00080 // Description: 00081 // INTERNAL - Do not use 00082 virtual void InstallPipeline() {} 00083 virtual void UnInstallPipeline() {} 00084 00085 protected: 00086 vtkKWEPaintbrushRepresentationGrayscale2D(); 00087 ~vtkKWEPaintbrushRepresentationGrayscale2D(); 00088 00089 double IsoValue; 00090 vtkCollection * ContourFilters; 00091 vtkMapperCollection * ContourPolyDataMappers; 00092 vtkActorCollection * ContourPolyDataActors; 00093 vtkCollection * ExtractComponents; 00094 vtkCollection * ImageClips; 00095 00096 private: 00097 vtkKWEPaintbrushRepresentationGrayscale2D( 00098 const vtkKWEPaintbrushRepresentationGrayscale2D&); //Not implemented 00099 void operator=(const vtkKWEPaintbrushRepresentationGrayscale2D&); //Not implemented 00100 00101 // Given an actor, it finds the sketch that its a rendition of. 00102 vtkKWEPaintbrushSketch * GetSketch( vtkActor * ); 00103 }; 00104 00105 #endif 00106
1.7.1