#include "stdafx.h"
#include "ColorTransfer.h"
#include "find_roots.hpp"
#include <complex>
Functions | |
static void | setColor (int aLowerMark, int anUpperMark) |
static void | setOpacity (int aLowerMark, int anUpperMark) |
static void | setSplineColors () |
static void | setLinearColors () |
static void | setSplineOpacity () |
static Float_Color | getSplineInterpolatedColor (int aPosition) |
static float | getSplineInterpolatedOpacity (int aPosition) |
static double | getIntensityAtSplineTravelPosition (double aPos, int aBeforePrevNode, int aPrevNode, int aNextNode, int anAfterNextNode) |
void | ColorTransfer::init () |
void | ColorTransfer::end () |
RGBAColor | ColorTransfer::getIntensity (int anIntensity) |
void | ColorTransfer::removeColorMarker (int anIntensity) |
void | ColorTransfer::removeOpacityMarker (int anIntensity) |
void | ColorTransfer::addMarker (int anIntensity, Float_Color aColor) |
void | ColorTransfer::addMarker (int anIntensity, float anOpacity) |
std::map< int, Float_Color > * | ColorTransfer::getColorTransferPt () |
std::map< int, float > * | ColorTransfer::getOpacityTransferPt () |
void | ColorTransfer::useSpline (bool useSplines) |
bool | ColorTransfer::splineIsUsed () |
void | ColorTransfer::useExactAlgorithm (bool useIt) |
Variables | |
static std::map< int, Float_Color > | theColorTransfer |
static std::map< int, float > | theOpacityTransfer |
static RGBAColor * | theColors = NULL |
static bool | useSplineInterpolation = false |
static bool | useIntensitySearchPerStepSize = true |
static int | theAllowedIterations = 1000 |
maximum iteration length for spline - intensity position search | |
static int | theIterationNoToReduceStepSize = 25 |
reduce the step legth (for intensity search) beginning at this iteration |
static double getIntensityAtSplineTravelPosition | ( | double | aPos, | |
int | aBeforePrevNode, | |||
int | aPrevNode, | |||
int | aNextNode, | |||
int | anAfterNextNode | |||
) | [static] |
calculates the intensity at a given position using a catmull-rom spline
aPos | the relative position between the two nodes | |
aBeforePrevNode | the node before the previous node | |
aPrevNode | the previous node | |
aNextNode | the next node | |
anAfterNextNode | the node after the next node |
static Float_Color getSplineInterpolatedColor | ( | int | aPosition | ) | [static] |
calculates the color at a given intensity using a catmull-rom spline
aPosition | the intinsity value to calculate the color for |
static float getSplineInterpolatedOpacity | ( | int | aPosition | ) | [static] |
calculates the opacity at a given intensity using a catmull-rom spline
aPosition | the intinsity value to calculate the opacity for |
static void setColor | ( | int | aLowerMark, | |
int | anUpperMark | |||
) | [static] |
linearly computes all color values between given intensity values
aLowerMark | the lower intensity value | |
anUpperMark | the higher intensity value |
static void setLinearColors | ( | ) | [static] |
computes all color values using linear interpolation
static void setOpacity | ( | int | aLowerMark, | |
int | anUpperMark | |||
) | [static] |
linearly computes all opacity values between given intensity values
aLowerMark | the lower intensity value | |
anUpperMark | the higher intensity value |
static void setSplineColors | ( | ) | [static] |
computes all color values using catmull-rom splines
static void setSplineOpacity | ( | ) | [static] |
int theAllowedIterations = 1000 [static] |
maximum iteration length for spline - intensity position search
std::map<int, Float_Color> theColorTransfer [static] |
int theIterationNoToReduceStepSize = 25 [static] |
reduce the step legth (for intensity search) beginning at this iteration
std::map<int, float> theOpacityTransfer [static] |
bool useIntensitySearchPerStepSize = true [static] |
bool useSplineInterpolation = false [static] |