From d7a2713f1ff4679a7b28a90d1622d1dbfdf06aee Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 1 Feb 2021 12:29:37 +0200 Subject: created new test program to check Light Inks. --- .../Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index b1a1f4aa5..b60f2fcf5 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -84,10 +84,12 @@ + + - + @@ -97,7 +99,7 @@ - + @@ -105,7 +107,7 @@ - + -- cgit v1.3.1 From a6df02f37338475580623f32b7102919d84b99c5 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 1 Feb 2021 16:28:06 +0200 Subject: Fixed RML module VMax & Use Light Inks Flags. --- .../PMR/ColorLab/ConversionInput.pb-c.c | 32 ++++++++++++++++++++-- .../PMR/ColorLab/ConversionInput.pb-c.h | 6 +++- .../ViewModels/ColorConversionViewVM.cs | 3 ++ 3 files changed, 37 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML') diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.c b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.c index 3c1230489..0defc9edf 100644 --- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.c +++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.c @@ -52,7 +52,7 @@ void conversion_input__free_unpacked assert(message->base.descriptor == &conversion_input__descriptor); protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); } -static const ProtobufCFieldDescriptor conversion_input__field_descriptors[12] = +static const ProtobufCFieldDescriptor conversion_input__field_descriptors[14] = { { "ThreadL", @@ -198,6 +198,30 @@ static const ProtobufCFieldDescriptor conversion_input__field_descriptors[12] = 0, /* flags */ 0,NULL,NULL /* reserved1,reserved2, etc */ }, + { + "UseLightInks", + 13, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_BOOL, + offsetof(ConversionInput, has_uselightinks), + offsetof(ConversionInput, uselightinks), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, + { + "VMax", + 14, + PROTOBUF_C_LABEL_OPTIONAL, + PROTOBUF_C_TYPE_DOUBLE, + offsetof(ConversionInput, has_vmax), + offsetof(ConversionInput, vmax), + NULL, + NULL, + 0, /* flags */ + 0,NULL,NULL /* reserved1,reserved2, etc */ + }, }; static const unsigned conversion_input__field_indices_by_name[] = { 3, /* field[3] = ColorSpace */ @@ -212,11 +236,13 @@ static const unsigned conversion_input__field_indices_by_name[] = { 1, /* field[1] = ThreadA */ 2, /* field[2] = ThreadB */ 0, /* field[0] = ThreadL */ + 12, /* field[12] = UseLightInks */ + 13, /* field[13] = VMax */ }; static const ProtobufCIntRange conversion_input__number_ranges[1 + 1] = { { 1, 0 }, - { 0, 12 } + { 0, 14 } }; const ProtobufCMessageDescriptor conversion_input__descriptor = { @@ -226,7 +252,7 @@ const ProtobufCMessageDescriptor conversion_input__descriptor = "ConversionInput", "", sizeof(ConversionInput), - 12, + 14, conversion_input__field_descriptors, conversion_input__field_indices_by_name, 1, conversion_input__number_ranges, diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.h b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.h index 15c30fc10..794ddaaac 100644 --- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.h +++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/PMR/ColorLab/ConversionInput.pb-c.h @@ -52,10 +52,14 @@ struct _ConversionInput ProcessRange **processranges; protobuf_c_boolean has_generatehive; protobuf_c_boolean generatehive; + protobuf_c_boolean has_uselightinks; + protobuf_c_boolean uselightinks; + protobuf_c_boolean has_vmax; + double vmax; }; #define CONVERSION_INPUT__INIT \ { PROTOBUF_C_MESSAGE_INIT (&conversion_input__descriptor) \ - , 0, 0, 0, 0, 0, 0, 0, COLOR_SPACE__Volume, NULL, 0, {0,NULL}, 0, {0,NULL}, 0, 0, 0, 0, 0, 0, 0,NULL, 0, 0 } + , 0, 0, 0, 0, 0, 0, 0, COLOR_SPACE__Volume, NULL, 0, {0,NULL}, 0, {0,NULL}, 0, 0, 0, 0, 0, 0, 0,NULL, 0, 0, 0, 0, 0, 0 } /* ConversionInput methods */ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs index 4a6fd7d36..6ba539078 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/ColorConversionViewVM.cs @@ -353,6 +353,9 @@ namespace Tango.MachineStudio.RML.ViewModels input.ThreadA = RML.WhitePointA; input.ThreadB = RML.WhitePointB; + input.UseLightInks = RML.UseLightInks; + input.VMax = RML.VMax; + foreach (var vm in LiquidsCalibrationData.Where(x => x.LiquidType.HasPigment)) { InputLiquid inputLiquid = new InputLiquid(); -- cgit v1.3.1 From 0a1203a500d309ff2a2a20e5643d3f85c7c6d3a9 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 2 Feb 2021 17:06:33 +0200 Subject: Test - set CMYK colors for Catalog ColorSpace. RMLsView -remove text from color hexagon and reduce size. --- .../ColorLib/Tango.ColorLib_v4/ColorConverter.cpp | 37 +++++++++++++++++++--- .../Tango.MachineStudio.RML/Views/RmlsView.xaml | 4 +-- .../Tango.ColorLib.LightInksTest.CLI/Program.cs | 7 ++-- .../Tango.ColorLib.OutOfGamutTest.CLI/Program.cs | 7 ++-- 4 files changed, 42 insertions(+), 13 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML') diff --git a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp index 572d37dac..e1d720371 100644 --- a/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp +++ b/Software/Visual_Studio/ColorLib/Tango.ColorLib_v4/ColorConverter.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "GradientConversionInput.pb-c.h" #include "GradientConversionOutput.pb-c.h" @@ -2143,9 +2144,37 @@ void Tango::ColorLib::ColorConverter::CountNumberofInks(RecommendedProcessTableI void Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* conversionInput, int &numInks, int &numLightInks) { int nLiquids = conversionInput->inputcoordinates->n_inputliquids; - // int numberofInks = 0; - //Cyan - int nCyan = 0; + std::map< LiquidType, int> liquidsToCountMap; + std::map< LiquidType, int> lightLiquidsToCountMap; + numInks = -1; + numLightInks = -1; + for (int i = 0; i < nLiquids; ++i) + { + LiquidType liquidType = conversionInput->inputcoordinates->inputliquids[i]->liquidtype; + if (liquidType == LiquidType::LIQUID_TYPE__LightCyan || liquidType == LiquidType::LIQUID_TYPE__LightMagenta || liquidType == LiquidType::LIQUID_TYPE__LightYellow) + { + if (lightLiquidsToCountMap.find(liquidType) == lightLiquidsToCountMap.end()) + { + lightLiquidsToCountMap[liquidType] = 1; + } + else { + return; + } + } + else if(liquidType == LiquidType::LIQUID_TYPE__Cyan || liquidType == LiquidType::LIQUID_TYPE__Magenta || liquidType == LiquidType::LIQUID_TYPE__Yellow || liquidType == LiquidType::LIQUID_TYPE__Black) + { + if (liquidsToCountMap.find(liquidType) == liquidsToCountMap.end()) + { + liquidsToCountMap[liquidType] = 1; + } + else { + return; + } + } + } + numInks = liquidsToCountMap.size() + lightLiquidsToCountMap.size(); + numLightInks = lightLiquidsToCountMap.size(); + /*int nCyan = 0; for (int i = 0; i < nLiquids; ++i) { if (conversionInput->inputcoordinates->inputliquids[i]->liquidtype == LIQUID_TYPE__Cyan) @@ -2230,7 +2259,7 @@ void Tango::ColorLib::ColorConverter::CountNumberofInks(ConversionInput* convers return; } numInks = nCyan + nMagenta + nYellow + nBlack + nLightCyan + nLightMagenta + nLightYellow; - numLightInks = nLightCyan + nLightMagenta + nLightYellow;; + numLightInks = nLightCyan + nLightMagenta + nLightYellow;;*/ return; } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index b60f2fcf5..fd05ee28e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -107,7 +107,7 @@ - + @@ -116,8 +116,6 @@ - - diff --git a/Software/Visual_Studio/Tango.ColorLib.LightInksTest.CLI/Program.cs b/Software/Visual_Studio/Tango.ColorLib.LightInksTest.CLI/Program.cs index 5d7d6ffae..3c9a128ed 100644 --- a/Software/Visual_Studio/Tango.ColorLib.LightInksTest.CLI/Program.cs +++ b/Software/Visual_Studio/Tango.ColorLib.LightInksTest.CLI/Program.cs @@ -17,8 +17,8 @@ namespace Tango.ColorLib.LightInksTest.CLI static void Main(string[] args) { ColorLibConnector connector = new ColorLibConnector(); - Console.WriteLine("Press any key to start..."); - Console.ReadLine(); + //Console.WriteLine("Press any key to start..."); + //Console.ReadLine(); Stopwatch watch = new Stopwatch(); watch.Start(); Console.WriteLine(); @@ -179,6 +179,7 @@ namespace Tango.ColorLib.LightInksTest.CLI MaxNanoliterPerCentimeter = 200, }); } + input.GenerateHive = false; input.UseLightInks = useLightInks; input.VMax = 5; @@ -201,7 +202,7 @@ namespace Tango.ColorLib.LightInksTest.CLI inputCoordinates.A = -90; inputCoordinates.B = -30; } - else if (colorSpase == PMR.ColorLab.ColorSpace.Cmyk) + else if (colorSpase == PMR.ColorLab.ColorSpace.Cmyk || colorSpase == PMR.ColorLab.ColorSpace.Catalog) { inputCoordinates.Cyan = 50; inputCoordinates.Magenta = 20; diff --git a/Software/Visual_Studio/Tango.ColorLib.OutOfGamutTest.CLI/Program.cs b/Software/Visual_Studio/Tango.ColorLib.OutOfGamutTest.CLI/Program.cs index 0469d8518..edb94bc60 100644 --- a/Software/Visual_Studio/Tango.ColorLib.OutOfGamutTest.CLI/Program.cs +++ b/Software/Visual_Studio/Tango.ColorLib.OutOfGamutTest.CLI/Program.cs @@ -288,7 +288,7 @@ namespace Tango.ColorLib.OutOfGamutTest.CLI // Volume = _s_random.Next(0, 100) // }); //} - //else + else if (colorSpase == PMR.ColorLab.ColorSpace.Catalog || colorSpase == ColorSpace.Cmyk) { inputCoordinates.Cyan = _s_random.Next(0, 100); inputCoordinates.Magenta = _s_random.Next(0, 100); @@ -317,7 +317,7 @@ namespace Tango.ColorLib.OutOfGamutTest.CLI input.A = _s_random.Next(-128, 128); input.B = _s_random.Next(-128, 128); } - else if(colorSpase == PMR.ColorLab.ColorSpace.Catalog || colorSpase == ColorSpace.Volume) + else if(colorSpase == ColorSpace.Volume) { input.LiquidVolumes.Add(new LiquidVolume() { @@ -340,7 +340,8 @@ namespace Tango.ColorLib.OutOfGamutTest.CLI Volume = _s_random.Next(0, 100) }); } - else{ + else if(colorSpase == PMR.ColorLab.ColorSpace.Catalog || colorSpase == ColorSpace.Cmyk) + { input.Cyan = _s_random.Next(0, 100); input.Magenta = _s_random.Next(0, 100); input.Yellow = _s_random.Next(0, 100); -- cgit v1.3.1