9 #ifndef CMZN_SPECTRUM_HPP__ 10 #define CMZN_SPECTRUM_HPP__ 12 #include "opencmiss/zinc/spectrum.h" 13 #include "opencmiss/zinc/context.hpp" 21 class Spectrummodulenotifier;
34 cmzn_spectrumcomponent_id id;
45 cmzn_spectrumcomponent_id in_spectrumcomponent_id) :
46 id(in_spectrumcomponent_id)
51 id(cmzn_spectrumcomponent_access(spectrumComponent.id))
57 cmzn_spectrumcomponent_id temp_id = cmzn_spectrumcomponent_access(
58 spectrumComponent.id);
61 cmzn_spectrumcomponent_destroy(&
id);
71 cmzn_spectrumcomponent_destroy(&
id);
169 cmzn_spectrumcomponent_id
getId()
const 183 return cmzn_spectrumcomponent_get_range_minimum(
id);
197 return cmzn_spectrumcomponent_set_range_minimum(
id, value);
209 return cmzn_spectrumcomponent_get_range_maximum(
id);
223 return cmzn_spectrumcomponent_set_range_maximum(
id, value);
234 return cmzn_spectrumcomponent_get_colour_minimum(
id);
255 return cmzn_spectrumcomponent_set_colour_minimum(
id,value);
266 return cmzn_spectrumcomponent_get_colour_maximum(
id);
286 return cmzn_spectrumcomponent_set_colour_maximum(
id, value);
299 return cmzn_spectrumcomponent_get_step_value(
id);
313 return cmzn_spectrumcomponent_set_step_value(
id, value);
325 return cmzn_spectrumcomponent_get_exaggeration(
id);
338 return cmzn_spectrumcomponent_set_exaggeration(
id, value);
351 return cmzn_spectrumcomponent_get_banded_ratio(
id);
365 return cmzn_spectrumcomponent_set_banded_ratio(
id, value);
377 return cmzn_spectrumcomponent_is_active(
id);
390 return cmzn_spectrumcomponent_set_active(
id, active);
402 return cmzn_spectrumcomponent_is_colour_reverse(
id);
418 return cmzn_spectrumcomponent_set_colour_reverse(
id, reverse);
431 return cmzn_spectrumcomponent_is_extend_above(
id);
447 return cmzn_spectrumcomponent_set_extend_above(
id, extend_above);
460 return cmzn_spectrumcomponent_is_extend_below(
id);
476 return cmzn_spectrumcomponent_set_extend_below(
id, extend_below);
490 return cmzn_spectrumcomponent_get_field_component(
id);
505 return cmzn_spectrumcomponent_set_field_component(
id,
517 return cmzn_spectrumcomponent_is_fix_maximum(
id);
533 return cmzn_spectrumcomponent_set_fix_maximum(
id, fixMaximum);
544 return cmzn_spectrumcomponent_is_fix_minimum(
id);
560 return cmzn_spectrumcomponent_set_fix_minimum(
id, fixMinimum);
573 return cmzn_spectrumcomponent_get_number_of_bands(
id);
587 return cmzn_spectrumcomponent_set_number_of_bands(
id, numberOfBands);
600 return static_cast<ScaleType>(cmzn_spectrumcomponent_get_scale_type(
614 return cmzn_spectrumcomponent_set_scale_type(
id,
615 static_cast<cmzn_spectrumcomponent_scale_type>(scaleType));
628 return static_cast<ColourMappingType>(cmzn_spectrumcomponent_get_colour_mapping_type(
642 return cmzn_spectrumcomponent_set_colour_mapping_type(
id,
643 static_cast<cmzn_spectrumcomponent_colour_mapping_type>(colourMapping));
669 explicit Spectrum(cmzn_spectrum_id in_spectrum_id) :
675 id(cmzn_spectrum_access(spectrum.id))
681 cmzn_spectrum_id temp_id = cmzn_spectrum_access(spectrum.id);
684 cmzn_spectrum_destroy(&
id);
694 cmzn_spectrum_destroy(&
id);
703 CHANGE_FLAG_NONE = CMZN_SPECTRUM_CHANGE_FLAG_NONE,
705 CHANGE_FLAG_ADD = CMZN_SPECTRUM_CHANGE_FLAG_ADD,
707 CHANGE_FLAG_REMOVE = CMZN_SPECTRUM_CHANGE_FLAG_REMOVE,
709 CHANGE_FLAG_IDENTIFIER = CMZN_SPECTRUM_CHANGE_FLAG_IDENTIFIER,
711 CHANGE_FLAG_DEFINITION = CMZN_SPECTRUM_CHANGE_FLAG_DEFINITION,
713 CHANGE_FLAG_FULL_RESULT = CMZN_SPECTRUM_CHANGE_FLAG_FULL_RESULT,
715 CHANGE_FLAG_FINAL = CMZN_SPECTRUM_CHANGE_FLAG_FINAL
754 return cmzn_spectrum_is_managed(
id);
768 return cmzn_spectrum_set_managed(
id, value);
782 return cmzn_spectrum_begin_change(
id);
795 return cmzn_spectrum_end_change(
id);
806 return cmzn_spectrum_get_name(
id);
818 return cmzn_spectrum_set_name(
id, name);
828 return cmzn_spectrum_get_number_of_spectrumcomponents(
id);
860 cmzn_spectrum_get_next_spectrumcomponent(
id, refComponent.
getId()));
872 cmzn_spectrum_get_previous_spectrumcomponent(
id, refComponent.
getId()));
887 return cmzn_spectrum_move_spectrumcomponent_before(
id, component.
getId(),
888 refComponent.
getId());
903 return cmzn_spectrum_remove_spectrumcomponent(
id, component.
getId());
915 return cmzn_spectrum_remove_all_spectrumcomponents(
id);
929 return cmzn_spectrum_is_material_overwrite(
id);
940 return cmzn_spectrum_set_material_overwrite(
id, overwrite);
973 cmzn_spectrumiterator_id id;
986 id(cmzn_spectrumiterator_access(spectrumiterator.id))
991 cmzn_spectrumiterator_id temp_id = cmzn_spectrumiterator_access(spectrumiterator.id);
994 cmzn_spectrumiterator_destroy(&
id);
1004 cmzn_spectrumiterator_destroy(&
id);
1028 return Spectrum(cmzn_spectrumiterator_next(
id));
1040 cmzn_spectrummodule_id id;
1050 explicit Spectrummodule(cmzn_spectrummodule_id in_spectrummodule_id) :
1051 id(in_spectrummodule_id)
1056 id(cmzn_spectrummodule_access(spectrummodule.id))
1062 cmzn_spectrummodule_id temp_id = cmzn_spectrummodule_access(
1066 cmzn_spectrummodule_destroy(&
id);
1076 cmzn_spectrummodule_destroy(&
id);
1108 return Spectrum(cmzn_spectrummodule_create_spectrum(
id));
1136 return Spectrum(cmzn_spectrummodule_find_spectrum_by_name(
id, name));
1150 return cmzn_spectrummodule_begin_change(
id);
1164 return cmzn_spectrummodule_end_change(
id);
1177 return Spectrum(cmzn_spectrummodule_get_default_spectrum(
id));
1188 return cmzn_spectrummodule_set_default_spectrum(
id, spectrum.
getId());
1200 return cmzn_spectrummodule_read_description(this->
id, description);
1211 return cmzn_spectrummodule_write_description(this->
id);
1233 cmzn_spectrummoduleevent_id id;
1242 id(in_spectrummodule_event_id)
1246 id(cmzn_spectrummoduleevent_access(spectrummoduleEvent.id))
1251 cmzn_spectrummoduleevent_id temp_id = cmzn_spectrummoduleevent_access(spectrummoduleEvent.id);
1253 cmzn_spectrummoduleevent_destroy(&
id);
1262 cmzn_spectrummoduleevent_destroy(&
id);
1281 cmzn_spectrummoduleevent_id
getId()
const 1297 return cmzn_spectrummoduleevent_get_spectrum_change_flags(
id, spectrum.
getId());
1309 return cmzn_spectrummoduleevent_get_summary_spectrum_change_flags(
id);
1329 static void C_callback(cmzn_spectrummoduleevent_id spectrummoduleevent_id,
void *callbackVoid)
1331 Spectrummoduleevent spectrummoduleevent(cmzn_spectrummoduleevent_access(spectrummoduleevent_id));
1333 (*callback)(spectrummoduleevent);
1355 cmzn_spectrummodulenotifier_id id;
1364 id(in_spectrummodulenotifier_id)
1368 id(cmzn_spectrummodulenotifier_access(spectrummoduleNotifier.id))
1373 cmzn_spectrummodulenotifier_id temp_id = cmzn_spectrummodulenotifier_access(spectrummoduleNotifier.id);
1376 cmzn_spectrummodulenotifier_destroy(&
id);
1386 cmzn_spectrummodulenotifier_destroy(&
id);
1405 cmzn_spectrummodulenotifier_id
getId()
const 1422 return cmzn_spectrummodulenotifier_set_callback(
id, callback.C_callback, static_cast<void*>(&callback));
1433 return cmzn_spectrummodulenotifier_clear_callback(
id);
Maps a single component of a data field to colour in a spectrum.
Definition: spectrum.hpp:31
bool isFixMaximum()
Definition: spectrum.hpp:515
int setFieldComponent(int componentNumber)
Definition: spectrum.hpp:503
Spectrumiterator createSpectrumiterator()
Definition: spectrum.hpp:1123
bool isExtendBelow()
Definition: spectrum.hpp:458
Spectrumcomponent getNextSpectrumcomponent(const Spectrumcomponent &refComponent)
Definition: spectrum.hpp:857
int setColourReverse(bool reverse)
Definition: spectrum.hpp:416
int setRangeMinimum(double value)
Definition: spectrum.hpp:195
Spectrum findSpectrumByName(const char *name)
Definition: spectrum.hpp:1134
int setColourMinimum(double value)
Definition: spectrum.hpp:253
double getRangeMinimum()
Definition: spectrum.hpp:181
int getNumberOfBands()
Definition: spectrum.hpp:571
int readDescription(const char *description)
Definition: spectrum.hpp:1198
char * writeDescription()
Definition: spectrum.hpp:1209
Definition: spectrum.hpp:136
Definition: spectrum.hpp:92
bool isFixMinimum()
Definition: spectrum.hpp:542
ColourMappingType
Definition: spectrum.hpp:110
int getNumberOfSpectrumcomponents()
Definition: spectrum.hpp:826
int setScaleType(ScaleType scaleType)
Definition: spectrum.hpp:612
Spectrumcomponent createSpectrumcomponent()
Definition: spectrum.hpp:836
cmzn_spectrummodulenotifier_id getId() const
Definition: spectrum.hpp:1405
Container/manager for graphics visualising a region.
Definition: scene.hpp:38
int beginChange()
Definition: spectrum.hpp:1148
Spectrumcomponent getFirstSpectrumcomponent()
Definition: spectrum.hpp:846
ScaleType
Definition: spectrum.hpp:88
Spectrumcomponent getPreviousSpectrumcomponent(const Spectrumcomponent &refComponent)
Definition: spectrum.hpp:869
int endChange()
Definition: spectrum.hpp:1162
Spectrum::ChangeFlags getSummarySpectrumChangeFlags() const
Definition: spectrum.hpp:1307
double getColourMinimum()
Definition: spectrum.hpp:232
Definition: spectrum.hpp:114
Manages individual user notification of changes with a spectrum module.
Definition: spectrum.hpp:1352
Base class functor for spectrum module notifier callbacks.
Definition: spectrum.hpp:1322
Definition: spectrum.hpp:139
bool isValid() const
Definition: spectrum.hpp:1395
Definition: spectrum.hpp:133
int setExtendAbove(bool extend_above)
Definition: spectrum.hpp:445
Definition: spectrum.hpp:145
int ChangeFlags
Definition: spectrum.hpp:724
int setColourMaximum(double value)
Definition: spectrum.hpp:284
cmzn_spectrum_id getId() const
Definition: spectrum.hpp:741
Spectrum getDefaultSpectrum()
Definition: spectrum.hpp:1175
int setExtendBelow(bool extend_below)
Definition: spectrum.hpp:474
int removeAllSpectrumcomponents()
Definition: spectrum.hpp:913
Spectrum createSpectrum()
Definition: spectrum.hpp:1106
int beginChange()
Definition: spectrum.hpp:780
bool isMaterialOverwrite()
Definition: spectrum.hpp:927
Spectrum next()
Definition: spectrum.hpp:1026
ColourMappingType getColourMappingType()
Definition: spectrum.hpp:626
ChangeFlag
Definition: spectrum.hpp:701
double getRangeMaximum()
Definition: spectrum.hpp:207
int setMaterialOverwrite(bool overwrite)
Definition: spectrum.hpp:938
Information about changes to spectrums in the spectrum module.
Definition: spectrum.hpp:1230
cmzn_spectrumcomponent_id getId() const
Definition: spectrum.hpp:169
double getColourMaximum()
Definition: spectrum.hpp:264
Definition: spectrum.hpp:148
int setExaggeration(double value)
Definition: spectrum.hpp:336
int setNumberOfBands(int numberOfBands)
Definition: spectrum.hpp:585
int setManaged(bool value)
Definition: spectrum.hpp:766
bool isValid() const
Definition: spectrum.hpp:1013
Definition: spectrum.hpp:153
int endChange()
Definition: spectrum.hpp:793
Module managing all spectrums.
Definition: spectrum.hpp:1037
int setActive(bool active)
Definition: spectrum.hpp:388
int setFixMaximum(bool fixMaximum)
Definition: spectrum.hpp:531
Zinc Spectrum maps values of graphics data fields to colours.
Definition: spectrum.hpp:656
char * getName()
Definition: spectrum.hpp:804
int clearCallback()
Definition: spectrum.hpp:1431
Definition: spectrum.hpp:121
An iterator for looping through all the spectrums in a spectrum module.
Definition: spectrum.hpp:969
int getFieldComponent()
Definition: spectrum.hpp:488
ScaleType getScaleType()
Definition: spectrum.hpp:598
bool isValid() const
Definition: spectrum.hpp:1085
int setName(const char *name)
Definition: spectrum.hpp:816
int removeSpectrumcomponent(const Spectrumcomponent &component)
Definition: spectrum.hpp:901
cmzn_spectrummoduleevent_id getId() const
Definition: spectrum.hpp:1281
bool isExtendAbove()
Definition: spectrum.hpp:429
Definition: spectrum.hpp:130
double getStepValue()
Definition: spectrum.hpp:297
int moveSpectrumcomponentBefore(const Spectrumcomponent &component, const Spectrumcomponent &refComponent)
Definition: spectrum.hpp:884
Definition: spectrum.hpp:156
int setColourMappingType(ColourMappingType colourMapping)
Definition: spectrum.hpp:640
int setStepValue(double value)
Definition: spectrum.hpp:311
bool isValid() const
Definition: spectrum.hpp:80
bool isValid() const
Definition: spectrum.hpp:731
bool isColourReverse()
Definition: spectrum.hpp:400
Spectrummodulenotifier createSpectrummodulenotifier()
Definition: spectrum.hpp:1437
The OpenCMISS namespace.
Definition: context.hpp:20
Scene filters determines which graphics are drawn.
Definition: scenefilter.hpp:33
Definition: spectrum.hpp:159
double getExaggeration()
Definition: spectrum.hpp:323
Definition: spectrum.hpp:90
Definition: spectrum.hpp:98
Spectrummodule getSpectrummodule()
Definition: spectrum.hpp:1442
Spectrum::ChangeFlags getSpectrumChangeFlags(const Spectrum &spectrum) const
Definition: spectrum.hpp:1295
int setDefaultSpectrum(const Spectrum &spectrum)
Definition: spectrum.hpp:1186
double getBandedRatio()
Definition: spectrum.hpp:349
int setBandedRatio(double value)
Definition: spectrum.hpp:363
cmzn_spectrummodule_id getId() const
Definition: spectrum.hpp:1095
int setRangeMaximum(double value)
Definition: spectrum.hpp:221
bool isManaged()
Definition: spectrum.hpp:752
int setFixMinimum(bool fixMinimum)
Definition: spectrum.hpp:558
int setCallback(Spectrummodulecallback &callback)
Definition: spectrum.hpp:1420
bool isActive()
Definition: spectrum.hpp:375
Definition: spectrum.hpp:112
bool isValid() const
Definition: spectrum.hpp:1271