Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
vtkMaskedGlyph2D.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef vtkMaskedGlyph2D_h
14 #define vtkMaskedGlyph2D_h
15 
16 #include <MitkMapperExtExports.h>
17 
18 #include <mitkCommon.h>
19 #include <vtkGlyph2D.h>
20 
21 class vtkMaskPoints;
31 class MITKMAPPEREXT_EXPORT vtkMaskedGlyph2D : public vtkGlyph2D
32 {
33 public:
35  void PrintSelf(ostream &os, vtkIndent indent) override;
36 
40  static vtkMaskedGlyph2D *New();
41 
46  vtkSetMacro(MaximumNumberOfPoints, int);
47 
51  vtkGetMacro(MaximumNumberOfPoints, int);
52 
56  virtual void SetInput(vtkDataSet *input);
57 
59  vtkSetMacro(UseMaskPoints, int);
60 
64  vtkGetMacro(UseMaskPoints, int);
65 
69  void SetRandomMode(int mode);
70 
75 
77  // * If you want to use an arbitrary scalars array, then set its name here.
78  // * By default this in nullptr and the filter will use the active scalar array.
79  // */
80  // vtkGetStringMacro(InputScalarsSelection);
81  // void SelectInputScalars(const char *fieldName)
82  // {this->SetInputScalarsSelection(fieldName);}
83 
85  // * If you want to use an arbitrary vectors array, then set its name here.
86  // * By default this in nullptr and the filter will use the active vector array.
87  // */
88  // vtkGetStringMacro(InputVectorsSelection);
89  // void SelectInputVectors(const char *fieldName)
90  // {this->SetInputVectorsSelection(fieldName);}
91 
93  // * If you want to use an arbitrary normals array, then set its name here.
94  // * By default this in nullptr and the filter will use the active normal array.
95  // */
96  // vtkGetStringMacro(InputNormalsSelection);
97  // void SelectInputNormals(const char *fieldName)
98  // {this->SetInputNormalsSelection(fieldName);}
99 
100 protected:
102  ~vtkMaskedGlyph2D() override;
103 
104  int RequestData(vtkInformation *info,
105  vtkInformationVector **inInfoVec,
106  vtkInformationVector *outInfoVec) override;
107 
108  vtkMaskPoints *MaskPoints;
111 
112 private:
113  vtkMaskedGlyph2D(const vtkMaskedGlyph2D &); // Not implemented.
114  void operator=(const vtkMaskedGlyph2D &); // Not implemented.
115 };
116 
117 #endif
#define MITKMAPPEREXT_EXPORT
VTK filter that masks input points and generates 2D glyphs only for selected points.
virtual void SetInput(vtkDataSet *input)
Set the input dataset to this filter.
vtkMaskedGlyph2D()
‍**
static vtkMaskedGlyph2D * New()
Create a new instance of vtkMaskedGlyph2D.
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSetMacro(MaximumNumberOfPoints, int)
Set the maximum number of points to glyph.
vtkGetMacro(MaximumNumberOfPoints, int)
Get the maximum number of points to glyph.
int RequestData(vtkInformation *info, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec) override
vtkSetMacro(UseMaskPoints, int)
Set whether to enable point masking. Non-zero to enable, 0 to disable.
void SetRandomMode(int mode)
Set whether to randomly select which points to mask.
vtkTypeMacro(vtkMaskedGlyph2D, vtkGlyph2D)
vtkMaskPoints * MaskPoints
int GetRandomMode()
Get the current random masking mode.
vtkGetMacro(UseMaskPoints, int)
Get whether point masking is enabled.
~vtkMaskedGlyph2D() override