Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hydra-image-processor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
hydra-image-processor
Commits
94893f86
Commit
94893f86
authored
11 years ago
by
Eric Wait
Browse files
Options
Downloads
Patches
Plain Diff
Minor updates
parent
76e44fc5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/MATLAB/sandbox2.m
+22
-0
22 additions, 0 deletions
src/MATLAB/sandbox2.m
src/c/CudaMex.vcxproj
+2
-3
2 additions, 3 deletions
src/c/CudaMex.vcxproj
src/c/CudaMex.vcxproj.filters
+6
-3
6 additions, 3 deletions
src/c/CudaMex.vcxproj.filters
src/c/CudaMex/Process.cu
+6
-6
6 additions, 6 deletions
src/c/CudaMex/Process.cu
with
36 additions
and
12 deletions
src/MATLAB/sandbox2.m
0 → 100644
+
22
−
0
View file @
94893f86
%% read
im
=
tiffReader
(
'DAPI Olig2-514 GFAP-488 Dcx-647 Laminin-Cy3 Bcatenin-568 20x20'
);
chan1_8
=
uint8
(
im
(:,:,:,
1
,
1
));
%% threshold
chan1Bin
=
CudaMex
(
'OtsuThresholdFilter'
,
chan1_8
,
0.8
);
chan1Close
=
CudaMex
(
'MorphClosure'
,
chan1Bin
,[
3
,
3
,
2
]);
chan1Open
=
CudaMex
(
'MorphOpening'
,
chan1Close
,[
5
,
5
,
2
]);
%% draw
figure
imagesc
(
chan1_8
(:,:,
20
))
colormap
gray
figure
imagesc
(
chan1Bin
(:,:,
20
))
colormap
gray
figure
imagesc
(
chan1Close
(:,:,
20
))
colormap
gray
figure
imagesc
(
chan1Open
(:,:,
20
))
colormap
gray
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/c/CudaMex.vcxproj
+
2
−
3
View file @
94893f86
...
...
@@ -59,9 +59,6 @@
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"Common\CHelpers.h"
/>
<ClInclude
Include=
"Common\CudaImageBuffer.cuh"
>
<FileType>
Document
</FileType>
</ClInclude>
<ClInclude
Include=
"Common\Vec.h"
/>
<ClInclude
Include=
"Common\VecFuncs.h"
/>
<ClInclude
Include=
"CudaMex\MexCommand.h"
/>
...
...
@@ -71,6 +68,8 @@
<ClInclude
Include=
"Common\CudaUtilities.cuh"
>
<FileType>
Document
</FileType>
</ClInclude>
<None
Include=
"Common\CudaProcessBuffer.cuh"
/>
<None
Include=
"Common\CudaStorageBuffer.cuh"
/>
<None
Include=
"CudaMex\CudaMex.def"
/>
</ItemGroup>
<ItemGroup>
...
...
This diff is collapsed.
Click to expand it.
src/c/CudaMex.vcxproj.filters
+
6
−
3
View file @
94893f86
...
...
@@ -127,14 +127,17 @@
<None
Include=
"CudaMex\CudaMex.def"
>
<Filter>
Resource Files
</Filter>
</None>
<None
Include=
"Common\CudaProcessBuffer.cuh"
>
<Filter>
Header Files
</Filter>
</None>
<None
Include=
"Common\CudaStorageBuffer.cuh"
>
<Filter>
Header Files
</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"CudaMex\Process.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
<ClInclude
Include=
"Common\CudaImageBuffer.cuh"
>
<Filter>
Header Files
</Filter>
</ClInclude>
<ClInclude
Include=
"Common\Vec.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
...
...
This diff is collapsed.
Click to expand it.
src/c/CudaMex/Process.cu
+
6
−
6
View file @
94893f86
#include
"Process.h"
#include
"Cuda
Image
Buffer.cuh"
#include
"Cuda
Process
Buffer.cuh"
#include
"CHelpers.h"
Cuda
Image
Buffer
<
MexImagePixelType
>*
g_cudaBuffer
=
NULL
;
Cuda
Image
Buffer
<
MexImagePixelType
>*
g_cudaBuffer2
=
NULL
;
Cuda
Process
Buffer
<
MexImagePixelType
>*
g_cudaBuffer
=
NULL
;
Cuda
Process
Buffer
<
MexImagePixelType
>*
g_cudaBuffer2
=
NULL
;
void
clear
()
{
...
...
@@ -16,13 +16,13 @@ void clear()
void
set
(
Vec
<
unsigned
int
>
imageDims
)
{
if
(
g_cudaBuffer
==
NULL
)
g_cudaBuffer
=
new
Cuda
Image
Buffer
<
unsigned
char
>
(
imageDims
,
true
);
g_cudaBuffer
=
new
Cuda
Process
Buffer
<
unsigned
char
>
(
imageDims
,
true
);
}
void
set2
(
Vec
<
unsigned
int
>
imageDims
)
{
if
(
g_cudaBuffer2
==
NULL
)
g_cudaBuffer2
=
new
Cuda
Image
Buffer
<
unsigned
char
>
(
imageDims
,
true
);
g_cudaBuffer2
=
new
Cuda
Process
Buffer
<
unsigned
char
>
(
imageDims
,
true
);
}
void
addConstant
(
const
MexImagePixelType
*
image
,
MexImagePixelType
*
imageOut
,
Vec
<
unsigned
int
>
imageDims
,
double
additive
)
...
...
@@ -89,7 +89,7 @@ void gaussianFilter( const MexImagePixelType* image, MexImagePixelType* imageOut
size_t
getGlobalMemoryAvailable
()
{
Cuda
Image
Buffer
<
unsigned
char
>
cudaBuffer
(
1
);
Cuda
Process
Buffer
<
unsigned
char
>
cudaBuffer
(
1
);
return
g_cudaBuffer
->
getGlobalMemoryAvailable
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment