VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Geovis/Core/vtkGeoImageNode.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkGeoImageNode.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 =========================================================================*/
00015 /*-------------------------------------------------------------------------
00016   Copyright 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00031 #ifndef vtkGeoImageNode_h
00032 #define vtkGeoImageNode_h
00033 
00034 #include "vtkGeovisCoreModule.h" // For export macro
00035 #include "vtkGeoTreeNode.h"
00036 #include "vtkSmartPointer.h" // for SP
00037 #include "vtkImageData.h" // for SP
00038 
00039 class vtkPolyData;
00040 class vtkTexture;
00041 
00042 class VTKGEOVISCORE_EXPORT vtkGeoImageNode : public vtkGeoTreeNode
00043 {
00044 public:
00045   static vtkGeoImageNode *New();
00046   vtkTypeMacro(vtkGeoImageNode, vtkGeoTreeNode);
00047   void PrintSelf(ostream& os, vtkIndent indent);
00048 
00050 
00052   vtkGeoImageNode* GetChild(int idx);
00053   vtkGeoImageNode* GetParent();
00055 
00057 
00058   vtkImageData* GetImage();
00059   void SetImage(vtkImageData* image);
00061 
00063 
00064   vtkTexture* GetTexture();
00065   void SetTexture(vtkTexture* texture);
00067 
00069 
00073   void CropImageForTile(vtkImageData* image,double* imageLonLatExt,
00074     const char* prefix = 0);
00076 
00078   void LoadAnImage(const char* prefix);
00079 
00081 
00082   virtual void ShallowCopy(vtkGeoTreeNode *src);
00083   virtual void DeepCopy(vtkGeoTreeNode *src);
00085 
00086   // Returns whether this node has valid data associated
00087   // with it, or if it is an "empty" node.
00088   virtual bool HasData();
00089 
00093   virtual void DeleteData();
00094 
00095 protected:
00096   vtkGeoImageNode();
00097   ~vtkGeoImageNode();
00098 
00099   int PowerOfTwo(int val);
00100 
00101 //BTX
00102   vtkSmartPointer<vtkImageData> Image;
00103   vtkSmartPointer<vtkTexture> Texture;
00104 //ETX
00105 
00106 private:
00107   vtkGeoImageNode(const vtkGeoImageNode&);  // Not implemented.
00108   void operator=(const vtkGeoImageNode&);  // Not implemented.
00109 };
00110 
00111 #endif