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 
26 class VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT vtkFlashContour : public vtkMultiBlockDataSetAlgorithm
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
vtkPoints
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkFlashContour::GlobalChildrenArray
int * GlobalChildrenArray
Definition: vtkFlashContour.h:74
vtkFlashContour::Faces
vtkCellArray * Faces
Definition: vtkFlashContour.h:60
vtkInformationVector
vtkUnsignedCharArray
vtkFlashContour::IsoValue
double IsoValue
Definition: vtkFlashContour.h:43
vtkFlashContour::CurrentLevel
unsigned char CurrentLevel
Definition: vtkFlashContour.h:52
vtkMultiBlockDataSetAlgorithm::New
static vtkMultiBlockDataSetAlgorithm * New()
vtkMultiBlockDataSetAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkFlashContour::GlobalNeighborArray
int * GlobalNeighborArray
Definition: vtkFlashContour.h:75
vtkFlashContour::LevelCellArray
vtkUnsignedCharArray * LevelCellArray
Definition: vtkFlashContour.h:51
vtkMultiBlockDataSet
vtkMultiBlockDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkFlashContour::BlockIdCellArray
vtkIntArray * BlockIdCellArray
Definition: vtkFlashContour.h:48
vtkFlashContour::Points
vtkPoints * Points
Definition: vtkFlashContour.h:59
vtkFlashContour::GlobalToLocalMap
int * GlobalToLocalMap
Definition: vtkFlashContour.h:76
vtkFlashContour
Contour of a flash AMR volume.
Definition: vtkFlashContour.h:26
vtkImageData
vtkIndent
vtkCellArray
vtkIntArray
vtkFlashContour::Mesh
vtkPolyData * Mesh
Definition: vtkFlashContour.h:61
vtkMultiBlockDataSetAlgorithm.h
vtkFlashContour::CurrentBlockId
int CurrentBlockId
Definition: vtkFlashContour.h:49
vtkInformation
vtkFlashContour::RemainingDepthCellArray
vtkUnsignedCharArray * RemainingDepthCellArray
Definition: vtkFlashContour.h:55
vtkMultiBlockDataSetAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkFlashContour::RemainingDepth
unsigned char RemainingDepth
Definition: vtkFlashContour.h:56
vtkPolyData
vtkFlashContour::NumberOfGlobalBlocks
int NumberOfGlobalBlocks
Definition: vtkFlashContour.h:72
vtkDoubleArray
vtkFlashContour::PassAttribute
char * PassAttribute
Definition: vtkFlashContour.h:44
vtkFlashContour::PassArray
vtkDoubleArray * PassArray
Definition: vtkFlashContour.h:45
vtkMultiBlockDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkFlashContour::CellArrayNameToProcess
char * CellArrayNameToProcess
Definition: vtkFlashContour.h:63
vtkFlashContour::GlobalLevelArray
int * GlobalLevelArray
Definition: vtkFlashContour.h:73
vtkMultiBlockDataSetAlgorithm