vtkFlashContour.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkFlashContour.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 =========================================================================*/
23 #ifndef vtkFlashContour_h
24 #define vtkFlashContour_h
25 
27 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" //needed for exports
28 
29 class vtkImageData;
30 class vtkPoints;
31 class vtkCellArray;
33 class vtkPolyData;
34 class vtkDoubleArray;
35 class vtkIntArray;
36 
38 {
39 public:
40  static vtkFlashContour* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  vtkSetMacro(IsoValue, double);
45  vtkGetMacro(IsoValue, double);
46 
47  vtkSetStringMacro(PassAttribute);
48  vtkGetStringMacro(PassAttribute);
49 
50 protected:
52  ~vtkFlashContour() override;
53 
54  double IsoValue;
57 
58  // Just for debugging.
61  // A couple cell arrays to help determine where I should refine.
63  unsigned char CurrentLevel;
64  // Instead of maximum depth, compute the different between the
65  // maximum depth and the current depth.
67  unsigned char RemainingDepth;
68  unsigned char ComputeBranchDepth(int globalBlockId);
69 
73 
75  vtkSetStringMacro(CellArrayNameToProcess);
76 
78  int FillInputPortInformation(int port, vtkInformation* info) override;
79  int FillOutputPortInformation(int port, vtkInformation* info) override;
80  void PropogateNeighbors(int neighbors[3][3][3], int x, int y, int z);
81 
82  // Save some ivars to reduce arguments to recursive methods.
88 
89  void RecurseTree(int neighborhood[3][3][3], vtkMultiBlockDataSet* input);
90  void ProcessBlock(vtkImageData* block);
91  void ProcessCell(const double* origin, const double* spacing, const double* cornerValues,
92  const double* passValues);
93  void ProcessNeighborhoodSharedRegion(
94  int neighborhood[3][3][3], int r[3], vtkMultiBlockDataSet* input);
95  void ProcessSharedRegion(int regionDims[3], double* cornerPtrs[8], int incs[3],
96  double cornerPoints[32], double cornerSpacings[32], int cornerLevelDiffs[8],
97  double* passPtrs[8]);
98  void ProcessDegenerateCell(double cornerPoints[32], double* cornerPtrs[8], double* passPtrs[8]);
99  void ProcessCellFinal(const double cornerPoints[32], const double cornerValues[8], int cubeCase,
100  const double passValues[8]);
101 
102 private:
103  vtkFlashContour(const vtkFlashContour&) = delete;
104  void operator=(const vtkFlashContour&) = delete;
105 };
106 
107 #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