VTK
dox/Rendering/vtkImageStack.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageStack.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 =========================================================================*/
00034 #ifndef __vtkImageStack_h
00035 #define __vtkImageStack_h
00036 
00037 #include "vtkImageSlice.h"
00038 
00039 class vtkImageSliceCollection;
00040 class vtkImageProperty;
00041 class vtkImageMapper3D;
00042 class vtkCollection;
00043 
00044 class VTK_RENDERING_EXPORT vtkImageStack : public vtkImageSlice
00045 {
00046 public:
00047   vtkTypeMacro(vtkImageStack,vtkImageSlice);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049   static vtkImageStack *New();
00050 
00053   void AddImage(vtkImageSlice *prop);
00054 
00057   void RemoveImage(vtkImageSlice *prop);
00058 
00060   int HasImage(vtkImageSlice *prop);
00061 
00063   vtkImageSliceCollection *GetImages() { return this->Images; }
00064 
00066 
00068   vtkSetMacro(ActiveLayer, int);
00069   int GetActiveLayer() { return this->ActiveLayer; }
00071 
00075   vtkImageSlice *GetActiveImage();
00076 
00078   vtkImageMapper3D *GetMapper();
00079 
00081   vtkImageProperty *GetProperty();
00082 
00084 
00085   double *GetBounds();
00086   void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds( bounds ); };
00088 
00090   unsigned long int GetMTime();
00091 
00096   unsigned long GetRedrawMTime();
00097 
00099   void ShallowCopy(vtkProp *prop);
00100 
00104   void GetImages(vtkPropCollection *);
00105 
00107 
00108   virtual int RenderOverlay(vtkViewport *viewport);
00109   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
00110   virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
00112 
00114   virtual int HasTranslucentPolygonalGeometry();
00115 
00117   void ReleaseGraphicsResources(vtkWindow *win);
00118 
00120 
00122   void InitPathTraversal();
00123   vtkAssemblyPath *GetNextPath();
00124   int GetNumberOfPaths();
00126 
00130   void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path);
00131 
00132 protected:
00133   vtkImageStack();
00134   ~vtkImageStack();
00135 
00136   void SetMapper(vtkImageMapper3D *mapper);
00137   void SetProperty(vtkImageProperty *property);
00138 
00139   void PokeMatrices(vtkMatrix4x4 *matrix);
00140   void UpdatePaths();
00141 
00142   vtkTimeStamp PathTime;
00143   vtkCollection *ImageMatrices;
00144   vtkImageSliceCollection *Images;
00145   int ActiveLayer;
00146 
00147 private:
00148   vtkImageStack(const vtkImageStack&);  // Not implemented.
00149   void operator=(const vtkImageStack&);  // Not implemented.
00150 };
00151 
00152 #endif