VTK
dox/IO/AMR/vtkAMRFlashReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003  Program:   Visualization Toolkit
00004  Module:    vtkAMRFlashReader.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  =========================================================================*/
00022 #ifndef VTKAMRFLASHREADER_H_
00023 #define VTKAMRFLASHREADER_H_
00024 
00025 #include "vtkIOAMRModule.h" // For export macro
00026 #include "vtkAMRBaseReader.h"
00027 
00028 class vtkOverlappingAMR;
00029 class vtkFlashReaderInternal;
00030 
00031 class VTKIOAMR_EXPORT vtkAMRFlashReader : public vtkAMRBaseReader
00032 {
00033 public:
00034   static vtkAMRFlashReader* New();
00035   vtkTypeMacro( vtkAMRFlashReader, vtkAMRBaseReader );
00036   void PrintSelf(ostream &os, vtkIndent indent );
00037 
00039   int GetNumberOfBlocks();
00040 
00042   int GetNumberOfLevels();
00043 
00045   void SetFileName( const char* fileName );
00046 
00047 protected:
00048   vtkAMRFlashReader();
00049   ~vtkAMRFlashReader();
00050 
00052   void ReadMetaData();
00053 
00055   int GetBlockLevel( const int blockIdx );
00056 
00058   int FillMetaData( );
00059 
00061   vtkUniformGrid* GetAMRGrid( const int blockIdx );
00062 
00064 
00065   void GetAMRGridData(
00066       const int blockIdx, vtkUniformGrid *block, const char *field);
00068 
00070   void SetUpDataArraySelections();
00071 
00072   bool IsReady;
00073 
00074 private:
00075   vtkAMRFlashReader( const vtkAMRFlashReader& ); // Not implemented
00076   void operator=(const vtkAMRFlashReader& ); // Not implemented
00077 
00078   void ComputeStats(vtkFlashReaderInternal* internal, std::vector<int>& numBlocks, double min[3]);
00079   vtkFlashReaderInternal *Internal;
00080 };
00081 
00082 #endif /* VTKAMRFLASHREADER_H_ */