Generates ~36 distinguishable colors by cycling through HSV space.
More...
#include <mitkColorSequenceCycleH.h>
Generates ~36 distinguishable colors by cycling through HSV space.
Starting from fully saturated red (H=0), the sequence cycles through:
- Fully saturated colors (hue increments of 60 degrees)
- Colors with halved saturation
- Colors with halved value
After exhausting all combinations the colors repeat.
- See also
- ColorSequence, ColorSequenceRainbow
Definition at line 32 of file mitkColorSequenceCycleH.h.
◆ ColorSequenceCycleH()
| mitk::ColorSequenceCycleH::ColorSequenceCycleH |
( |
| ) |
|
Construct and initialize to the first color (red, H=0).
◆ ~ColorSequenceCycleH()
| mitk::ColorSequenceCycleH::~ColorSequenceCycleH |
( |
| ) |
|
|
override |
◆ ChangeHueValueByAbsoluteNumber()
| virtual void mitk::ColorSequenceCycleH::ChangeHueValueByAbsoluteNumber |
( |
float |
number | ) |
|
|
virtual |
Set the hue to an absolute value.
Values below 0 are clamped to 0. The range is [0, 360).
- Parameters
-
| [in] | number | The absolute hue value. |
◆ ChangeHueValueByCycleSteps()
| virtual void mitk::ColorSequenceCycleH::ChangeHueValueByCycleSteps |
( |
int |
steps | ) |
|
|
virtual |
Advance the hue by a given number of cycle steps.
Each step corresponds to a 60-degree hue increment. Negative values are clamped to 0.
- Note
- This does not change saturation or value (i.e., the color cycle). Use SetColorCycle() to change those.
- Parameters
-
| [in] | steps | Number of 60-degree hue increments. |
◆ GetNextColor()
| Color mitk::ColorSequenceCycleH::GetNextColor |
( |
| ) |
|
|
overridevirtual |
◆ GoToBegin()
| void mitk::ColorSequenceCycleH::GoToBegin |
( |
| ) |
|
|
overridevirtual |
◆ SetColorCycle()
| virtual void mitk::ColorSequenceCycleH::SetColorCycle |
( |
unsigned short |
cycle | ) |
|
|
virtual |
Set the color cycle index (0–5).
Controls the saturation/value combination used. Combine with hue changes to select specific colors.
- Parameters
-
| [in] | cycle | The cycle index (0–5). |
◆ color_cycle
| unsigned short mitk::ColorSequenceCycleH::color_cycle |
|
protected |
◆ color_h
| float mitk::ColorSequenceCycleH::color_h |
|
protected |
◆ color_s
| float mitk::ColorSequenceCycleH::color_s |
|
protected |
◆ color_v
| float mitk::ColorSequenceCycleH::color_v |
|
protected |
The documentation for this class was generated from the following file: