VTK
dox/Graphics/vtkJavaProgrammableFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkJavaProgrammableFilter.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 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00020 //
00058 #ifndef __vtkJavaProgrammableFilter_h
00059 #define __vtkJavaProgrammableFilter_h
00060 
00061 #include "vtkAlgorithm.h"
00062 
00063 class vtkJavaProgrammableFilterInternals;
00064 class vtkJVMManager;
00065 
00066 class VTK_GRAPHICS_JAVA_EXPORT vtkJavaProgrammableFilter : public vtkAlgorithm
00067 {
00068 public:
00069   static vtkJavaProgrammableFilter* New();
00070   vtkTypeMacro(vtkJavaProgrammableFilter, vtkAlgorithm);
00071   void PrintSelf(ostream& os, vtkIndent indent);
00072 
00074 
00076   void SetParameter(const char* name, int value);
00077   void SetParameter(const char* name, double value);
00078   void SetParameter(const char* name, const char* value);
00079   int GetIntParameter(const char* name);
00080   double GetDoubleParameter(const char* name);
00081   const char* GetStringParameter(const char* name);
00083   
00085 
00088   virtual void SetJavaClassName(const char* name);
00089   virtual const char* GetJavaClassName()
00090     { return this->JavaClassNameInternal; }
00092   
00094 
00097   virtual void SetJavaClassPath(const char* path);
00098   virtual const char* GetJavaClassPath()
00099     { return this->JavaClassPathInternal; }
00101   
00105   bool Initialize();
00106   
00108 
00110   void SetNumberOfInputPorts(int n)
00111   { this->Superclass::SetNumberOfInputPorts(n); }
00112   void SetNumberOfOutputPorts(int n)
00113   { this->Superclass::SetNumberOfOutputPorts(n); }
00115   
00117 
00119   virtual int ProcessRequest(vtkInformation* request, 
00120                              vtkInformationVector** inputVector,
00121                              vtkInformationVector* outputVector);
00123   
00124 protected:
00125   vtkJavaProgrammableFilter();
00126   ~vtkJavaProgrammableFilter();
00127 
00129 
00130   virtual int RequestData(
00131     vtkInformation*,
00132     vtkInformationVector**,
00133     vtkInformationVector*);
00135   
00137 
00138   virtual int RequestDataObject(
00139     vtkInformation*,
00140     vtkInformationVector**,
00141     vtkInformationVector*);
00143   
00145 
00146   virtual int RequestInformation(
00147     vtkInformation*,
00148     vtkInformationVector**,
00149     vtkInformationVector*);
00151   
00153 
00154   virtual int RequestUpdateExtent(
00155     vtkInformation*,
00156     vtkInformationVector**,
00157     vtkInformationVector*);
00159   
00161   virtual int FillInputPortInformation(int port, vtkInformation* info);
00162 
00164   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00165   
00166   vtkSetStringMacro(JavaClassNameInternal);
00167   char* JavaClassNameInternal;
00168   vtkSetStringMacro(JavaClassPathInternal);
00169   char* JavaClassPathInternal;
00170   vtkJVMManager* JVM;
00171   
00172   vtkJavaProgrammableFilterInternals* Internals;
00173   
00174 private:
00175   vtkJavaProgrammableFilter(const vtkJavaProgrammableFilter&); // Not implemented
00176   void operator=(const vtkJavaProgrammableFilter&);   // Not implemented
00177 };
00178 
00179 #endif
00180