Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
AutoCountMachine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit afe304fc
由
顾剑亮
编写于
2020-06-03 15:12:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
点料更新
1 个父辈
4168a13d
隐藏空白字符变更
内嵌
并排
正在显示
31 个修改的文件
包含
56 行增加
和
23 行删除
CarerayImage/.vs/CarerayImage/v16/.suo
CarerayImage/CarerayImage/CarerayImage.csproj
CarerayImage/CarerayImage/Class1.cs
CarerayImage/CarerayImage/bin/Debug/Asa.CarerayImage.dll
CarerayImage/CarerayImage/bin/Debug/Asa.CarerayImage.pdb
CarerayImage/CarerayImage/obj/Debug/Asa.CarerayImage.dll
CarerayImage/CarerayImage/obj/Debug/Asa.CarerayImage.pdb
CarerayImage/CarerayImage/obj/Debug/CarerayImage.csproj.CoreCompileInputs.cache
CarerayImage/CarerayImage/obj/Debug/CarerayImage.csproj.FileListAbsolute.txt
CarerayImage/CarerayImage/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
CarerayImage/CarerayImage_Test/Form1.Designer.cs
CarerayImage/CarerayImage_Test/Form1.cs
CarerayImage/CarerayImage_Test/bin/Debug/Asa.CarerayImage.dll
CarerayImage/CarerayImage_Test/bin/Debug/Asa.CarerayImage.pdb
CarerayImage/CarerayImage_Test/bin/Debug/CarerayImage_Test.exe
CarerayImage/CarerayImage_Test/bin/Debug/CarerayImage_Test.pdb
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.csproj.GenerateResource.cache
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.csprojAssemblyReference.cache
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.exe
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.pdb
CountImage/.vs/CountImage/v16/.suo
CountImage/CountImage/Class1.cs
X-Ray Controller/.vs/X-Ray Controller/v16/.suo
X-Ray Controller/X-Ray Controller/obj/Debug/X-Ray Controller.csproj.FileListAbsolute.txt
X-Ray Controller/X-Ray_Test/Form1.Designer.cs
X-Ray Controller/X-Ray_Test/bin/Debug/X-Ray_Test.exe
X-Ray Controller/X-Ray_Test/bin/Debug/X-Ray_Test.pdb
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.csproj.GenerateResource.cache
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.csprojAssemblyReference.cache
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.exe
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.pdb
CarerayImage/.vs/CarerayImage/v16/.suo
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage/CarerayImage.csproj
查看文件 @
afe304f
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<ErrorReport>prompt</ErrorReport>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\Asa.CarerayImage.xml</DocumentationFile>
<DocumentationFile>bin\Debug\Asa.CarerayImage.xml</DocumentationFile>
<AllowUnsafeBlocks>
tru
e</AllowUnsafeBlocks>
<AllowUnsafeBlocks>
fals
e</AllowUnsafeBlocks>
</PropertyGroup>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DebugType>pdbonly</DebugType>
...
@@ -50,5 +50,19 @@
...
@@ -50,5 +50,19 @@
<Compile Include="Class1.cs" />
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Content Include="bin\Debug\Asa.CarerayImage.dll" />
<Content Include="bin\Debug\Asa.CarerayImage.pdb" />
<Content Include="bin\Debug\Asa.CarerayImage.xml" />
<Content Include="bin\Debug\CRCallback.dll" />
<Content Include="bin\Debug\CRInterface.dll" />
<Content Include="bin\Debug\log4net.dll" />
</ItemGroup>
<ItemGroup>
<None Include="bin\Debug\CRCallback.lib" />
</ItemGroup>
<ItemGroup>
<Folder Include="bin\Release\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
\ No newline at end of file
CarerayImage/CarerayImage/Class1.cs
查看文件 @
afe304f
...
@@ -191,7 +191,7 @@ namespace Asa
...
@@ -191,7 +191,7 @@ namespace Asa
for
(
int
i
=
0
;
i
<
count
;
i
++)
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
{
short
point
=
BitConverter
.
ToInt16
(
gray
,
idx1
);
short
point
=
BitConverter
.
ToInt16
(
gray
,
idx1
);
if
(
point
>
32767
)
point
=
32767
;
point
+=
20000
;
if
(
point
<
WindowLevel
-
half
)
if
(
point
<
WindowLevel
-
half
)
{
{
...
@@ -204,21 +204,28 @@ namespace Asa
...
@@ -204,21 +204,28 @@ namespace Asa
}
}
else
if
(
point
>
WindowLevel
+
half
)
else
if
(
point
>
WindowLevel
+
half
)
{
{
//buff[idx2++] = 255;
//buff[idx2++] = 127;
//buff[idx2++] = 255;
//buff[idx2++] = 127;
//buff[idx2++] = 255;
//buff[idx2++] = 127;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
127
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
127
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
255
;
buff
[
idx2
++]
=
127
;
}
}
else
else
{
{
buff
[
idx2
++]
=
gray
[
idx1
];
byte
[]
bb
=
BitConverter
.
GetBytes
(
point
);
buff
[
idx2
++]
=
gray
[
idx1
+
1
];
buff
[
idx2
++]
=
bb
[
0
];
buff
[
idx2
++]
=
gray
[
idx1
];
buff
[
idx2
++]
=
bb
[
1
];
buff
[
idx2
++]
=
gray
[
idx1
+
1
];
buff
[
idx2
++]
=
bb
[
0
];
buff
[
idx2
++]
=
gray
[
idx1
];
buff
[
idx2
++]
=
bb
[
1
];
buff
[
idx2
++]
=
gray
[
idx1
+
1
];
buff
[
idx2
++]
=
bb
[
0
];
buff
[
idx2
++]
=
bb
[
1
];
}
}
idx1
+=
2
;
idx1
+=
2
;
}
}
...
...
CarerayImage/CarerayImage/bin/Debug/Asa.CarerayImage.dll
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage/bin/Debug/Asa.CarerayImage.pdb
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage/obj/Debug/Asa.CarerayImage.dll
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage/obj/Debug/Asa.CarerayImage.pdb
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage/obj/Debug/CarerayImage.csproj.CoreCompileInputs.cache
查看文件 @
afe304f
f
1f9c56bb7e07e8ee867fbe9a762cde9bc21bb47
f
6c12c9e44f3bc97ecd1e5730e2b6df4a3629749
CarerayImage/CarerayImage/obj/Debug/CarerayImage.csproj.FileListAbsolute.txt
查看文件 @
afe304f
...
@@ -11,6 +11,5 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\C
...
@@ -11,6 +11,5 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\C
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csproj.CoreCompileInputs.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\Asa.CarerayImage.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csprojAssemblyReference.cache
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\CarerayImage\CarerayImage\obj\Debug\CarerayImage.csprojAssemblyReference.cache
CarerayImage/CarerayImage/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/Form1.Designer.cs
查看文件 @
afe304f
...
@@ -62,6 +62,7 @@
...
@@ -62,6 +62,7 @@
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
115
,
12
);
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
115
,
12
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
673
,
426
);
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
673
,
426
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox1
.
TabIndex
=
1
;
this
.
pictureBox1
.
TabIndex
=
1
;
this
.
pictureBox1
.
TabStop
=
false
;
this
.
pictureBox1
.
TabStop
=
false
;
//
//
...
...
CarerayImage/CarerayImage_Test/Form1.cs
查看文件 @
afe304f
...
@@ -70,11 +70,12 @@ namespace CarerayImage_Test
...
@@ -70,11 +70,12 @@ namespace CarerayImage_Test
bmp
=
careray
.
Get48bImage
();
bmp
=
careray
.
Get48bImage
();
pictureBox1
.
Image
=
bmp
;
pictureBox1
.
Image
=
bmp
;
}
}
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
private
void
button5_Click
(
object
sender
,
EventArgs
e
)
{
{
bmp
.
Save
(
Application
.
StartupPath
+
string
.
Format
(
"\\{0:HHmmss}"
,
DateTime
.
Now
)
+
".png"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Png
);
bmp
.
Save
(
Application
.
StartupPath
+
string
.
Format
(
"\\
png\\
{0:HHmmss}"
,
DateTime
.
Now
)
+
".png"
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Png
);
}
}
...
@@ -84,9 +85,9 @@ namespace CarerayImage_Test
...
@@ -84,9 +85,9 @@ namespace CarerayImage_Test
int
h
=
100
;
int
h
=
100
;
int
count
=
w
*
h
;
int
count
=
w
*
h
;
byte
[]
buff
=
new
byte
[
count
*
3
*
2
];
byte
[]
buff
=
new
byte
[
count
*
4
*
2
];
int
n
=
0
;
int
n
=
0
;
int
color
=
32767
;
int
color
=
65535
;
byte
[]
bb
=
BitConverter
.
GetBytes
(
color
);
byte
[]
bb
=
BitConverter
.
GetBytes
(
color
);
...
@@ -100,11 +101,11 @@ namespace CarerayImage_Test
...
@@ -100,11 +101,11 @@ namespace CarerayImage_Test
buff
[
n
++]
=
bb
[
1
];
buff
[
n
++]
=
bb
[
1
];
}
}
Bitmap
bmp1
=
new
Bitmap
(
w
,
h
,
System
.
Drawing
.
Imaging
.
PixelFormat
.
Format48bppRgb
);
bmp
=
new
Bitmap
(
w
,
h
,
System
.
Drawing
.
Imaging
.
PixelFormat
.
Format48bppRgb
);
System
.
Drawing
.
Imaging
.
BitmapData
bmpData
=
bmp
1
.
LockBits
(
new
Rectangle
(
0
,
0
,
w
,
h
),
System
.
Drawing
.
Imaging
.
ImageLockMode
.
ReadWrite
,
bmp1
.
PixelFormat
);
System
.
Drawing
.
Imaging
.
BitmapData
bmpData
=
bmp
.
LockBits
(
new
Rectangle
(
0
,
0
,
w
,
h
),
System
.
Drawing
.
Imaging
.
ImageLockMode
.
ReadWrite
,
bmp
.
PixelFormat
);
System
.
Runtime
.
InteropServices
.
Marshal
.
Copy
(
buff
,
0
,
bmpData
.
Scan0
,
bmpData
.
Stride
*
h
);
System
.
Runtime
.
InteropServices
.
Marshal
.
Copy
(
buff
,
0
,
bmpData
.
Scan0
,
bmpData
.
Stride
*
h
);
bmp
1
.
UnlockBits
(
bmpData
);
bmp
.
UnlockBits
(
bmpData
);
pictureBox1
.
Image
=
bmp
1
;
pictureBox1
.
Image
=
bmp
;
}
}
}
}
}
}
CarerayImage/CarerayImage_Test/bin/Debug/Asa.CarerayImage.dll
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/bin/Debug/Asa.CarerayImage.pdb
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/bin/Debug/CarerayImage_Test.exe
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/bin/Debug/CarerayImage_Test.pdb
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.csproj.GenerateResource.cache
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.csprojAssemblyReference.cache
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.exe
查看文件 @
afe304f
此文件类型无法预览
CarerayImage/CarerayImage_Test/obj/Debug/CarerayImage_Test.pdb
查看文件 @
afe304f
此文件类型无法预览
CountImage/.vs/CountImage/v16/.suo
查看文件 @
afe304f
此文件类型无法预览
CountImage/CountImage/Class1.cs
查看文件 @
afe304f
...
@@ -46,8 +46,18 @@ namespace Asa
...
@@ -46,8 +46,18 @@ namespace Asa
private
void
RunCmd
()
private
void
RunCmd
()
{
{
_count
=
"0"
;
Process
p
=
new
Process
();
Process
p
=
new
Process
();
p
.
StartInfo
.
FileName
=
Environment
.
CurrentDirectory
+
"\\count\\count_nocolor.exe"
;
string
s1
=
Environment
.
CurrentDirectory
+
"\\count_nocolor\\count_nocolor.exe"
;
string
s2
=
Environment
.
CurrentDirectory
+
"\\count\\count.exe"
;
if
(
System
.
IO
.
File
.
Exists
(
s1
))
p
.
StartInfo
.
FileName
=
s1
;
else
if
(
System
.
IO
.
File
.
Exists
(
s2
))
p
.
StartInfo
.
FileName
=
s2
;
else
return
;
//p.StartInfo.FileName = Environment.CurrentDirectory+ "\\count\\count_nocolor.exe";
p
.
StartInfo
.
Arguments
=
string
.
Format
(
"{0} {1} {2}"
,
_path1
,
_path2
,
_path3
);
p
.
StartInfo
.
Arguments
=
string
.
Format
(
"{0} {1} {2}"
,
_path1
,
_path2
,
_path3
);
p
.
StartInfo
.
UseShellExecute
=
false
;
//是否使用操作系统shell启动
p
.
StartInfo
.
UseShellExecute
=
false
;
//是否使用操作系统shell启动
p
.
StartInfo
.
RedirectStandardInput
=
true
;
//接受来自调用程序的输入信息
p
.
StartInfo
.
RedirectStandardInput
=
true
;
//接受来自调用程序的输入信息
...
...
X-Ray Controller/.vs/X-Ray Controller/v16/.suo
查看文件 @
afe304f
此文件类型无法预览
X-Ray Controller/X-Ray Controller/obj/Debug/X-Ray Controller.csproj.FileListAbsolute.txt
查看文件 @
afe304f
...
@@ -12,3 +12,4 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controll
...
@@ -12,3 +12,4 @@ D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray.pdb
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\bin\Debug\log4net.dll
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray Controller.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray Controller.csproj.CopyComplete
D:\OneDrive - 上海挚锦科技有限公司\SMD\AutoCountMachine\X-Ray Controller\X-Ray Controller\obj\Debug\X-Ray Controller.csprojAssemblyReference.cache
X-Ray Controller/X-Ray_Test/Form1.Designer.cs
查看文件 @
afe304f
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
this
.
textBox2
.
Name
=
"textBox2"
;
this
.
textBox2
.
Name
=
"textBox2"
;
this
.
textBox2
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
textBox2
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
textBox2
.
TabIndex
=
10
;
this
.
textBox2
.
TabIndex
=
10
;
this
.
textBox2
.
Text
=
"60.0"
;
this
.
textBox2
.
Text
=
"
0
60.0"
;
//
//
// textBox3
// textBox3
//
//
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
this
.
textBox3
.
Name
=
"textBox3"
;
this
.
textBox3
.
Name
=
"textBox3"
;
this
.
textBox3
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
textBox3
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
21
);
this
.
textBox3
.
TabIndex
=
11
;
this
.
textBox3
.
TabIndex
=
11
;
this
.
textBox3
.
Text
=
"500"
;
this
.
textBox3
.
Text
=
"
0
500"
;
//
//
// Form1
// Form1
//
//
...
...
X-Ray Controller/X-Ray_Test/bin/Debug/X-Ray_Test.exe
查看文件 @
afe304f
此文件类型无法预览
X-Ray Controller/X-Ray_Test/bin/Debug/X-Ray_Test.pdb
查看文件 @
afe304f
此文件类型无法预览
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.csproj.GenerateResource.cache
查看文件 @
afe304f
此文件类型无法预览
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.csprojAssemblyReference.cache
查看文件 @
afe304f
此文件类型无法预览
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.exe
查看文件 @
afe304f
此文件类型无法预览
X-Ray Controller/X-Ray_Test/obj/Debug/X-Ray_Test.pdb
查看文件 @
afe304f
此文件类型无法预览
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论