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

Rendering/vtkImageViewer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageViewer.h,v $
00005   Language:  C++
00006 
00007 
00008 Copyright (c) 1993-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00009 All rights reserved.
00010 
00011 Redistribution and use in source and binary forms, with or without
00012 modification, are permitted provided that the following conditions are met:
00013 
00014  * Redistributions of source code must retain the above copyright notice,
00015    this list of conditions and the following disclaimer.
00016 
00017  * Redistributions in binary form must reproduce the above copyright notice,
00018    this list of conditions and the following disclaimer in the documentation
00019    and/or other materials provided with the distribution.
00020 
00021  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00022    of any contributors may be used to endorse or promote products derived
00023    from this software without specific prior written permission.
00024 
00025  * Modified source versions must be plainly marked as such, and must not be
00026    misrepresented as being the original software.
00027 
00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00029 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00030 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00031 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00032 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00033 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00034 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00035 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00036 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00037 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 
00039 =========================================================================*/
00064 #ifndef __vtkImageViewer_h
00065 #define __vtkImageViewer_h
00066 
00067 #include "vtkObject.h"
00068 #include "vtkImageWindow.h"
00069 #include "vtkRenderWindow.h"
00070 
00071 class VTK_RENDERING_EXPORT vtkImageViewer : public vtkObject 
00072 {
00073 public:
00074   static vtkImageViewer *New();
00075   
00076   vtkTypeMacro(vtkImageViewer,vtkObject);
00077   void PrintSelf(ostream& os, vtkIndent indent);
00078 
00080   char *GetWindowName() {return this->RenderWindow->GetWindowName();};
00081 
00083   virtual void Render(void);
00084   
00086 
00087   void SetInput(vtkImageData *in) {this->ImageMapper->SetInput(in);};
00088   vtkImageData *GetInput() { return this->ImageMapper->GetInput();};
00090   
00092 
00093   int GetWholeZMin() {return this->ImageMapper->GetWholeZMin();};
00094   int GetWholeZMax() {return this->ImageMapper->GetWholeZMax();};
00096   
00098 
00099   int GetZSlice() {return this->ImageMapper->GetZSlice();};
00100   void SetZSlice(int s) {this->ImageMapper->SetZSlice(s);};
00102   
00104 
00105   float GetColorWindow() {return this->ImageMapper->GetColorWindow();};
00106   float GetColorLevel() {return this->ImageMapper->GetColorLevel();};
00107   void SetColorWindow(float s) {this->ImageMapper->SetColorWindow(s);};
00108   void SetColorLevel(float s) {this->ImageMapper->SetColorLevel(s);};
00110 
00112 
00113   void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
00114   void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
00115   void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
00117   
00119 
00121   int GetGrayScaleHint() 
00122     {vtkWarningMacro("GetGrayScaleHint deprecated, not required anymore"); return 0;};
00123   void SetGrayScaleHint(int a) 
00124     {vtkWarningMacro("SetGrayScaleHint deprecated, not required anymore");};
00125   void GrayScaleHintOn()
00126     {vtkWarningMacro("GrayScaleHintOn deprecated, not required anymore");};
00127   void GrayScaleHintOff()
00128     {vtkWarningMacro("GrayScaleHintOff deprecated, not required anymore");};
00130 
00132 
00133   int *GetPosition() {return this->RenderWindow->GetPosition();};
00134   void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
00135   virtual void SetPosition(int a[2]);
00137 
00139 
00140   int *GetSize() {return this->RenderWindow->GetSize();};
00141   void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
00142   virtual void SetSize(int a[2]);
00144   
00146 
00147   vtkImageWindow *GetImageWindow() 
00148     {vtkWarningMacro("GetImageWindow deprecated, use GetRenderWindow instead."); return NULL;};
00149   vtkImager      *GetImager()
00150     {vtkWarningMacro("GetImager deprecated, use GetRenderer instead."); return NULL;};
00152 
00153   vtkImageMapper *GetImageMapper() {return this->ImageMapper;};
00154   vtkActor2D     *GetActor2D() {return this->Actor2D;};
00155   vtkRenderWindow *GetRenderWindow() {return this->RenderWindow;};
00156   vtkRenderer     *GetRenderer() {return this->Renderer;};
00157   
00158 protected:
00159   vtkImageViewer();
00160   ~vtkImageViewer();
00161 
00162   vtkRenderWindow *RenderWindow;
00163   vtkRenderer *Renderer;
00164   vtkImageMapper *ImageMapper;
00165   vtkActor2D     *Actor2D;
00166 private:
00167   vtkImageViewer(const vtkImageViewer&);  // Not implemented.
00168   void operator=(const vtkImageViewer&);  // Not implemented.
00169 };
00170 
00171 #endif
00172 
00173 

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