Example #1
0
    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()
Example #2
0
    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()
Example #3
0
    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()
Example #4
0
    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
Example #5
0
    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
Example #6
0
    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
Example #7
0
    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
 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