Scribus
Open source desktop publishing at your fingertips
VisionDefectColor Class Reference

This code is an implementation of an algorithm described by Hans Brettel, Francoise Vienot and John Mollon in the Journal of the Optical Society of America V14(10), pg 2647. (See http://vischeck.com/ for more info.). More...

#include <colorblind.h>

Inheritance diagram for VisionDefectColor:
Collaboration diagram for VisionDefectColor:

Public Types

enum  defectMode {
  normalVision = 0, protanopeVision = 1, deuteranopeVision = 2, tritanopeVision = 3,
  colorBlindnessVision = 4
}
 Enumerate Vision Defects for readable ComboBox access.
 

Public Member Functions

 VisionDefectColor (int r, int g, int b)
 QColor like constructors. Setup the RGB parts, then init(). More...
 
 VisionDefectColor (QColor c)
 QColor like constructors. Setup the RGB parts, then init(). More...
 
 VisionDefectColor ()
 Default constructors. Setup the RGB parts to default values, then init().
 
void convertDefect ()
 Perform conversion itself. Gama removing, RGB2LSM, matrix operation for selected deficiency, LSM2RGB, gama applying.
 
QColor convertDefect (QColor c, int d)
 Perform conversion itself. Confidence overload to perform the conversion in one step;. More...
 
uint getRed ()
 Return the color parts. More...
 
uint getGreen ()
 Return the color parts. More...
 
uint getBlue ()
 Return the color parts. More...
 
QColor getColor ()
 Return QColor. More...
 

Public Attributes

int deficiency
 Actual defect type. One of the 'defectMode'.
 

Detailed Description

This code is an implementation of an algorithm described by Hans Brettel, Francoise Vienot and John Mollon in the Journal of the Optical Society of America V14(10), pg 2647. (See http://vischeck.com/ for more info.).

Based on the GIMP's cdisplay_colorblind.c by Michael Natterer mitch.nosp@m.@gim.nosp@m.p.org, Sven Neumann sven@.nosp@m.gimp.nosp@m..org, Robert Dougherty bob@v.nosp@m.isch.nosp@m.eck.c.nosp@m.om and Alex Wade alex@.nosp@m.visc.nosp@m.heck..nosp@m.com.

This code is written using "Scribus coding standard" as a part of the Scribus project (www.scribus.net).

Author
Petr Vanek petr@.nosp@m.scri.nosp@m.bus.i.nosp@m.nfo

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Constructor & Destructor Documentation

VisionDefectColor::VisionDefectColor ( int  r,
int  g,
int  b 
)

QColor like constructors. Setup the RGB parts, then init().

Parameters
rred part of the color
ggreen part of the color
bblue part of the color
VisionDefectColor::VisionDefectColor ( QColor  c)

QColor like constructors. Setup the RGB parts, then init().

Parameters
cQColor object

Member Function Documentation

QColor VisionDefectColor::convertDefect ( QColor  c,
int  d 
)

Perform conversion itself. Confidence overload to perform the conversion in one step;.

Parameters
cQColor object
ddefect type
Return values
QColorconverted color Gama removing, RGB2LSM, matrix operation for selected deficiency, LSM2RGB, gama applying.
uint VisionDefectColor::getBlue ( )

Return the color parts.

Return values
uintblue part
QColor VisionDefectColor::getColor ( )

Return QColor.

Return values
QColornew QColor
uint VisionDefectColor::getGreen ( )

Return the color parts.

Return values
uintgreen part
uint VisionDefectColor::getRed ( )

Return the color parts.

Return values
uintred part

The documentation for this class was generated from the following files: