VTK
vtkAMRBaseParticlesReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAMRBaseParticlesReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14  =========================================================================*/
22 #ifndef VTKAMRBASEPARTICLESREADER_H_
23 #define VTKAMRBASEPARTICLESREADER_H_
24 
25 #include "vtkIOAMRModule.h" // For export macro
27 
28 class vtkInformation;
30 class vtkIndent;
32 class vtkPolyData;
34 class vtkCallbackCommand;
35 
38 {
39 public:
41  void PrintSelf(ostream &os, vtkIndent indent );
42 
44 
45  vtkGetMacro(Frequency,int);
46  vtkSetMacro(Frequency,int);
48 
50 
51  vtkGetMacro(Controller, vtkMultiProcessController* );
52  vtkSetMacro(Controller, vtkMultiProcessController* );
54 
56 
57  vtkSetMacro(FilterLocation,int);
58  vtkGetMacro(FilterLocation,int);
59  vtkBooleanMacro(FilterLocation,int);
61 
62 
64 
66  vtkGetObjectMacro(ParticleDataArraySelection,vtkDataArraySelection);
68 
70  int GetNumberOfParticleArrays();
71 
74  const char* GetParticleArrayName( int index );
75 
77 
78  int GetParticleArrayStatus( const char* name );
79  void SetParticleArrayStatus( const char* name, int status );
81 
82 
83  virtual void SetFileName( const char *fileName );
84  vtkGetStringMacro(FileName);
85 
87 
88  inline void SetMinLocation(
89  const double minx, const double miny, const double minz )
90  {
91  this->MinLocation[ 0 ] = minx;
92  this->MinLocation[ 1 ] = miny;
93  this->MinLocation[ 2 ] = minz;
94  }
96 
98 
99  inline void SetMaxLocation(
100  const double maxx, const double maxy, const double maxz )
101  {
102  this->MaxLocation[ 0 ] = maxx;
103  this->MaxLocation[ 1 ] = maxy;
104  this->MaxLocation[ 2 ] = maxz;
105  }
107 
109  virtual int GetTotalNumberOfParticles() = 0;
110 
111 protected:
113  virtual ~vtkAMRBaseParticlesReader();
114 
119  virtual void ReadMetaData() = 0;
120 
123  virtual vtkPolyData* ReadParticles( const int blkIdx ) = 0;
124 
129  bool CheckLocation( const double x, const double y, const double z );
130 
133  bool IsParallel( );
134 
137  bool IsBlockMine( const int blkIdx );
138 
144  int GetBlockProcessId( const int blkIdx );
145 
148  void Initialize();
149 
151 
155 
159  void InitializeParticleDataSelections();
160 
163  virtual void SetupParticleDataSelections() = 0;
164 
166 
168  static void SelectionModifiedCallback(
169  vtkObject *caller,unsigned long eid,void *clientdata,void *calldata );
171 
173 
174  virtual int RequestData( vtkInformation *request,
175  vtkInformationVector **inputVector,
176  vtkInformationVector *outputVector );
177  virtual int FillOutputPortInformation( int port, vtkInformation *info );
179 
181 
183  double MinLocation[3];
184  double MaxLocation[3];
185 
188 
191  char *FileName;
192 
193 private:
194  vtkAMRBaseParticlesReader( const vtkAMRBaseParticlesReader& ); // Not implemented
195  void operator=(const vtkAMRBaseParticlesReader& ); // Not implemented
196 };
197 
198 #endif /* VTKAMRBASEPARTICLESREADER_H_ */
abstract base class for most VTK objects
Definition: vtkObject.h:61
Store vtkAlgorithm input/output information.
#define VTKIOAMR_EXPORT
vtkCallbackCommand * SelectionObserver
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkMultiProcessController * Controller
virtual int FillOutputPortInformation(int port, vtkInformation *info)
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:38
void SetMaxLocation(const double maxx, const double maxy, const double maxz)
vtkDataArraySelection * ParticleDataArraySelection
Store on/off settings for data arrays for a vtkSource.
void PrintSelf(ostream &os, vtkIndent indent)
Store zero or more vtkInformation instances.
void SetMinLocation(const double minx, const double miny, const double minz)
Multiprocessing communication superclass.