vtkAnnotateSelectionFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkAnnotateSelectionFilter_h
15 #define vtkAnnotateSelectionFilter_h
16 
17 #include "vtkDataSetAlgorithm.h"
18 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" //needed for exports
19 
20 class VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT vtkAnnotateSelectionFilter
21  : public vtkDataSetAlgorithm
22 {
23 public:
26  void PrintSelf(ostream& os, vtkIndent indent) override;
27 
29 
35  void ResetLabels();
36  void SetLabels(int index, const char* label);
38 
44  {
45  this->SetInputConnection(1, algOutput);
46  }
47 
51  void RemoveAllSelectionsInputs() { this->SetInputConnection(1, nullptr); }
52 
54 
57  vtkSetStdStringFromCharMacro(DefaultLabel);
58  vtkGetCharFromStdStringMacro(DefaultLabel);
60 
61  int FillInputPortInformation(int port, vtkInformation* info) override;
62 
63 protected:
65  ~vtkAnnotateSelectionFilter() override = default;
66 
67  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
68  vtkInformationVector* outputVector) override;
69 
70  std::vector<std::string> Labels;
71 
72  std::string DefaultLabel;
73 
74 private:
76  void operator=(const vtkAnnotateSelectionFilter&) = delete;
77 };
78 
79 #endif
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkInformationVector
vtkDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkDataSetAlgorithm
vtkAnnotateSelectionFilter
filter for annotating selection
Definition: vtkAnnotateSelectionFilter.h:20
vtkIndent
vtkDataSetAlgorithm::New
static vtkDataSetAlgorithm * New()
vtkAnnotateSelectionFilter::RemoveAllSelectionsInputs
void RemoveAllSelectionsInputs()
Removes all inputs from input port 1.
Definition: vtkAnnotateSelectionFilter.h:51
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
vtkInformation
vtkDataSetAlgorithm.h
vtkAlgorithmOutput
vtkAnnotateSelectionFilter::Labels
std::vector< std::string > Labels
Definition: vtkAnnotateSelectionFilter.h:70
vtkAnnotateSelectionFilter::DefaultLabel
std::string DefaultLabel
Definition: vtkAnnotateSelectionFilter.h:72
vtkAnnotateSelectionFilter::SetSelectionConnection
void SetSelectionConnection(vtkAlgorithmOutput *algOutput)
Convenience method to specify the selection connection (2nd input port)
Definition: vtkAnnotateSelectionFilter.h:43
vtkDataSetAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)