vtkBlankStructuredGridWithImage.h 2.3 KB
Newer Older
1 2 3 4 5
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkBlankStructuredGridWithImage.h

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

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

=========================================================================*/
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
/**
 * @class   vtkBlankStructuredGridWithImage
 * @brief   blank a structured grid with an image
 *
 * This filter can be used to set the blanking in a structured grid with
 * an image. The filter takes two inputs: the structured grid to blank,
 * and the image used to set the blanking. Make sure that the dimensions of
 * both the image and the structured grid are identical.
 *
 * Note that the image is interpreted as follows: zero values indicate that
 * the structured grid point is blanked; non-zero values indicate that the
 * structured grid point is visible. The blanking data must be unsigned char.
 *
 * @sa
 * vtkStructuredGrid
*/
31

32 33
#ifndef vtkBlankStructuredGridWithImage_h
#define vtkBlankStructuredGridWithImage_h
34

35
#include "vtkFiltersGeneralModule.h" // For export macro
36
#include "vtkStructuredGridAlgorithm.h"
37 38 39

class vtkImageData;

40
class VTKFILTERSGENERAL_EXPORT vtkBlankStructuredGridWithImage : public vtkStructuredGridAlgorithm
41 42 43
{
public:
  static vtkBlankStructuredGridWithImage *New();
44
  vtkTypeMacro(vtkBlankStructuredGridWithImage,vtkStructuredGridAlgorithm);
45
  void PrintSelf(ostream& os, vtkIndent indent) override;
46

47 48 49 50
  //@{
  /**
   * Set / get the input image used to perform the blanking.
   */
51
  void SetBlankingInputData(vtkImageData *input);
52
  vtkImageData *GetBlankingInput();
53
  //@}
54 55

protected:
56
  vtkBlankStructuredGridWithImage();
57
  ~vtkBlankStructuredGridWithImage() override;
58

59 60
  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;
  int FillInputPortInformation(int port, vtkInformation *info) override;
61

62
private:
63 64
  vtkBlankStructuredGridWithImage(const vtkBlankStructuredGridWithImage&) = delete;
  void operator=(const vtkBlankStructuredGridWithImage&) = delete;
65 66 67
};

#endif