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

imaging/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 =========================================================================*/
00057 #ifndef __vtkImageWindow_h
00058 #define __vtkImageWindow_h
00059 
00060 #include "vtkWindow.h"
00061 #include "vtkActor2D.h"
00062 #include "vtkImager.h"
00063 #include "vtkImageMapper.h"
00064 #include "vtkImagerCollection.h"
00065 #include "vtkWindow.h"
00066 
00067 
00068 class VTK_EXPORT vtkImageWindow : public vtkWindow
00069 {
00070 public:
00073   static vtkImageWindow *New();
00074 
00075   void PrintSelf(ostream& os, vtkIndent indent);
00076   vtkTypeMacro(vtkImageWindow,vtkWindow);
00077 
00079   virtual void SetPosition(int x, int y) = 0;
00080   virtual void SetPosition(int a[2]) { this->SetPosition(a[0],a[1]); };
00081  
00083   virtual int* GetPosition() = 0;
00084   virtual void GetPosition(int* x, int* y);
00085 
00087   virtual void SetSize(int , int ) = 0;
00088   virtual void SetSize(int a[2]) { this->SetSize(a[0], a[1]); };
00089   
00091   virtual int* GetSize() = 0;
00092   virtual void GetSize(int *x, int *y);
00093 
00095   virtual void SetDisplayId(void *) = 0;
00096   virtual void SetWindowId(void *) = 0;
00097   virtual void SetParentId(void *) = 0;
00098   virtual void *GetGenericDisplayId() = 0;
00099   virtual void *GetGenericWindowId() = 0;
00100   virtual void *GetGenericParentId() = 0;
00101   virtual void *GetGenericContext()   = 0;
00102   virtual void *GetGenericDrawable() {return NULL;};
00103 
00107   virtual void SwapBuffers() = 0;
00108 
00110   virtual void Frame() = 0;
00111   
00113   virtual void SetWindowInfo(char *) 
00114       { vtkErrorMacro(<<"vtkImageWindow::SetWindowInfo - Not implemented"); };
00115 
00118   vtkSetMacro(GrayScaleHint, int);
00119   vtkGetMacro(GrayScaleHint, int);
00120   vtkBooleanMacro(GrayScaleHint, int);
00121 
00123   void AddImager(vtkImager* im);
00124 
00126   vtkImagerCollection *GetImagers() {return this->Imagers;};
00127 
00129   void RemoveImager(vtkImager* im);
00130   
00132   virtual void Render();
00133 
00135   virtual void EraseWindow();
00136 
00138   virtual void SaveImageAsPPM();
00139 
00141   virtual  int OpenPPMImageFile();
00142   virtual void WritePPMImageFile();
00143   virtual void ClosePPMImageFile();
00144 
00147   vtkSetStringMacro(FileName);
00148   vtkGetStringMacro(FileName);
00149 
00152   virtual void MakeCurrent() {};
00153 
00154 protected:
00155   vtkImageWindow();
00156   ~vtkImageWindow();
00157   vtkImageWindow(const vtkImageWindow&) {};
00158   void operator=(const vtkImageWindow&) {};
00159 
00160   vtkImagerCollection *Imagers;
00161   int WindowCreated;
00162   int GrayScaleHint;
00163   virtual void MakeDefaultWindow() = 0;
00164   char *FileName;
00165   FILE* PPMImageFilePtr;
00166 
00167 };
00168 
00169 
00170 #endif
00171 
00172 
00173 
00174 

Generated on Wed Nov 21 12:27:08 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001