(viz): refactor transfer function data
Description
See &7
Functional specifications
- To make edition easier, the transfer function data object should allow containing multiple curves. When it is sampled, it merges those curves in the same way as SMergeTF does (this service could then be removed). Remove duplicated adaptors and editors.
- In usual cases, no longer expose the TF in the XML. All services interacting with transfer functions would work directly on images.
- No longer expose the old TF "pool" (presets of TF), and keep it internally inside the STransferFunction editor.
Technical specifications
New data TransferFunction
- The new transfer function object will contain a list of independent curves. They will be combined when calling
getTFData
and otherget*Color
functions in the same manner as SMergeTF does. - Add a TF in the image, default to nullptr
- If the TF does not exist, a default one is created in the getter using the current windowing (the famous "GreyLevel")
Services
- All services using a TF should now only use an image as input and get the TF from the image
- merge
sight::module::ui::qt::image::SMultipleTF
intosight::module::ui::qt::image::STransferFunction
- The service manages several TF presets (formerly called "pool") internally. It will use the preferences later in another ticket.
- It copies the selected TF into the image TF
- merge
sight::module::viz::scene2d::adaptor::SMultipleTF
intosight::module::viz::scene2d::adaptor::STransferFunction
- The service modifies directly the TF in the image
- remove the already deprecated
sight::module::ui::qt::image::TransferFunctionEditor
- Remove the management of a default TF in all services, this is managed by the image data itself
Test plan
- Update existing unit-tests...
- If the UI macro recorder is ready, implement some tests.
- If not, do manual testing.