vtkFlashContour.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkFlashContour_h
13 #define vtkFlashContour_h
14 
16 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" //needed for exports
17 
18 class vtkImageData;
19 class vtkPoints;
20 class vtkCellArray;
22 class vtkPolyData;
23 class vtkDoubleArray;
24 class vtkIntArray;
25 
27 {
28 public:
29  static vtkFlashContour* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  vtkSetMacro(IsoValue, double);
34  vtkGetMacro(IsoValue, double);
35 
36  vtkSetStringMacro(PassAttribute);
37  vtkGetStringMacro(PassAttribute);
38 
39 protected:
41  ~vtkFlashContour() override;
42 
43  double IsoValue;
46 
47  // Just for debugging.
50  // A couple cell arrays to help determine where I should refine.
52  unsigned char CurrentLevel;
53  // Instead of maximum depth, compute the different between the
54  // maximum depth and the current depth.
56  unsigned char RemainingDepth;
57  unsigned char ComputeBranchDepth(int globalBlockId);
58 
62 
64  vtkSetStringMacro(CellArrayNameToProcess);
65 
67  int FillInputPortInformation(int port, vtkInformation* info) override;
68  int FillOutputPortInformation(int port, vtkInformation* info) override;
69  void PropogateNeighbors(int neighbors[3][3][3], int x, int y, int z);
70 
71  // Save some ivars to reduce arguments to recursive methods.
77 
78  void RecurseTree(int neighborhood[3][3][3], vtkMultiBlockDataSet* input);
79  void ProcessBlock(vtkImageData* block);
80  void ProcessCell(const double* origin, const double* spacing, const double* cornerValues,
81  const double* passValues);
82  void ProcessNeighborhoodSharedRegion(
83  int neighborhood[3][3][3], int r[3], vtkMultiBlockDataSet* input);
84  void ProcessSharedRegion(int regionDims[3], double* cornerPtrs[8], int incs[3],
85  double cornerPoints[32], double cornerSpacings[32], int cornerLevelDiffs[8],
86  double* passPtrs[8]);
87  void ProcessDegenerateCell(double cornerPoints[32], double* cornerPtrs[8], double* passPtrs[8]);
88  void ProcessCellFinal(const double cornerPoints[32], const double cornerValues[8], int cubeCase,
89  const double passValues[8]);
90 
91 private:
92  vtkFlashContour(const vtkFlashContour&) = delete;
93  void operator=(const vtkFlashContour&) = delete;
94 };
95 
96 #endif
unsigned char CurrentLevel
char * CellArrayNameToProcess
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkMultiBlockDataSetAlgorithm * New()
vtkUnsignedCharArray * LevelCellArray
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkCellArray * Faces
vtkPoints * Points
Contour of a flash AMR volume.
vtkDoubleArray * PassArray
vtkPolyData * Mesh
vtkUnsignedCharArray * RemainingDepthCellArray
#define VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
unsigned char RemainingDepth
void operator=(const vtkObjectBase &)
vtkIntArray * BlockIdCellArray