diff --git a/ImagingInterface.v3.ncrunchsolution b/ImagingInterface.v3.ncrunchsolution index 2e9ce33..afc3d27 100644 --- a/ImagingInterface.v3.ncrunchsolution +++ b/ImagingInterface.v3.ncrunchsolution @@ -1,6 +1,7 @@  - False + True + True ImagingInterface.Controllers.Tests\ImagingInterface.Controllers.Tests.csproj ImagingInterface.Views\ImagingInterface.Views.csproj diff --git a/Plugins/ImageProcessing/Controllers/Services/TaggerService.cs b/Plugins/ImageProcessing/Controllers/Services/TaggerService.cs index abd89c5..0d7c8b4 100644 --- a/Plugins/ImageProcessing/Controllers/Services/TaggerService.cs +++ b/Plugins/ImageProcessing/Controllers/Services/TaggerService.cs @@ -15,10 +15,12 @@ public class TaggerService : IImageProcessingService private static readonly string TaggerDisplayName = "Tagger"; private Tagger tagger; + private IImageProcessingManagerService imageProcessingService; - public TaggerService(Tagger tagger) + public TaggerService(Tagger tagger, IImageProcessingManagerService imageProcessingService) { this.tagger = tagger; + this.imageProcessingService = imageProcessingService; } public string DisplayName @@ -91,7 +93,9 @@ public List GetPoints(string label) foreach (string tag in this.tagger.DataPoints.Keys) { ////Color color = this.taggerModel.LabelColors[tag]; - Color color = this.LabelColors[tag]; + ////Color color = this.LabelColors[tag]; + + Color color = Color.Red; byte red = Convert.ToByte(color.R); byte green = Convert.ToByte(color.G); byte blue = Convert.ToByte(color.B); @@ -113,6 +117,8 @@ public List GetPoints(string label) public void SelectPixel(IImageSource imageSource, string label, Point pixelPosition) { this.tagger.AddPoint(label, pixelPosition); + + this.imageProcessingService.AddOneShotImageProcessingToActiveImage(this); } } } diff --git a/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/ImageProcessing.Controllers.Tests.csproj b/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/ImageProcessing.Controllers.Tests.csproj index 4f3eb5e..e2e0ada 100644 --- a/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/ImageProcessing.Controllers.Tests.csproj +++ b/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/ImageProcessing.Controllers.Tests.csproj @@ -63,6 +63,12 @@ MinimumRecommendedRules.ruleset + + ..\..\..\..\packages\Castle.Core.4.1.1\lib\net45\Castle.Core.dll + + + ..\..\..\..\packages\Moq.4.7.99\lib\net45\Moq.dll + ..\..\..\..\packages\Shouldly.2.8.3\lib\net451\Shouldly.dll diff --git a/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/TaggerControllerTest.cs b/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/TaggerControllerTest.cs index b47c424..0f2da1a 100644 --- a/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/TaggerControllerTest.cs +++ b/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/TaggerControllerTest.cs @@ -9,6 +9,8 @@ namespace ImageProcessing.Controllers.Tests using ImageProcessing.Controllers; using ImageProcessing.Controllers.Services; using ImageProcessing.ObjectDetection; + using ImagingInterface.Plugins; + using Moq; using Shouldly; using Xunit; @@ -21,6 +23,7 @@ public TaggerControllerTest() this.Container.Register(); this.Container.Register(); this.Container.Register(); + this.Container.Register(() => { return new Mock().Object; }); } [Fact] diff --git a/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/packages.config b/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/packages.config index 25a9a4d..e79ea66 100644 --- a/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/packages.config +++ b/Plugins/ImageProcessing/Tests/ImageProcessing.Controllers.Tests/packages.config @@ -1,5 +1,7 @@  + +