Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
santan-cuda-drr-service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘劭荣(20软)
santan-cuda-drr-service
Commits
3a20bf00
Commit
3a20bf00
authored
Sep 27, 2020
by
刘劭荣(20软)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新输出类型
parent
e28d50b9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
16 deletions
+8
-16
README.md
README.md
+3
-3
cuda-drr-socket.vcxproj
cuda-drr-socket/cuda-drr-socket.vcxproj
+1
-1
main.cpp
cuda-drr-socket/main.cpp
+1
-2
socketManager.cpp
cuda-drr-socket/socketManager.cpp
+3
-10
cuda-drr-socket.iobj
x64/Release/cuda-drr-socket.iobj
+0
-0
cuda-drr-socket.ipdb
x64/Release/cuda-drr-socket.ipdb
+0
-0
No files found.
README.md
View file @
3a20bf00
...
...
@@ -28,12 +28,12 @@
### socket
*
用户必须要在接收到CT序列成功读取的信息后,才能进行该功能
*
用户向本端口发送
`PARA(rx, ry, rz, dx, dy, threshold
, flag
)`
即可启动该功能
*
用户向本端口发送
`PARA(rx, ry, rz, dx, dy, threshold)`
即可启动该功能
*
rx, ry, rz (float): 模型的绕XYZ轴的旋转角度(-180~180)
*
dx, dy (int): 生成图像的大小
*
threshold (float): DRR筛选阈值
*
flag (int): 选择数组的返回类型,0为float数组,1为unsigned char数组
*
例如
`PARA(90.0, 0.0, 0.0, 1024, 1024, 0.0, 1)`
*
例如
`PARA(90.0, 0.0, 0.0, 1024, 1024, 0.0)`
*
生成的图像数组类型为 unsigned char
*
*
DRR生成完毕后,用户将接收一个一维数组,长度为dx
*
dy,用来表示生成的DRR图像
## 客户端示例
...
...
cuda-drr-socket/cuda-drr-socket.vcxproj
View file @
3a20bf00
...
...
@@ -29,7 +29,7 @@
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<CharacterSet>
MultiByte
</CharacterSet>
<PlatformToolset>
v141
</PlatformToolset>
<UseOfMfc>
Static
</UseOfMfc>
<UseOfMfc>
false
</UseOfMfc>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
...
...
cuda-drr-socket/main.cpp
View file @
3a20bf00
...
...
@@ -195,11 +195,10 @@ int main() {
cout
<<
" Help: "
<<
endl
;
cout
<<
" Send the message
\"
CT(__folder_path__)
\"
for loading a CT sequence."
<<
endl
;
cout
<<
" Client will receive the message to inform if the operation is completed."
<<
endl
;
cout
<<
" Send the message
\"
PARA(rx,ry,rz,dx,dy,threshold
,flag
)
\"
for generating a DRR image."
<<
endl
;
cout
<<
" Send the message
\"
PARA(rx,ry,rz,dx,dy,threshold)
\"
for generating a DRR image."
<<
endl
;
cout
<<
" rx,ry,rz(float) are the rotation angle for the DRR image."
<<
endl
;
cout
<<
" dx,dy(int) are the width and height of the DRR image."
<<
endl
;
cout
<<
" threshold(float) can filter the required pixels for DRR images."
<<
endl
;
cout
<<
" flag(int) can decide the type of DRR array. 0 for float while 1 for unsigned char."
<<
endl
;
cout
<<
" Client will receive a DRR array if the operation is completed."
<<
endl
;
cout
<<
"*******************************************************************************"
<<
endl
;
if
(
!
cuda_check
())
return
0
;
...
...
cuda-drr-socket/socketManager.cpp
View file @
3a20bf00
...
...
@@ -90,16 +90,9 @@ void socketManager::open_socket() {
float
*
data
=
handleString
(
szMessage
,
ret
);
//////// 生成DRR
try
{
if
((
int
)
data
[
6
]
==
0
)
{
float
*
object2D
=
get_FloatDRR
(
data
[
0
],
data
[
1
],
data
[
2
],
(
int
)
data
[
3
],
(
int
)
data
[
4
],
data
[
5
]);
send
(
sClient
,
(
char
*
)
object2D
,
sizeof
(
float
)
*
(
int
)
data
[
3
]
*
(
int
)
data
[
4
],
0
);
free
(
object2D
);
}
else
{
unsigned
char
*
object2D
=
get_UCharDRR
(
data
[
0
],
data
[
1
],
data
[
2
],
(
int
)
data
[
3
],
(
int
)
data
[
4
],
data
[
5
]);
send
(
sClient
,
(
char
*
)
object2D
,
sizeof
(
unsigned
char
)
*
(
int
)
data
[
3
]
*
(
int
)
data
[
4
],
0
);
free
(
object2D
);
}
unsigned
char
*
object2D
=
get_UCharDRR
(
data
[
0
],
data
[
1
],
data
[
2
],
(
int
)
data
[
3
],
(
int
)
data
[
4
],
data
[
5
]);
send
(
sClient
,
(
char
*
)
object2D
,
sizeof
(
unsigned
char
)
*
(
int
)
data
[
3
]
*
(
int
)
data
[
4
],
0
);
free
(
object2D
);
}
catch
(
exception
&
e
)
{
printf
(
"Failed to generate DRR, please check your parameters.
\n
"
);
...
...
x64/Release/cuda-drr-socket.iobj
View file @
3a20bf00
No preview for this file type
x64/Release/cuda-drr-socket.ipdb
View file @
3a20bf00
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment