1 /*=========================================================================
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkImageRGBToHSV.h,v $
6 Date: $Date: 2002/01/22 15:33:17 $
7 Version: $Revision: 1.22 $
9 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
11 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
18 // .NAME vtkImageRGBToHSV - Converts RGB components to HSV.
19 // .SECTION Description
20 // For each pixel with red, blue, and green components this
21 // filter output the color coded as hue, saturation and value.
22 // Output type must be the same as input type.
25 #ifndef __vtkImageRGBToHSV_h
26 #define __vtkImageRGBToHSV_h
29 #include "vtkImageToImageFilter.h"
31 class VTK_IMAGING_EXPORT vtkImageRGBToHSV : public vtkImageToImageFilter
34 static vtkImageRGBToHSV *New();
35 vtkTypeRevisionMacro(vtkImageRGBToHSV,vtkImageToImageFilter);
36 void PrintSelf(ostream& os, vtkIndent indent);
40 // Hue is an angle. Maximum specifies when it maps back to 0. HueMaximum
41 // defaults to 255 instead of 2PI, because unsigned char is expected as
42 // input. Maximum also specifies the maximum of the Saturation.
43 vtkSetMacro(Maximum,float);
44 vtkGetMacro(Maximum,float);
48 ~vtkImageRGBToHSV() {};
52 void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
55 vtkImageRGBToHSV(const vtkImageRGBToHSV&); // Not implemented.
56 void operator=(const vtkImageRGBToHSV&); // Not implemented.