Skip to content
Snippets Groups Projects
Commit 94893f86 authored by Eric Wait's avatar Eric Wait
Browse files

Minor updates

parent 76e44fc5
No related branches found
No related tags found
No related merge requests found
%% 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
......@@ -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>
......
......@@ -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>
......
#include "Process.h"
#include "CudaImageBuffer.cuh"
#include "CudaProcessBuffer.cuh"
#include "CHelpers.h"
CudaImageBuffer<MexImagePixelType>* g_cudaBuffer = NULL;
CudaImageBuffer<MexImagePixelType>* g_cudaBuffer2 = NULL;
CudaProcessBuffer<MexImagePixelType>* g_cudaBuffer = NULL;
CudaProcessBuffer<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 CudaImageBuffer<unsigned char>(imageDims,true);
g_cudaBuffer = new CudaProcessBuffer<unsigned char>(imageDims,true);
}
void set2(Vec<unsigned int> imageDims)
{
if (g_cudaBuffer2==NULL)
g_cudaBuffer2 = new CudaImageBuffer<unsigned char>(imageDims,true);
g_cudaBuffer2 = new CudaProcessBuffer<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()
{
CudaImageBuffer<unsigned char> cudaBuffer(1);
CudaProcessBuffer<unsigned char> cudaBuffer(1);
return g_cudaBuffer->getGlobalMemoryAvailable();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment