mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	* Channel adjustment config * Create RgbChannelAdjustment.h * Delete RgbChannelAdjustment.h * Create RgbChannelAdjustment.cpp * Create RgbChannelAdjustment.h * Delete RgbChannelAdjustment.cpp * Create ColorAdjustment.cpp * Delete RgbChannelAdjustment.h * Create ColorAdjustment.h * Update ColorAdjustment.h * Update ColorAdjustment.h * Update ColorAdjustment.h * Update ColorAdjustment.cpp * Update Hyperion.cpp * Update Hyperion.cpp * Update Hyperion.cpp * Update Hyperion.h * Create RgbChannelAdjustment.cpp * Create RgbChannelAdjustment.h * Create ColorAdjustment.h * Create MultiColorAdjustment.h * Update MultiColorAdjustment.h * Create MultiColorAdjustment.cpp * Delete ColorAdjustment.cpp * Delete ColorAdjustment.h * Update RgbChannelAdjustment.cpp * Update Hyperion.cpp * Update Hyperion.h * Update Hyperion.cpp * Bug fixes * Update hyperion.config.json * Add color adjustment to json server and client and adapt hyperion-remote * Change the color modification order * Minor bug fix * Create calibration Images folder * Create calibration Gamma folder * Create calibration RGB folder * Added files via upload * Delete .gitkeep * Delete .gitkeep * Added files via upload * Delete .gitkeep * Update color effect order and don't correct twice * Uploaded gradient images Former-commit-id: 8ab465e59834f12a21709a6f4546bd6808a2a495
		
			
				
	
	
		
			67 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| // STL includes
 | |
| #include <vector>
 | |
| 
 | |
| // Utils includes
 | |
| #include <utils/ColorRgb.h>
 | |
| 
 | |
| // Hyperion includes
 | |
| #include <hyperion/ColorAdjustment.h>
 | |
| 
 | |
| ///
 | |
| /// The LedColorTransform is responsible for performing color transformation from 'raw' colors
 | |
| /// received as input to colors mapped to match the color-properties of the leds.
 | |
| ///
 | |
| class MultiColorAdjustment
 | |
| {
 | |
| public:
 | |
| 	MultiColorAdjustment(const unsigned ledCnt);
 | |
| 	~MultiColorAdjustment();
 | |
| 
 | |
| 	/**
 | |
| 	 * Adds a new ColorAdjustment to this MultiColorTransform
 | |
| 	 *
 | |
| 	 * @param adjustment The new ColorAdjustment (ownership is transfered)
 | |
| 	 */
 | |
| 	void addAdjustment(ColorAdjustment * adjustment);
 | |
| 
 | |
| 	void setAdjustmentForLed(const std::string& id, const unsigned startLed, const unsigned endLed);
 | |
| 
 | |
| 	bool verifyAdjustments() const;
 | |
| 
 | |
| 	///
 | |
| 	/// Returns the identifier of all the unique ColorAdjustment
 | |
| 	///
 | |
| 	/// @return The list with unique id's of the ColorAdjustment
 | |
| 	const std::vector<std::string> & getAdjustmentIds();
 | |
| 
 | |
| 	///
 | |
| 	/// Returns the pointer to the ColorAdjustment with the given id
 | |
| 	///
 | |
| 	/// @param id The identifier of the ColorAdjustment
 | |
| 	///
 | |
| 	/// @return The ColorAdjustment with the given id (or nullptr if it does not exist)
 | |
| 	///
 | |
| 	ColorAdjustment* getAdjustment(const std::string& id);
 | |
| 
 | |
| 	///
 | |
| 	/// Performs the color adjustment from raw-color to led-color
 | |
| 	///
 | |
| 	/// @param rawColors The list with raw colors
 | |
| 	///
 | |
| 	/// @return The list with led-colors
 | |
| 	///
 | |
| 	std::vector<ColorRgb> applyAdjustment(const std::vector<ColorRgb>& rawColors);
 | |
| 
 | |
| private:
 | |
| 	/// List with transform ids
 | |
| 	std::vector<std::string> _adjustmentIds;
 | |
| 
 | |
| 	/// List with unique ColorTransforms
 | |
| 	std::vector<ColorAdjustment*> _adjustment;
 | |
| 
 | |
| 	/// List with a pointer to the ColorAdjustment for each individual led
 | |
| 	std::vector<ColorAdjustment*> _ledAdjustments;
 | |
| };
 |