diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-08-07 17:49:02 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-08-07 17:49:02 +0300 |
| commit | 6768f10da035dee02e5f4de2988b7cdccd7dc04c (patch) | |
| tree | fd9dac07b3fd47c72f6b582125ec8b74b6e93fc3 /Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs | |
| parent | 1f4a296ce7e38d59a7a796ad2ab57db116f8fdb5 (diff) | |
| download | Tango-6768f10da035dee02e5f4de2988b7cdccd7dc04c.tar.gz Tango-6768f10da035dee02e5f4de2988b7cdccd7dc04c.zip | |
Fine Tuning. LAB out of gamut.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs index 07bf2fa5c..e71edc7a7 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs @@ -1397,6 +1397,43 @@ namespace Tango.PPC.Jobs.Models } } + public void FineTuningConverter() + { + RequiredMaxLiquidTest = true; + + ColorSpaces colorSpace = ColorSpaces.LAB; + BrushStop stop = CreateBrushStop(colorSpace); + try + { + IsBusy = true; + var output = _converter.Convert(stop, SegmentModel.Job.Machine.Configuration, SegmentModel.Job.Rml, false, false, false); + + _cyan = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Cyan).Volume); + _yellow = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Yellow).Volume); + _magenta = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Magenta).Volume); + _black = (output.SingleCoordinates.OutputLiquids.SingleOrDefault(x => x.LiquidType == PMR.ColorLab.LiquidType.Black).Volume); + IsOutOfGamut = output.OutOfGamut; + if(IsOutOfGamut) + { + BrushStop stopLAB = CreateBrushStop(ColorSpaces.Volume); + + IsBusy = true; + var outputLAB = _converter.Convert(stopLAB, SegmentModel.Job.Machine.Configuration, SegmentModel.Job.Rml, false, false, false); + _l = output.SingleCoordinates.L; + _a = output.SingleCoordinates.A; + _b = output.SingleCoordinates.B; + } + } + catch (Exception ex) + { + LogManager.Log(ex, "An error occurred while trying to get volume => RGB from conversion engine." + ex); + } + finally + { + IsBusy = false; + } + } + public void RaiseOffsetChanged() { RaisePropertyChanged(nameof(OffsetPercent)); |
