VTK  9.3.20240419
vtkImageRGBToHSV.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
54 #ifndef vtkImageRGBToHSV_h
55 #define vtkImageRGBToHSV_h
56 
57 #include "vtkImagingColorModule.h" // For export macro
59 
60 VTK_ABI_NAMESPACE_BEGIN
61 class VTKIMAGINGCOLOR_EXPORT vtkImageRGBToHSV : public vtkThreadedImageAlgorithm
62 {
63 public:
64  static vtkImageRGBToHSV* New();
66  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
68  // Hue is an angle. Maximum specifies when it maps back to 0. HueMaximum
69  // defaults to 255 instead of 2PI, because unsigned char is expected as
70  // input. Maximum also specifies the maximum of the Saturation.
71  vtkSetMacro(Maximum, double);
72  vtkGetMacro(Maximum, double);
73 
74 protected:
76  ~vtkImageRGBToHSV() override = default;
77 
78  double Maximum;
79 
80  void ThreadedExecute(vtkImageData* inData, vtkImageData* outData, int ext[6], int id) override;
81 
82 private:
83  vtkImageRGBToHSV(const vtkImageRGBToHSV&) = delete;
84  void operator=(const vtkImageRGBToHSV&) = delete;
85 };
86 
87 VTK_ABI_NAMESPACE_END
88 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:156
Converts RGB components to HSV.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkImageRGBToHSV() override=default
static vtkImageRGBToHSV * New()
void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, int ext[6], int id) override
a simple class to control print indentation
Definition: vtkIndent.h:108
Generic filter that has one input.