def correlate_colourspace(self, value): """ Setter for **self._correlate_colourspace** private attribute. Parameters ---------- value : unicode Attribute value. """ if value is not None: assert is_string(value), (('"{0}" attribute: "{1}" is not a ' '"string" like object!').format( 'correlate_colourspace', value)) assert value in RGB_COLOURSPACES, ( '"{0}" colourspace not found in factory RGB colourspaces: ' '"{1}".').format(value, ', '.join(sorted(RGB_COLOURSPACES.keys()))) self._correlate_colourspace = value if self._initialised: self._detach_visuals() self._create_visuals() self._attach_visuals() self._label_text()
def reference_colourspace(self, value): """ Setter for **self._reference_colourspace** private attribute. Parameters ---------- value : unicode Attribute value. """ if value is not None: assert is_string(value), (('"{0}" attribute: "{1}" is not a ' '"string" like object!').format( 'reference_colourspace', value)) assert value in REFERENCE_COLOURSPACES, ( '"{0}" reference colourspace not found in factory reference ' 'colourspaces: "{1}".').format( value, ', '.join(sorted(REFERENCE_COLOURSPACES.keys()))) self._reference_colourspace = value if self._initialised: self._store_visuals_visibility() self._detach_visuals() self._create_visuals() self._attach_visuals() self._restore_visuals_visibility() self._create_camera() self._label_text()
def diagram(self, value): """ Setter for **self._diagram** private attribute. Parameters ---------- value : unicode Attribute value. """ if value is not None: assert is_string(value), ( ('"{0}" attribute: "{1}" is not a ' '"string" like object!').format('input_colourspace', value)) assert value in CHROMATICITY_DIAGRAMS, ( '"{0}" diagram not found in factory chromaticity diagrams: ' '"{1}".').format(value, ', '.join( sorted(CHROMATICITY_DIAGRAMS.keys()))) if self._initialised: self._store_visuals_visibility() self._detach_visuals() self._diagram = value if self._initialised: self._create_visuals() self._attach_visuals() self._restore_visuals_visibility() self._label_text()
def layout(self, value): """ Setter for **self._layout** private attribute. Parameters ---------- value : unicode Attribute value. """ if value is not None: assert is_string(value), (('"{0}" attribute: "{1}" is not a ' '"string" like object!').format( 'layout', value)) self._layout = value
def image_path(self, value): """ Setter for **self._image_path** private attribute. Parameters ---------- value : unicode Attribute value. """ if value is not None: assert is_string(value), (('"{0}" attribute: "{1}" is not a ' '"string" like object!').format( 'image_path', value)) assert os.path.exists(value), ( '"{0}" input image doesn\'t exists!'.format(value)) self._image_path = value
def reference_colourspace(self, value): """ Setter for **self._reference_colourspace** private attribute. Parameters ---------- value : unicode Attribute value. """ if value is not None: assert is_string(value), (('"{0}" attribute: "{1}" is not a ' '"string" like object!').format( 'reference_colourspace', value)) assert value in REFERENCE_COLOURSPACES, ( '"{0}" reference colourspace not found in factory reference ' 'colourspaces: "{1}".').format( value, ', '.join(sorted(REFERENCE_COLOURSPACES.keys()))) self._reference_colourspace = value
def input_oecf(self, value): """ Setter for **self._input_oecf** private attribute. Parameters ---------- value : unicode Attribute value. """ if value is not None: assert is_string(value), (('"{0}" attribute: "{1}" is not a ' '"string" like object!').format( 'input_oecf', value)) assert value in RGB_COLOURSPACES, ( '"{0}" OECF is not associated with any factory ' 'RGB colourspaces: "{1}".').format( value, ', '.join(sorted(RGB_COLOURSPACES.keys()))) self._input_oecf = value
def name(self, value): if value is not None: assert is_string(value), ( # noqa ('"{0}" attribute: "{1}" type is not ' '"str" or "unicode"!').format('name', value)) self._name = value