VTK
dox/Interaction/Widgets/vtkLogoRepresentation.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkLogoRepresentation.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00031 #ifndef __vtkLogoRepresentation_h
00032 #define __vtkLogoRepresentation_h
00033 
00034 #include "vtkInteractionWidgetsModule.h" // For export macro
00035 #include "vtkBorderRepresentation.h"
00036 
00037 class vtkImageData;
00038 class vtkImageProperty;
00039 class vtkTexture;
00040 class vtkPolyData;
00041 class vtkPoionts;
00042 class vtkPolyDataMapper2D;
00043 class vtkActor2D;
00044 class vtkProperty2D;
00045 
00046 
00047 class VTKINTERACTIONWIDGETS_EXPORT vtkLogoRepresentation : public vtkBorderRepresentation
00048 {
00049 public:
00051   static vtkLogoRepresentation *New();
00052 
00054 
00055   vtkTypeMacro(vtkLogoRepresentation,vtkBorderRepresentation);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00061   virtual void SetImage(vtkImageData *img);
00062   vtkGetObjectMacro(Image,vtkImageData);
00064 
00066 
00067   virtual void SetImageProperty(vtkProperty2D *p);
00068   vtkGetObjectMacro(ImageProperty,vtkProperty2D);
00070 
00072   virtual void BuildRepresentation();
00073 
00075 
00077   virtual void GetActors2D(vtkPropCollection *pc);
00078   virtual void ReleaseGraphicsResources(vtkWindow*);
00079   virtual int RenderOverlay(vtkViewport*);
00081 
00082 protected:
00083   vtkLogoRepresentation();
00084   ~vtkLogoRepresentation();
00085 
00086   // data members
00087   vtkImageData  *Image;
00088   vtkProperty2D *ImageProperty;
00089 
00090   // Represent the image
00091   vtkTexture          *Texture;
00092   vtkPoints           *TexturePoints;
00093   vtkPolyData         *TexturePolyData;
00094   vtkPolyDataMapper2D *TextureMapper;
00095   vtkActor2D          *TextureActor;
00096 
00097   // Helper methods
00098   void AdjustImageSize(double o[2], double borderSize[2], double imageSize[2]);
00099 
00100 private:
00101   vtkLogoRepresentation(const vtkLogoRepresentation&);  //Not implemented
00102   void operator=(const vtkLogoRepresentation&);  //Not implemented
00103 };
00104 
00105 #endif