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 #include "vtkParaViewDeprecation.h" // For PARAVIEW_DEPRECATED_IN_6_2_0
18 
19 class vtkImageData;
20 class vtkPoints;
21 class vtkCellArray;
23 class vtkPolyData;
24 class vtkDoubleArray;
25 class vtkIntArray;
26 
30 {
31 public:
32  static vtkFlashContour* New();
34  void PrintSelf(ostream& os, vtkIndent indent) override;
35 
36  vtkSetMacro(IsoValue, double);
37  vtkGetMacro(IsoValue, double);
38 
39  vtkSetStringMacro(PassAttribute);
40  vtkGetStringMacro(PassAttribute);
41 
42 protected:
44  ~vtkFlashContour() override;
45 
46  double IsoValue;
49 
50  // Just for debugging.
53  // A couple cell arrays to help determine where I should refine.
55  unsigned char CurrentLevel;
56  // Instead of maximum depth, compute the different between the
57  // maximum depth and the current depth.
59  unsigned char RemainingDepth;
60  unsigned char ComputeBranchDepth(int globalBlockId);
61 
65 
67  vtkSetStringMacro(CellArrayNameToProcess);
68 
70  int FillInputPortInformation(int port, vtkInformation* info) override;
71  int FillOutputPortInformation(int port, vtkInformation* info) override;
72  void PropogateNeighbors(int neighbors[3][3][3], int x, int y, int z);
73 
74  // Save some ivars to reduce arguments to recursive methods.
80 
81  void RecurseTree(int neighborhood[3][3][3], vtkMultiBlockDataSet* input);
82  void ProcessBlock(vtkImageData* block);
83  void ProcessCell(const double* origin, const double* spacing, const double* cornerValues,
84  const double* passValues);
85  void ProcessNeighborhoodSharedRegion(
86  int neighborhood[3][3][3], int r[3], vtkMultiBlockDataSet* input);
87  void ProcessSharedRegion(int regionDims[3], double* cornerPtrs[8], int incs[3],
88  double cornerPoints[32], double cornerSpacings[32], int cornerLevelDiffs[8],
89  double* passPtrs[8]);
90  void ProcessDegenerateCell(double cornerPoints[32], double* cornerPtrs[8], double* passPtrs[8]);
91  void ProcessCellFinal(const double cornerPoints[32], const double cornerValues[8], int cubeCase,
92  const double passValues[8]);
93 
94 private:
95  vtkFlashContour(const vtkFlashContour&) = delete;
96  void operator=(const vtkFlashContour&) = delete;
97 };
98 
99 #endif
#define PARAVIEW_DEPRECATED_IN_6_2_0(reason)
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