VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkGeoAlignedImageSource.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 -------------------------------------------------------------------------*/ 00038 #ifndef __vtkGeoAlignedImageSource_h 00039 #define __vtkGeoAlignedImageSource_h 00040 00041 #include "vtkGeoSource.h" 00042 00043 class vtkGeoImageNode; 00044 class vtkImageData; 00045 class vtkMultiBlockDataSet; 00046 00047 class VTK_GEOVIS_EXPORT vtkGeoAlignedImageSource : public vtkGeoSource 00048 { 00049 public: 00050 static vtkGeoAlignedImageSource *New(); 00051 vtkTypeMacro(vtkGeoAlignedImageSource, vtkGeoSource); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 virtual bool FetchRoot(vtkGeoTreeNode* node); 00056 00058 virtual bool FetchChild(vtkGeoTreeNode* parent, int index, vtkGeoTreeNode* child); 00059 00061 00062 vtkGetObjectMacro(Image, vtkImageData); 00063 virtual void SetImage(vtkImageData* image); 00065 00067 00068 vtkSetVector2Macro(LatitudeRange, double); 00069 vtkGetVector2Macro(LatitudeRange, double); 00070 vtkSetVector2Macro(LongitudeRange, double); 00071 vtkGetVector2Macro(LongitudeRange, double); 00073 00075 00076 vtkSetClampMacro(Overlap, double, 0.0, VTK_DOUBLE_MAX); 00077 vtkGetMacro(Overlap, double); 00079 00081 00082 vtkSetMacro(PowerOfTwoSize, bool); 00083 vtkGetMacro(PowerOfTwoSize, bool); 00084 vtkBooleanMacro(PowerOfTwoSize, bool); 00086 00087 protected: 00088 vtkGeoAlignedImageSource(); 00089 ~vtkGeoAlignedImageSource(); 00090 00091 void CropImageForNode(vtkGeoImageNode* node, vtkImageData* image); 00092 int PowerOfTwo(int val); 00093 00094 vtkImageData* Image; 00095 vtkMultiBlockDataSet* LevelImages; 00096 double LatitudeRange[2]; 00097 double LongitudeRange[2]; 00098 double Overlap; 00099 bool PowerOfTwoSize; 00100 00101 //BTX 00102 class vtkProgressObserver; 00103 vtkProgressObserver* ProgressObserver; 00104 //ETX 00105 00106 private: 00107 vtkGeoAlignedImageSource(const vtkGeoAlignedImageSource&); // Not implemented. 00108 void operator=(const vtkGeoAlignedImageSource&); // Not implemented. 00109 }; 00110 00111 #endif