VTK
dox/Filters/Hybrid/vtkRenderLargeImage.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRenderLargeImage.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 =========================================================================*/
00027 #ifndef __vtkRenderLargeImage_h
00028 #define __vtkRenderLargeImage_h
00029 
00030 #include "vtkFiltersHybridModule.h" // For export macro
00031 #include "vtkAlgorithm.h"
00032 #include "vtkImageData.h" // makes things a bit easier
00033 
00034 class vtkRenderer;
00035 class vtkActor2DCollection;
00036 class vtkCollection;
00037 class vtkRenderLargeImage2DHelperClass;
00038 
00039 class VTKFILTERSHYBRID_EXPORT vtkRenderLargeImage : public vtkAlgorithm
00040 {
00041 public:
00042   static vtkRenderLargeImage *New();
00043   vtkTypeMacro(vtkRenderLargeImage,vtkAlgorithm);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045 
00047 
00048   vtkSetMacro(Magnification,int);
00049   vtkGetMacro(Magnification,int);
00051 
00053   virtual void SetInput(vtkRenderer*);
00054 
00056 
00058   vtkGetObjectMacro(Input,vtkRenderer);
00060 
00062   vtkImageData* GetOutput();
00063 
00065 
00066   virtual int ProcessRequest(vtkInformation*,
00067                              vtkInformationVector**,
00068                              vtkInformationVector*);
00070 
00071 protected:
00072   vtkRenderLargeImage();
00073   ~vtkRenderLargeImage();
00074 
00075   int Magnification;
00076   vtkRenderer *Input;
00077   void RequestData(vtkInformation *,
00078                    vtkInformationVector **, vtkInformationVector *);
00079   void RequestInformation (vtkInformation *,
00080                            vtkInformationVector **, vtkInformationVector *);
00081 
00082   // see algorithm for more info
00083   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00084 
00085   // Adjust the coordinates of all 2D actors to fit new window size
00086   void Rescale2DActors();
00087   // Shift each actor according to the tile we are rendering
00088   void Shift2DActors(int x, int y);
00089   // put them all back to their previous state when finished.
00090   void Restore2DActors();
00091   // 2D Actors need to be rescaled and shifted about for each tile
00092   // use this helper class to make life easier.
00093   vtkRenderLargeImage2DHelperClass *StoredData;
00094 
00095 private:
00096   vtkRenderLargeImage(const vtkRenderLargeImage&);  // Not implemented.
00097   void operator=(const vtkRenderLargeImage&);  // Not implemented.
00098 };
00099 
00100 #endif