26 #ifndef VTKAMRSLICEFILTER_H_
27 #define VTKAMRSLICEFILTER_H_
29 #include "vtkFiltersAMRModule.h"
30 #include "vtkOverlappingAMRAlgorithm.h"
35 class vtkInformationVector;
36 class vtkOverlappingAMR;
37 class vtkMultiProcessController;
43 public vtkOverlappingAMRAlgorithm
48 void PrintSelf(ostream &os, vtkIndent indent );
51 vtkSetMacro(OffSetFromOrigin,
double);
52 vtkGetMacro(OffSetFromOrigin,
double);
56 vtkSetMacro( ForwardUpstream,
int );
57 vtkGetMacro( ForwardUpstream,
int );
58 vtkBooleanMacro( ForwardUpstream,
int );
63 vtkSetMacro( EnablePrefetching,
int );
64 vtkGetMacro( EnablePrefetching,
int );
65 vtkBooleanMacro( EnablePrefetching,
int );
70 vtkSetMacro(MaxResolution,
int);
71 vtkGetMacro(MaxResolution,
int);
77 vtkSetMacro(Normal,
int);
78 vtkGetMacro(Normal,
int);
84 vtkSetMacro( Controller, vtkMultiProcessController* );
85 vtkGetMacro( Controller, vtkMultiProcessController* );
89 virtual int RequestData(
90 vtkInformation*,vtkInformationVector**,vtkInformationVector*);
91 virtual int FillInputPortInformation(
int port, vtkInformation *info);
92 virtual int FillOutputPortInformation(
int port, vtkInformation *info);
97 virtual int RequestInformation(
99 vtkInformationVector **inputVector,
100 vtkInformationVector *outputVector );
105 virtual int RequestUpdateExtent(
106 vtkInformation*, vtkInformationVector**,vtkInformationVector* );
115 int GetDonorCellIdx(
double x[3], vtkUniformGrid *ug );
120 void ComputeCellCenter(
121 vtkUniformGrid *ug,
const int cellIdx,
double centroid[3] );
126 vtkUniformGrid* GetSlice(
double origin[3],
int* dims,
double* gorigin,
double* spacing );
129 void GetSliceCellData( vtkUniformGrid *slice, vtkUniformGrid *grid3D );
132 bool PlaneIntersectsAMRBox(
double plane[4],
double bounds[6] );
138 void ComputeAMRBlocksToLoad(
139 vtkPlane *p, vtkOverlappingAMR *metadata );
144 void GetAMRSliceInPlane(
145 vtkPlane *p, vtkOverlappingAMR *inp,
146 vtkOverlappingAMR *out );
150 bool IsAMRData2D( vtkOverlappingAMR *input );
153 vtkPlane* GetCutPlane( vtkOverlappingAMR *input );
157 void InitializeOffSet(
158 vtkOverlappingAMR *inp,
double *min,
double *max );
std::vector< int > BlocksToLoad
vtkMultiProcessController * Controller