mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-29 11:56:34 +08:00
传输优化
This commit is contained in:
36
ToolLib.VisionToolList/Properties/AssemblyInfo.cs
Normal file
36
ToolLib.VisionToolList/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("ToolLib.VisionToolList")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ToolLib.VisionToolList")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
//将 ComVisible 设置为 false 将使此程序集中的类型
|
||||
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("3f66a390-7c85-4d9b-b66d-69a051b1cbc4")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
|
||||
// 方法是按如下所示使用“*”: :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
77
ToolLib.VisionToolList/ToolLib.VisionToolList.csproj
Normal file
77
ToolLib.VisionToolList/ToolLib.VisionToolList.csproj
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{3F66A390-7C85-4D9B-B66D-69A051B1CBC4}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ToolLib.VisionToolList</RootNamespace>
|
||||
<AssemblyName>ToolLib.VisionToolList</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\VisionEdit\bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="VisionToolList.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CaliperTool\CaliperTool.csproj">
|
||||
<Project>{AABF8D49-FA00-4E25-9410-4A573D48DAB1}</Project>
|
||||
<Name>CaliperTool</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\CommonMethods\CommonHelper.csproj">
|
||||
<Project>{1C8D0DDC-2086-48A9-9586-F2B643E2FC54}</Project>
|
||||
<Name>CommonHelper</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\FindCircle\FindCircleTool.csproj">
|
||||
<Project>{3d2739db-5618-49bf-bf5c-5cccd6a55c64}</Project>
|
||||
<Name>FindCircleTool</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\FindLine\FindLineTool.csproj">
|
||||
<Project>{C3BB2B1C-ED0C-4879-A6D3-D86342C5086E}</Project>
|
||||
<Name>FindLineTool</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\HalconTool\HalconTool.csproj">
|
||||
<Project>{F5669FB7-77EC-44B9-898B-6D575B7D26EA}</Project>
|
||||
<Name>HalconTool</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
107
ToolLib.VisionToolList/VisionToolList.cs
Normal file
107
ToolLib.VisionToolList/VisionToolList.cs
Normal file
@@ -0,0 +1,107 @@
|
||||
using CaliperTool;
|
||||
using CommonMethods;
|
||||
using FindLineTool;
|
||||
using HalconTool;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace VisionJobFactory
|
||||
{
|
||||
[Serializable]
|
||||
[VisionToolAttribute(ToolType.HalconTool)]
|
||||
public class HalconToolInterface : IToolInfo
|
||||
{
|
||||
// 必添加输出项
|
||||
ToolIO outputImage = new ToolIO("OutputImage", null, DataType.Image);
|
||||
/// <summary>
|
||||
/// 获取工具的所有信息
|
||||
/// </summary>
|
||||
/// <param name="生成的工具名称"></param>
|
||||
public HalconToolInterface(string toolName)
|
||||
{
|
||||
enable = true;
|
||||
toolType = ToolType.HalconTool;
|
||||
this.toolName = toolName;
|
||||
tool = new HalconTool.HalconTool();
|
||||
FormTool = null;
|
||||
FormToolName = "HalconTool.FormHalconTool";
|
||||
toolInput = new List<ToolIO>();
|
||||
toolOutput = new List<ToolIO>() { outputImage };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 只获取选择工具的描述信息..
|
||||
/// </summary>
|
||||
public HalconToolInterface()
|
||||
{
|
||||
toolDescription = "Halcon采集图像接口,可直接连接网口、USB等相机";
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
[VisionToolAttribute(ToolType.FindLine)]
|
||||
public class FindLineToolInterface : IToolInfo
|
||||
{
|
||||
ToolIO inputImage = new ToolIO("InputImage", null, DataType.Image);
|
||||
ToolIO outputXld = new ToolIO("outputXld", null, DataType.Line);
|
||||
ToolIO startPointRow = new ToolIO("StartPointRow", null, DataType.IntValue);
|
||||
ToolIO startPointColumn = new ToolIO("StartPointColumn", null, DataType.IntValue);
|
||||
ToolIO endPointRow = new ToolIO("EndPointRow", null, DataType.IntValue);
|
||||
ToolIO endPointColumn = new ToolIO("EndPointColumn", null, DataType.IntValue);
|
||||
public FindLineToolInterface(string toolName)
|
||||
{
|
||||
enable = true;
|
||||
toolType = ToolType.FindLine;
|
||||
this.toolName = toolName;
|
||||
tool = new FindLine();
|
||||
FormToolName = "FindLineTool.FormFindLine";
|
||||
FormTool = null;
|
||||
toolInput = new List<ToolIO>() { inputImage };
|
||||
toolOutput = new List<ToolIO>() { outputXld, startPointRow, startPointColumn, endPointRow, endPointColumn };
|
||||
}
|
||||
/// <summary>
|
||||
/// 只获取选择工具的描述信息
|
||||
/// </summary>
|
||||
public FindLineToolInterface()
|
||||
{
|
||||
toolDescription = "找线工具";
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
[VisionToolAttribute(ToolType.Caliper)]
|
||||
public class CaliperInterface : IToolInfo
|
||||
{
|
||||
ToolIO inputImage = new ToolIO("InputImage", null, DataType.Image);
|
||||
ToolIO inputCenterRow = new ToolIO("inputCenterRow", null, DataType.IntValue);
|
||||
ToolIO inputCenterColumn = new ToolIO("inputCenterColumn", null, DataType.IntValue);
|
||||
ToolIO inputPhi = new ToolIO("inputPhi", null, DataType.IntValue);
|
||||
ToolIO outputCenterRow = new ToolIO("outputCenterRow", null, DataType.IntValue);
|
||||
ToolIO outputCenterColumn = new ToolIO("outputCenterColumn", null, DataType.IntValue);
|
||||
public CaliperInterface(string toolName)
|
||||
{
|
||||
enable = true;
|
||||
toolType = ToolType.Caliper;
|
||||
this.toolName = toolName;
|
||||
tool = new Caliper();
|
||||
FormToolName = "CaliperTool.FormCaliper";
|
||||
FormTool = null;
|
||||
toolInput = new List<ToolIO>() { inputImage, inputCenterRow, inputCenterColumn, inputPhi };
|
||||
toolOutput = new List<ToolIO>() { outputCenterRow, outputCenterColumn };
|
||||
}
|
||||
/// <summary>
|
||||
/// 只获取选择工具的描述信息
|
||||
/// </summary>
|
||||
public CaliperInterface()
|
||||
{
|
||||
toolDescription = "卡尺工具";
|
||||
}
|
||||
}
|
||||
[Serializable]
|
||||
[VisionToolAttribute(ToolType.BlobAnalyse)]
|
||||
public class BlobAnalyseToolInterface : IToolInfo
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user