OpenCMISS-Zinc C++ API Documentation
|
Maps a single component of a data field to colour in a spectrum. More...
#include <spectrum.hpp>
Public Types | |
enum | ScaleType { SCALE_TYPE_INVALID = CMZN_SPECTRUMCOMPONENT_SCALE_TYPE_INVALID, SCALE_TYPE_LINEAR = CMZN_SPECTRUMCOMPONENT_SCALE_TYPE_LINEAR, SCALE_TYPE_LOG = CMZN_SPECTRUMCOMPONENT_SCALE_TYPE_LOG } |
enum | ColourMappingType { COLOUR_MAPPING_TYPE_INVALID = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_INVALID, COLOUR_MAPPING_TYPE_ALPHA = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_ALPHA, COLOUR_MAPPING_TYPE_BANDED = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_BANDED, COLOUR_MAPPING_TYPE_BLUE = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_BLUE, COLOUR_MAPPING_TYPE_GREEN = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_GREEN, COLOUR_MAPPING_TYPE_MONOCHROME = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_MONOCHROME, COLOUR_MAPPING_TYPE_RAINBOW = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_RAINBOW, COLOUR_MAPPING_TYPE_RED = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_RED, COLOUR_MAPPING_TYPE_STEP = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_STEP, COLOUR_MAPPING_TYPE_WHITE_TO_BLUE = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_WHITE_TO_BLUE, COLOUR_MAPPING_TYPE_WHITE_TO_RED = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_WHITE_TO_RED, COLOUR_MAPPING_TYPE_WHITE_TO_GREEN = CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_WHITE_TO_GREEN } |
Public Member Functions | |
Spectrumcomponent (cmzn_spectrumcomponent_id in_spectrumcomponent_id) | |
Spectrumcomponent (const Spectrumcomponent &spectrumComponent) | |
Spectrumcomponent & | operator= (const Spectrumcomponent &spectrumComponent) |
bool | isValid () const |
cmzn_spectrumcomponent_id | getId () const |
double | getRangeMinimum () |
int | setRangeMinimum (double value) |
double | getRangeMaximum () |
int | setRangeMaximum (double value) |
double | getColourMinimum () |
int | setColourMinimum (double value) |
double | getColourMaximum () |
int | setColourMaximum (double value) |
double | getStepValue () |
int | setStepValue (double value) |
double | getExaggeration () |
int | setExaggeration (double value) |
double | getBandedRatio () |
int | setBandedRatio (double value) |
bool | isActive () |
int | setActive (bool active) |
bool | isColourReverse () |
int | setColourReverse (bool reverse) |
bool | isExtendAbove () |
int | setExtendAbove (bool extend_above) |
bool | isExtendBelow () |
int | setExtendBelow (bool extend_below) |
int | getFieldComponent () |
int | setFieldComponent (int componentNumber) |
bool | isFixMaximum () |
int | setFixMaximum (bool fixMaximum) |
bool | isFixMinimum () |
int | setFixMinimum (bool fixMinimum) |
int | getNumberOfBands () |
int | setNumberOfBands (int numberOfBands) |
ScaleType | getScaleType () |
int | setScaleType (ScaleType scaleType) |
ColourMappingType | getColourMappingType () |
int | setColourMappingType (ColourMappingType colourMapping) |
Protected Attributes | |
cmzn_spectrumcomponent_id | id |
Maps a single component of a data field to colour in a spectrum.
A spectrumcomponent object maps a single component of a data field to one of several colour ramps, rainbow, alpha ramp, contour bands or a step function. A spectrum may blend multiple components to give the overall colouring.
Colour mapping mode for specctrum component. Appearances of these mappings can be altered by the various APIs provided in spectrum and spectrum components APIs.
Controls the mapping of field value to colour in a spectrum component.
|
inline |
Get the value determining the proportion of band present on each section, number of sections in a spectrum is determined by number of bands, value must be larger than 0.0 and must not exceed 1.0.
|
inline |
Get the colour_mapping_type of this component.
|
inline |
Get the colour value mapped to the maximum spectrum component data range. This is a normalised value from 0.0 to 1.0.
|
inline |
Get the colour value mapped to the minimum spectrum component data range. This is a normalised value from 0.0 to 1.0.
|
inline |
Get the value which alters the colour progression when scale type is set to SCALE_TYPE_LOG.
|
inline |
Get the field component lookup number of a spectrum component, this value determines which of the field component this spectrum component will look up on.
|
inline |
Return the C handle of the Spectrumcomponent object.
|
inline |
Get the number of bands this component contains within its range in CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_BANDED
|
inline |
Get the maximum value of the range this spectrum component will lookup to on targeted field. Primitives with this field value will display the maximum colour value of the component colour type
|
inline |
Get the minimum value of the range this spectrum component will lookup to on targeted field. Primitives with this field value will display the minimum colour value of the component colour type
|
inline |
Get the interpolation_mode of this component.
|
inline |
Get the step value of a spectrum component. The step spectrum defines the boundary between the red and blue colour of the COLOUR_MAPPING_TYPE_STEP spectrum compomemt.
|
inline |
Get the active state of a spectrum component, only active spectrum component will be rendered
|
inline |
Get the reverse flag of a spectrum component, reverse spectrum component will have the colour rendered reversely.
|
inline |
Get the 'extend above' flag of a spectrum component, which controls whether values above the maximum are rendered for this component.
|
inline |
Get the 'extend below' flag of a spectrum component, which controls whether values below the minimum are rendered for this component.
|
inline |
Query whether this component's data range maximum is marked as fixed.
|
inline |
Query whether this component's data range minimum is marked as fixed.
|
inline |
Check if this is a valid Spectrumcomponent object.
|
inline |
Set the active state of a spectrum component, only active spectrum component will be rendered
active | Value to be set to the zinc spectrum component. |
|
inline |
Set the value determining the proportion of band present on each section, number of sections in a spectrum is determined by number of bands, value must be larger than 0.0 and must not exceed 1.0.
the banded ratio to be set
|
inline |
Set the colour_mapping_type of this component.
colourMapping | colour_mapping_type to be set for spectrum component |
|
inline |
Set the colour value mapped to the maximum spectrum component data range. This is a normalised value from 0.0 to 1.0, mapping to a position in the colour map. For simple colour mappings red, green, blue and alpha, this gives the exact colour component value at the maximum data range, which is interpolated to the minimum colour at the minimum data range. Note that setting 'reverse' colours reverses the association of colour range and data range; it is recommended the colour minimum and maximum be swapped instead of using reverse. Changing this value does not affect COLOUR_MAPPING_TYPE_BANDED which is only affected by the number and ratio of bands.
The maximum colour value to set, from 0.0 to 1.0.
|
inline |
Set the colour value mapped to the minimum spectrum component data range. This is a normalised value from 0.0 to 1.0, mapping to a position in the colour map. For simple colour mappings red, green, blue and alpha, this gives the exact colour component value at the minimum data range, which is interpolated to the maximum colour at the maximum data range. Note that setting 'reverse' colours reverses the association of colour range and data range; it is recommended the colour minimum and maximum be swapped instead of using reverse.
The minimum colour value to set, from 0.0 to 1.0.
|
inline |
Set the reverse flag of a spectrum component, which if set maps the colour maximum to the data range minimum, and the colour minimum to the data range maximum. This is primarily intended to reverse the rainbow colour map. With most colour maps, swapping the colour minimum and maximum values is easier to explain and achieves the same result.
reverse | Value to be set to the zinc spectrum component. |
|
inline |
Set the value which alters the colour progression when scale type is set to SCALE_TYPE_LOG
value | The exaggeration value to be set. |
|
inline |
Set the 'extend above' flag of a spectrum component. When on (true), values above the maximum are rendered with the same colour as the maximum value. When off, no colour is set for this component for values above the maximum value. By default, extend above is on (true).
extend_above | Value to be set to the zinc spectrum component. |
|
inline |
Set the 'extend below' flag of a spectrum component. When on (true), values below the minimum are rendered with the same colour as the minimum value. When off, no colour is set for this component for values below the minimum value. By default, extend below is on (true).
extend_below | Value to be set to the zinc spectrum component. |
|
inline |
Set the field component lookup number of a spectrum component, this value determines which of the field component this spectrum component will look up on.
|
inline |
Set hint for whether to fix this component's data range maximum when fitting the spectrum ranges to the range of data in the model visualisation. If true, the maximum should be fixed at its current value. If false, it can change e.g. scale in proportion to other data ranges. This attribute is metadata i.e. it does not affect the spectrum result. Its default value is false i.e. the maximum is not fixed.
fixMaximum | The new state of the fix maximum flag. |
|
inline |
Set hint for whether to fix this component's data range minimum when fitting the spectrum ranges to the range of data in the model visualisation. If true, the minimum should be fixed at its current value. If false, it can change e.g. scale in proportion to other data ranges. This attribute is metadata i.e. it does not affect the spectrum result. Its default value is false i.e. the minimum is not fixed.
fixMinimum | The new state of the fix minimum flag. |
|
inline |
Set the number of bands this component contains within its range in CMZN_SPECTRUMCOMPONENT_COLOUR_MAPPING_TYPE_BANDED
numberOfBands | of bands number of bands for this component |
|
inline |
Set the maximum value of the range this spectrum component will lookup to on targeted field. Primitives with this field value will display the maximum colour value of the component colour type
the value to be set for range maximum
|
inline |
Set the minimum value of the range this spectrum component will lookup to on targeted field. Primitives with this field value will display the minimum colour value of the component colour type
the value to be set for range minimum
|
inline |
Set the interpolation_mode of this component.
scaleType | Interpolation mode to be set for spectrum component |
|
inline |
Set the step value of a spectrum component. The step spectrum defines the boundary between the red and blue colour of the COLOUR_MAPPING_TYPE_STEP spectrum component.
the step value to be set