vtkHyperOctreeToUniformGridFilter.h 2.47 KB
Newer Older
Francois Bertel's avatar
Francois Bertel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkHyperOctreeToUniformGridFilter.h

  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * @class   vtkHyperOctreeToUniformGridFilter
 * @brief   Flat the octree into a uniform
 * grid
 *
 * vtkHyperOctreeToUniformGridFilter creates a uniform grid with a resolution
 * based on the number of levels of the hyperoctree. Then, it copies celldata
 * in each cell of the uniform grid that belongs to an actual leaf of the
 * hyperoctree.
 *
 * @sa
 * vtkGeometryFilter vtkStructuredGridGeometryFilter.
*/
Francois Bertel's avatar
Francois Bertel committed
28

29
30
#ifndef vtkHyperOctreeToUniformGridFilter_h
#define vtkHyperOctreeToUniformGridFilter_h
Francois Bertel's avatar
Francois Bertel committed
31

32
#include "vtkFiltersHyperTreeModule.h" // For export macro
Francois Bertel's avatar
Francois Bertel committed
33
34
#include "vtkImageAlgorithm.h"

35
#if !defined(VTK_LEGACY_REMOVE)
Francois Bertel's avatar
Francois Bertel committed
36
37
class vtkHyperOctreeCursor;
class vtkCellData;
Charles Law's avatar
Charles Law committed
38
class vtkDataSetAttributes;
Francois Bertel's avatar
Francois Bertel committed
39

40
class VTKFILTERSHYPERTREE_EXPORT vtkHyperOctreeToUniformGridFilter : public vtkImageAlgorithm
Francois Bertel's avatar
Francois Bertel committed
41
42
43
{
public:
  static vtkHyperOctreeToUniformGridFilter *New();
44
  vtkTypeMacro(vtkHyperOctreeToUniformGridFilter,vtkImageAlgorithm);
45
  void PrintSelf(ostream& os, vtkIndent indent) override;
46

Francois Bertel's avatar
Francois Bertel committed
47
48
protected:
  vtkHyperOctreeToUniformGridFilter();
49
  ~vtkHyperOctreeToUniformGridFilter() override;
50

Francois Bertel's avatar
Francois Bertel committed
51
52
  int RequestInformation (vtkInformation * vtkNotUsed(request),
                          vtkInformationVector **inputVector,
53
                          vtkInformationVector *outputVector) override;
54

55
56
  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
  int FillInputPortInformation(int port, vtkInformation *info) override;
57

Francois Bertel's avatar
Francois Bertel committed
58
  void CopyCellData(int cellExtent[6]);
59

Francois Bertel's avatar
Francois Bertel committed
60
61
  // Variables used by generate recursively.
  // It avoids to pass to much argument.
Charles Law's avatar
Charles Law committed
62
  vtkDataSetAttributes *InputCD;
Francois Bertel's avatar
Francois Bertel committed
63
64
65
66
67
  vtkCellData *OutputCD;
  vtkHyperOctreeCursor *Cursor;
  int YExtent;
  int ZExtent;
  vtkImageData *Output;
68

Francois Bertel's avatar
Francois Bertel committed
69
private:
70
71
  vtkHyperOctreeToUniformGridFilter(const vtkHyperOctreeToUniformGridFilter&) = delete;
  void operator=(const vtkHyperOctreeToUniformGridFilter&) = delete;
Francois Bertel's avatar
Francois Bertel committed
72
};
73
#endif // LEGACY remove
Francois Bertel's avatar
Francois Bertel committed
74
75

#endif