Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Rendering/vtkImageWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageWindow.h,v $
00005   Language:  C++
00006 
00007 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00008 All rights reserved.
00009 
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012 
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015 
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019 
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023 
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026 
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 
00038 =========================================================================*/
00058 #ifndef __vtkImageWindow_h
00059 #define __vtkImageWindow_h
00060 
00061 #include "vtkWindow.h"
00062 #include "vtkActor2D.h"
00063 #include "vtkImager.h"
00064 #include "vtkImageMapper.h"
00065 #include "vtkImagerCollection.h"
00066 #include "vtkWindow.h"
00067 
00068 
00069 class VTK_RENDERING_EXPORT vtkImageWindow : public vtkWindow
00070 {
00071 public:
00074   static vtkImageWindow *New();
00075 
00076   void PrintSelf(ostream& os, vtkIndent indent);
00077   vtkTypeMacro(vtkImageWindow,vtkWindow);
00078 
00080 
00081   virtual void SetPosition(int x, int y) = 0;
00082   virtual void SetPosition(int a[2]) { this->SetPosition(a[0],a[1]); };
00084  
00086 
00087   virtual int* GetPosition() = 0;
00088   virtual void GetPosition(int* x, int* y);
00090 
00092 
00093   virtual void SetSize(int , int ) = 0;
00094   virtual void SetSize(int a[2]) { this->SetSize(a[0], a[1]); };
00096   
00098 
00099   virtual int* GetSize() = 0;
00100   virtual void GetSize(int *x, int *y);
00102 
00104 
00105   virtual void SetDisplayId(void *) = 0;
00106   virtual void SetWindowId(void *) = 0;
00107   virtual void SetParentId(void *) = 0;
00108   virtual void *GetGenericDisplayId() = 0;
00109   virtual void *GetGenericWindowId() = 0;
00110   virtual void *GetGenericParentId() = 0;
00111   virtual void *GetGenericContext()   = 0;
00112   virtual void *GetGenericDrawable() {return NULL;};
00114 
00118   virtual void SwapBuffers() = 0;
00119 
00121   virtual void Frame() = 0;
00122   
00124 
00125   virtual void SetWindowInfo(char *) 
00126       { vtkErrorMacro(<<"vtkImageWindow::SetWindowInfo - Not implemented"); };
00127   virtual void SetParentInfo(char *)
00128       { vtkErrorMacro(<<"vtkImageWindow::SetParentInfo - Not implemented"); };
00130 
00132 
00134   vtkSetMacro(GrayScaleHint, int);
00135   vtkGetMacro(GrayScaleHint, int);
00136   vtkBooleanMacro(GrayScaleHint, int);
00138 
00140   void AddImager(vtkImager* im);
00141 
00143   vtkImagerCollection *GetImagers() {return this->Imagers;};
00144 
00146   void RemoveImager(vtkImager* im);
00147   
00149   virtual void Render();
00150 
00152   virtual void EraseWindow();
00153 
00155   virtual void SaveImageAsPPM();
00156 
00158 
00159   virtual  int OpenPPMImageFile();
00160   virtual void WritePPMImageFile();
00161   virtual void ClosePPMImageFile();
00163 
00165 
00167   vtkSetStringMacro(FileName);
00168   vtkGetStringMacro(FileName);
00170 
00173   virtual void MakeCurrent() {};
00174 
00175 protected:
00176   vtkImageWindow();
00177   ~vtkImageWindow();
00178 
00179   vtkImagerCollection *Imagers;
00180   int WindowCreated;
00181   int GrayScaleHint;
00182   virtual void MakeDefaultWindow() = 0;
00183   char *FileName;
00184   FILE* PPMImageFilePtr;
00185 
00186 private:
00187   vtkImageWindow(const vtkImageWindow&);  // Not implemented.
00188   void operator=(const vtkImageWindow&);  // Not implemented.
00189 };
00190 
00191 
00192 #endif
00193 
00194 
00195 
00196 

Generated on Thu Mar 28 14:19:32 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001