MRaster lib 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
mainPage.cpp
Go to the documentation of this file.
1// -*- Mode:C++; Coding:us-ascii-unix; fill-column:158 -*-
2/*******************************************************************************************************************************************************.H.S.**/
3/**
4 @file mainPage.cpp
5 @author Mitch Richling <https://www.mitchr.me>
6 @brief Doxygen content -- not part of the library.@EOL
7 @copyright
8 @parblock
9 Copyright (c) 1988-2015, Mitchell Jay Richling <https://www.mitchr.me> All rights reserved.
10
11 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
12
13 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer.
14
15 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation
16 and/or other materials provided with the distribution.
17
18 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software
19 without specific prior written permission.
20
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
26 DAMAGE.
27 @endparblock
28*/
29/*******************************************************************************************************************************************************.H.E.**/
30
31/**
32 @mainpage
33 Introduction
34 ============
35
36 For a bit more detail about *MRaster*: http://richmit.github.io/mraster/index.html
37
38 A quick start guide: http://richmit.github.io/mraster/QuickStart.html
39
40 The code: [[https://github.com/richmit/mraster/]]
41
42 Notes on the Code
43 =================
44
45 The code for this library all lives within the namespace of 'mjr' -- my initials. This should help to avoid namespace conflicts.
46
47 At this time everything is implemented in header files.
48
49 As far as I know this code infringes upon no patents or other IP.
50
51 Organization of the code and include files
52 ==========================================
53
54 The library is template based and the primary players, canvas and color classes, are all templates. Common data types, 4 channel/24-bit color
55 types and canvases that use them for example, all have typedefs. In addition, the various headers implementing the templates are included by
56 headers defining the typedefs. In this way, common usage of the library requires no use of template syntax (or the extra typing).
57
58 The include files:
59
60 - MRcolor.hpp ....... The include file most users will include for color support
61 - ramCanvas.hpp ..... The include file most users will include for ramCanvas support (includes MRcolor.hpp)
62 - MRcolorTpl.hpp .... Implementation of the color/pixel object
63 - ramCanvasTpl.hpp .. Implementation for ramCanvasTpl object
64 - mjrmath.hpp ....... Simple math stuff
65 - mainPage.cpp ...... Documentation
66
67 About Color Type Templates
68 ==========================
69
70 Color types are intended to store all color information for a single pixel. Most common image structures can be identified by the number of
71 channels (Red, Green, and Blue for example) and the depth of each channel (8-bit for example). The most common configurations are:
72
73 |---------+---------+------+-------+------------------+-------------------------------------------------|
74 | Channel | Bits | Data | bits | | |
75 | Count | Per | Data | per | Common Name | Notes |
76 | | Channel | | pixel | | |
77 |---------+---------+------+-------+------------------+-------------------------------------------------|
78 | 3 | 8 | RGB | 24 | 24-bit truecolor | Very common format. |
79 | 4 | 8 | RGBA | 32 | truecolor+alpha | Very common format. |
80 | 3 | 16 | RGB | 48 | 48-bit color | High quality digital camera sensors. |
81 | 3 | 32 | RGB | 96 | 96-bit color | Usually a fusion from multiple CCDs |
82 | 1 | 8 | Grey | 8 | 8-bit greyscale | Surveillance and Low Quality scientific imaging |
83 | 1 | 16 | Grey | 16 | 16-bit greyscale | Typical scientific CCD equipment |
84 | 1 | 32 | Grey | 32 | 32-bit greyscale | High end scientific CCD equipment |
85 |---------+---------+------+-------+------------------+-------------------------------------------------|
86
87 Several aspects of the colorTpl template are not included in the Doxygen documentation because Doxygen has trouble
88 with complex meta-programming constructs. In particular:
89 - Types
90 - maskType - Unsigned integer mask to cover the channel array without wasting too much space.
91 - channelArithDType - Arithmetic type for differences of clrChanT values.
92 - channelArithSPType - Arithmetic type for sums and products of clrChanT values.
93 - channelArithSDPType - Arithmetic type for sums, differences, and products of clrChanT values.
94 - channelArithFltType - Floating point type suitable for arithmetic of clrChanT values.
95 - channelArithLogType - Arithmetic type suitable for for logical operations of clrChanT values.
96 - csIntType - Integer type used to select colors from a color scheme
97 - csFltType - Floating point type used to select colors from a color scheme
98 - csNatType - A type used to select colors from a color scheme (it will be integral when clrChanT is integral, and floating point otherwise)
99 - Predefined color scheme classes are documented here: http://richmit.github.io/mraster/ColorSchemes.html
100
101 Drawing
102 =======
103
104 Primitive drawing functions generally come in several forms:
105
106 - foo(<integer_coords>, <color>)
107 - foo(<integer_coords>)
108 - foo()
109 - foo(<float_coords>, <color>)
110 - foo(<float_coords>)
111 - foo(<integer_points>, <color>)
112 - foo(<integer_points>)
113 - foo(<float_points>, <color>)
114 - foo(<float_points>)
115 - foo(<array_of_integer_points>, <color>)
116 - foo(<array_of_integer_points>)
117 - foo(<array_of_float_points>, <color>)
118 - foo(<array_of_float_points>)
119
120 This library supports both the "moveTo/lineTo" paradigm (i.e. move to A, draw line to B), and the "absolute" paradigm (i.e. draw a line from A to B).
121 Because of this, some primitive drawing functions also have forms with fewer coordinates specified. For example, we have a point drawing function that takes
122 no arguments. Just with fewer coordinates. Some primitives, like circles, require extra parameters to describe the primitive. Such parameters right before
123 the color arguments or last in the argument list if no color is specified.
124
125*/
126
127
128
129