casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ColorConversion.h
Go to the documentation of this file.
1 //# ColorConversion.h: utilities for converting between color spaces
2 //# Copyright (C) 1994,1995,1996,1997,1998,1999,2000
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef TRIALDISPLAY_COLORCONVERSION_H
29 #define TRIALDISPLAY_COLORCONVERSION_H
30 
31 // <summary>
32 // Utilities for converting between color spaces
33 // </summary>
34 //
35 // <synopsis>
36 // provides vectorized and single color conversion between RGB and
37 // HSV color spaces. Operates using float type with the range of
38 // 0.0 to 1.0 for all R,G,B,H,S,V values.
39 // </synopsis>
40 //
41 // <motivation>
42 // want to be able to create something that acts like an "HSV" colormap
43 // </motivation>
44 //
45 // <group name="RGB/HSV casacore::Conversion Functions">
46 
47 
48 /*
49 
50 
51 #include <graphics/X11/X_enter.h>
52 #include <X11/Xlib.h>
53 #include <graphics/X11/X_exit.h>
54 
55 
56 */
57 #include <casa/aips.h>
58 #include <casa/Arrays/Array.h>
59 
60 namespace casa { //# NAMESPACE CASA - BEGIN
61 
62 // map a single hsv value to an rgb value
63 // assumes h, s, and v to be in range [0, 1]. Returns r, g, b in range [0, 1].
65  casacore::Float &red, casacore::Float &green, casacore::Float &blue);
66 
67 // map an array of hsv values to an array of rgb value
71 
72 // map a single rgb value to its hsv value
73 //Assumes r, g, and b to be in range [0, 1]. Returns h, s, v in range [0, 1].
76 
77 // map an array of rgb values to an array of hsv values
81 
82 
83 // </group>
84 
85 
86 } //# NAMESPACE CASA - END
87 
88 #endif
float Float
Definition: aipstype.h:54
void rgbToHsv(casacore::Float r, casacore::Float g, casacore::Float b, casacore::Float &h, casacore::Float &s, casacore::Float &v)
map a single rgb value to its hsv value Assumes r, g, and b to be in range [0, 1].
void hsvToRgb(casacore::Float h, casacore::Float s, casacore::Float v, casacore::Float &red, casacore::Float &green, casacore::Float &blue)
map a single hsv value to an rgb value assumes h, s, and v to be in range [0, 1]. ...