00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
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