VTK
dox/Rendering/OpenGL/vtkLineIntegralConvolution2D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkLineIntegralConvolution2D.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 =========================================================================*/
00078 #ifndef __vtkLineIntegralConvolution2D_h
00079 #define __vtkLineIntegralConvolution2D_h
00080 
00081 #include "vtkRenderingOpenGLModule.h" // For export macro
00082 #include "vtkObject.h"
00083 
00084 class vtkRenderWindow;
00085 class vtkTextureObject;
00086 
00087 class VTKRENDERINGOPENGL_EXPORT vtkLineIntegralConvolution2D : public vtkObject
00088 {
00089 public:
00090 
00091   static vtkLineIntegralConvolution2D * New();
00092   vtkTypeMacro( vtkLineIntegralConvolution2D, vtkObject );
00093   void PrintSelf( ostream & os, vtkIndent indent );
00094 
00096 
00102   vtkSetMacro( EnhancedLIC, int );
00103   vtkGetMacro( EnhancedLIC, int );
00104   vtkBooleanMacro( EnhancedLIC, int );
00106 
00108 
00110   vtkSetMacro( LICForSurface, int );
00111   vtkGetMacro( LICForSurface, int );
00112   vtkBooleanMacro( LICForSurface, int );
00114 
00116 
00118   vtkSetMacro( NumberOfSteps, int );
00119   vtkGetMacro( NumberOfSteps, int );
00121 
00123 
00129   vtkSetClampMacro( LICStepSize, double, 0.0, 1.0 );
00130   vtkGetMacro( LICStepSize, double );
00132 
00134 
00135   void SetNoise( vtkTextureObject * noise );
00136   vtkGetObjectMacro( Noise, vtkTextureObject );
00138 
00140 
00141   void SetVectorField( vtkTextureObject * vectorField );
00142   vtkGetObjectMacro( VectorField, vtkTextureObject );
00144 
00146 
00149   vtkSetVector2Macro( ComponentIds, int );
00150   vtkGetVector2Macro( ComponentIds, int );
00152 
00154 
00161   vtkSetVector2Macro( GridSpacings, double );
00162   vtkGetVector2Macro( GridSpacings, double );
00164 
00166 
00170   vtkSetClampMacro( TransformVectors, int, 0, 1 );
00171   vtkBooleanMacro( TransformVectors, int );
00172   vtkGetMacro( TransformVectors, int );
00174 
00176 
00177   vtkSetClampMacro( Magnification, int, 1, VTK_INT_MAX );
00178   vtkGetMacro( Magnification, int );
00180 
00182 
00185   void SetVectorShiftScale( double shift, double scale )
00186     {
00187     this->VectorShift = shift;
00188     this->VectorScale = scale;
00189     this->Modified();
00190     }
00192 
00194   static bool IsSupported( vtkRenderWindow * renWin );
00195 
00197   int Execute();
00198 
00200 
00204   int Execute( unsigned int extent[4] );
00205   int Execute( int extent[4] );
00207 
00209 
00210   void SetLIC( vtkTextureObject * lic );
00211   vtkGetObjectMacro( LIC, vtkTextureObject );
00213 
00214 protected:
00215    vtkLineIntegralConvolution2D();
00216   ~vtkLineIntegralConvolution2D();
00217 
00218   int     Magnification;
00219   int     NumberOfSteps;
00220   int     LICForSurface;
00221   int     EnhancedLIC;
00222   double  LICStepSize;
00223   double  VectorShift;
00224   double  VectorScale;
00225 
00226   int     TransformVectors;
00227   int     ComponentIds[2];
00228   double  GridSpacings[2];
00229 
00230   vtkTextureObject * VectorField;
00231   vtkTextureObject * Noise;
00232   vtkTextureObject * LIC;
00233 
00234 private:
00235   vtkLineIntegralConvolution2D( const vtkLineIntegralConvolution2D & ); // Not implemented.
00236   void operator = ( const vtkLineIntegralConvolution2D & );             // Not implemented.
00237 //ETX
00238 };
00239 
00240 #endif