vtkExtractDataSets.h 2.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkExtractDataSets.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   vtkExtractDataSets
 * @brief   extracts a number of datasets.
 *
 * vtkExtractDataSets accepts a vtkHierarchicalBoxDataSet as input and extracts
 * different datasets from different levels. The output is
 * vtkMultiBlockDataSet of vtkMultiPiece datasets. Each block corresponds to
 * a level in the vktHierarchicalBoxDataSet. Individual datasets, within a level,
 * are stored in a vtkMultiPiece dataset.
 *
 * @sa
 * vtkHierarchicalBoxDataSet, vtkMultiBlockDataSet vtkMultiPieceDataSet
*/
28

29 30
#ifndef vtkExtractDataSets_h
#define vtkExtractDataSets_h
31

32
#include "vtkFiltersExtractionModule.h" // For export macro
33
#include "vtkMultiBlockDataSetAlgorithm.h"
34

35
class VTKFILTERSEXTRACTION_EXPORT vtkExtractDataSets :
36
          public vtkMultiBlockDataSetAlgorithm
37 38 39
{
public:
  static vtkExtractDataSets* New();
40
  vtkTypeMacro(vtkExtractDataSets, vtkMultiBlockDataSetAlgorithm);
41
  void PrintSelf(ostream& os, vtkIndent indent) override;
42

43 44 45
  /**
   * Add a dataset to be extracted.
   */
46 47
  void AddDataSet(unsigned int level, unsigned int idx);

48 49 50
  /**
   * Remove all entries from the list of datasets to be extracted.
   */
51 52 53 54
  void ClearDataSetList();

protected:
  vtkExtractDataSets();
55
  ~vtkExtractDataSets() override;
56

57
  int RequestData(vtkInformation *,
58
                          vtkInformationVector **,
59 60 61
                          vtkInformationVector *) override;
  int FillInputPortInformation(int port, vtkInformation *info) override;
  int FillOutputPortInformation(int port, vtkInformation *info) override;
62 63

private:
64 65
  vtkExtractDataSets(const vtkExtractDataSets&) = delete;
  void operator=(const vtkExtractDataSets&) = delete;
66 67 68

  class vtkInternals;
  vtkInternals* Internals;
69

70 71 72 73 74
};

#endif