OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / include / vtk / vtkImageRGBToHSV.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkImageRGBToHSV.h,v $
5   Language:  C++
6   Date:      $Date: 2002/01/22 15:33:17 $
7   Version:   $Revision: 1.22 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
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.
16
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.
23
24
25 #ifndef __vtkImageRGBToHSV_h
26 #define __vtkImageRGBToHSV_h
27
28
29 #include "vtkImageToImageFilter.h"
30
31 class VTK_IMAGING_EXPORT vtkImageRGBToHSV : public vtkImageToImageFilter
32 {
33 public:
34   static vtkImageRGBToHSV *New();
35   vtkTypeRevisionMacro(vtkImageRGBToHSV,vtkImageToImageFilter);
36   void PrintSelf(ostream& os, vtkIndent indent);
37
38   // Description:
39
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);
45   
46 protected:
47   vtkImageRGBToHSV();
48   ~vtkImageRGBToHSV() {};
49
50   float Maximum;
51   
52   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
53                        int ext[6], int id);
54 private:
55   vtkImageRGBToHSV(const vtkImageRGBToHSV&);  // Not implemented.
56   void operator=(const vtkImageRGBToHSV&);  // Not implemented.
57 };
58
59 #endif
60
61
62