casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
ColorDistribution.h
Go to the documentation of this file.
00001 //# ColorDistribution.h: global functions for generating color cube dimensions
00002 //# Copyright (C) 1994,1995,1996,1997,1998,1999
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id$
00027 
00028 #ifndef TRIALDISPLAY_COLORDISTRIBUTION_H
00029 #define TRIALDISPLAY_COLORDISTRIBUTION_H
00030 
00031 #include <casa/aips.h>
00032 
00033 namespace casa { //# NAMESPACE CASA - BEGIN
00034 
00035 // <summary>
00036 // Global functions for generating color cube dimensions
00037 // </summary>
00038 
00039 // This table is used to map X number of color cells
00040 // into an even cube for RGB distribution.  It is unclear
00041 // in my mind what a good HSV distribution ought to be.
00042 // Maybe read table as H,V,S.  Probably build different
00043 // one for HSV.
00044 
00045 // <group name="Color Distribution interface">
00046 
00047 typedef struct 
00048 {
00049 unsigned int nCells;
00050 unsigned int nRed, nGreen, nBlue;
00051 } colorDistItem;
00052 
00053 
00054 // Given nCells cells, return the dimensions of an RGB or HSV color cube
00055 // that maximally uses those cells by finding the best fit dimensions.
00056 // If pow2 is True, then returned dimensions are limited to powers of two.
00057 // <group>
00058 Bool getRGBDistribution(uInt nCells, Bool pow2,
00059                         uInt & nRed, uInt & nGreen, uInt & nBlue);
00060 Bool getHSVDistribution(uInt nCells, Bool pow2,
00061                         uInt & nHue, uInt & nSat, uInt & nVal);
00062 // </group>
00063 // </group>
00064 
00065 
00066 } //# NAMESPACE CASA - END
00067 
00068 #endif