Skip to content

Commit 714fc25

Browse files
Update README with new features.
1 parent f000851 commit 714fc25

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

README.rst

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,15 @@ Features
3838
The following features are available:
3939

4040
- Reading *CLF* files to a Python representation.
41-
42-
The following features are planned and in development:
43-
4441
- Writing *CLF* files from the Python representation.
45-
- Validating *CLF* files according to the specification.
46-
47-
Features that will not be part of this library:
42+
- Executing *CLF* workflows and applying them to colours or images.
4843

49-
- Executing *CLF* workflows and applying them to colours or images. This feature will be implemented as part of `Colour
50-
<https://github.com/colour-science/colour/>`__.
5144

5245
Examples
5346
^^^^^^^^
5447

55-
The main entry point of the library is the ``read_clf`` function in the main namespace.
48+
The main entry point of the library is the ``read_clf`` function in the main namespace, which allows one to parse
49+
a CLF document:
5650

5751
.. code-block:: python
5852
@@ -75,14 +69,14 @@ The main entry point of the library is the ``read_clf`` function in the main nam
7569
</LUT3D>
7670
</ProcessList>
7771
""" # noqa: E501
78-
clf_doc = colour_clf_io.parse_clf(example)
72+
clf_doc = colour_clf_io.read_clf(example)
7973
print(clf_doc)
8074
8175
.. code-block:: text
8276
8377
ProcessList(id='Example Wrapper', compatible_CLF_version='3.0', process_nodes=[LUT3D(id='lut-24', name='green look', in_bit_depth=<BitDepth.i12: '12i'>, out_bit_depth=<BitDepth.f16: '16f'>, description='3D LUT', array=Array(values=[0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 1.0, 1.0], dim=(2, 2, 2, 3)), half_domain=False, raw_halfs=False, interpolation=<Interpolation3D.TRILINEAR: 'trilinear'>)], name=None, inverse_of=None, description=[], input_descriptor='', output_descriptor='', info=Info(app_release=None, copyright=None, revision=None, aces_transform_id=None, aces_user_name=None, calibration_info=None))
8478
85-
and for writing a CLF file the ``write_clf`` function can be used to serialise a ``ProcessList`` back to XML
79+
For writing a CLF file the ``write_clf`` function can be used to serialise a ``ProcessList`` back to XML:
8680

8781

8882
.. code-block:: python
@@ -110,6 +104,19 @@ and for writing a CLF file the ``write_clf`` function can be used to serialise a
110104
</LUT3D>
111105
</ProcessList>
112106
107+
To execute a CLF workflow, you can create a *CLFProcessList* that can be applied to some input.
108+
109+
.. code-block:: python
110+
111+
lut = colour_clf_io.CLFProcessList(clf_doc)
112+
input_value = [0, 32768, 65535]
113+
result = lut.apply(input_value)
114+
print(result)
115+
116+
.. code-block:: text
117+
118+
[ 0. 1. 1.]
119+
113120
User Guide
114121
----------
115122

@@ -125,6 +132,10 @@ Primary Dependencies
125132
- `lxml >= 5.2.1 < 6 <https://pypi.org/project/lxml/>`__
126133
- `numpy >= 1.24, < 2 <https://pypi.org/project/numpy>`__
127134

135+
If you want to execute CLF workflows, you will also need
136+
137+
- `colour-science >= 0.4.6 <https://pypi.org/project/colour-science>`__
138+
128139
Pypi
129140
~~~~
130141

@@ -138,6 +149,17 @@ The overall development dependencies are installed as follows::
138149

139150
pip install --user 'colour-clf-io[development]'
140151

152+
UV
153+
~~~~
154+
155+
Using uv you can simply install **Colour - CLF IO** via::
156+
157+
uv add colour-clf-io
158+
159+
or, if you want to execute CLF workflows::
160+
161+
uv add colour-clf-io --optional processing
162+
141163

142164
Contributing
143165
^^^^^^^^^^^^

0 commit comments

Comments
 (0)