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 "vtkGeoTreeNode.h" 00035 #include "vtkSmartPointer.h" // for SP 00036 #include "vtkImageData.h" // for SP 00037 00038 class vtkPolyData; 00039 class vtkTexture; 00040 00041 class VTK_GEOVIS_EXPORT vtkGeoImageNode : public vtkGeoTreeNode 00042 { 00043 public: 00044 static vtkGeoImageNode *New(); 00045 vtkTypeMacro(vtkGeoImageNode, vtkGeoTreeNode); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00051 vtkGeoImageNode* GetChild(int idx); 00052 vtkGeoImageNode* GetParent(); 00054 00056 00057 vtkImageData* GetImage(); 00058 void SetImage(vtkImageData* image); 00060 00062 00063 vtkTexture* GetTexture(); 00064 void SetTexture(vtkTexture* texture); 00066 00068 00072 void CropImageForTile(vtkImageData* image,double* imageLonLatExt, 00073 const char* prefix = 0); 00075 00077 void LoadAnImage(const char* prefix); 00078 00080 00081 virtual void ShallowCopy(vtkGeoTreeNode *src); 00082 virtual void DeepCopy(vtkGeoTreeNode *src); 00084 00085 // Returns whether this node has valid data associated 00086 // with it, or if it is an "empty" node. 00087 virtual bool HasData(); 00088 00092 virtual void DeleteData(); 00093 00094 protected: 00095 vtkGeoImageNode(); 00096 ~vtkGeoImageNode(); 00097 00098 int PowerOfTwo(int val); 00099 00100 //BTX 00101 vtkSmartPointer<vtkImageData> Image; 00102 vtkSmartPointer<vtkTexture> Texture; 00103 //ETX 00104 00105 private: 00106 vtkGeoImageNode(const vtkGeoImageNode&); // Not implemented. 00107 void operator=(const vtkGeoImageNode&); // Not implemented. 00108 }; 00109 00110 #endif