VTK
dox/Rendering/Core/vtkImageMapper.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageMapper.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00032 #ifndef __vtkImageMapper_h
00033 #define __vtkImageMapper_h
00034 
00035 #include "vtkRenderingCoreModule.h" // For export macro
00036 #include "vtkMapper2D.h"
00037 
00038 class vtkWindow;
00039 class vtkViewport;
00040 class vtkActor2D;
00041 class vtkImageData;
00042 
00043 class VTKRENDERINGCORE_EXPORT vtkImageMapper : public vtkMapper2D
00044 {
00045 public:
00046   vtkTypeMacro(vtkImageMapper, vtkMapper2D);
00047   static vtkImageMapper *New();
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051   unsigned long int GetMTime();
00052 
00054 
00055   vtkSetMacro(ColorWindow, double);
00056   vtkGetMacro(ColorWindow, double);
00058 
00060 
00061   vtkSetMacro(ColorLevel, double);
00062   vtkGetMacro(ColorLevel, double);
00064 
00066 
00073   vtkSetMacro(ZSlice, int);
00074   vtkGetMacro(ZSlice, int);
00075   int GetWholeZMin();
00076   int GetWholeZMax();
00078 
00080   void RenderStart(vtkViewport* viewport, vtkActor2D* actor);
00081 
00083   virtual void RenderData(vtkViewport*, vtkImageData*, vtkActor2D* )=0;
00084 
00086 
00087   double GetColorShift();
00088   double GetColorScale();
00090 
00091   // Public for templated functions. * *  Should remove this * *
00092   int DisplayExtent[6];
00093 
00095 
00096   virtual void SetInputData(vtkImageData *input);
00097   vtkImageData *GetInput();
00099 
00101 
00104   vtkSetMacro(RenderToRectangle, int);
00105   vtkGetMacro(RenderToRectangle, int);
00106   vtkBooleanMacro(RenderToRectangle, int);
00108 
00110 
00114   vtkSetMacro(UseCustomExtents, int);
00115   vtkGetMacro(UseCustomExtents, int);
00116   vtkBooleanMacro(UseCustomExtents, int);
00118 
00120 
00123   vtkSetVectorMacro(CustomDisplayExtents, int, 4);
00124   vtkGetVectorMacro(CustomDisplayExtents, int, 4);
00126 
00127 protected:
00128   vtkImageMapper();
00129   ~vtkImageMapper();
00130 
00131   double ColorWindow;
00132   double ColorLevel;
00133 
00134   int PositionAdjustment[2];
00135   int ZSlice;
00136   int UseCustomExtents;
00137   int CustomDisplayExtents[4];
00138   int RenderToRectangle;
00139 
00140   virtual int FillInputPortInformation(int, vtkInformation*);
00141 private:
00142   vtkImageMapper(const vtkImageMapper&);  // Not implemented.
00143   void operator=(const vtkImageMapper&);  // Not implemented.
00144 };
00145 
00146 #endif