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
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&);
00188 void operator=(const vtkImageWindow&);
00189 };
00190
00191
00192 #endif
00193
00194
00195
00196