Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
hydra-image-processor
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
OpenSource
hydra-image-processor
Commits
222dce71
Commit
222dce71
authored
Feb 22, 2019
by
Andrew Cohen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rebuilt agains cuda 9.1
parent
32d38de7
Changes
49
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
1453 additions
and
1450 deletions
+1453
-1450
Closure.m
src/MATLAB/+HIP/@Cuda/Closure.m
+22
-22
Cuda.m
src/MATLAB/+HIP/@Cuda/Cuda.m
+29
-29
DeviceCount.m
src/MATLAB/+HIP/@Cuda/DeviceCount.m
+8
-8
DeviceStats.m
src/MATLAB/+HIP/@Cuda/DeviceStats.m
+7
-7
ElementWiseDifference.m
src/MATLAB/+HIP/@Cuda/ElementWiseDifference.m
+18
-18
EntropyFilter.m
src/MATLAB/+HIP/@Cuda/EntropyFilter.m
+18
-18
Gaussian.m
src/MATLAB/+HIP/@Cuda/Gaussian.m
+21
-21
GetMinMax.m
src/MATLAB/+HIP/@Cuda/GetMinMax.m
+13
-13
Help.m
src/MATLAB/+HIP/@Cuda/Help.m
+6
-6
HighPassFilter.m
src/MATLAB/+HIP/@Cuda/HighPassFilter.m
+17
-17
Info.m
src/MATLAB/+HIP/@Cuda/Info.m
+10
-10
LoG.m
src/MATLAB/+HIP/@Cuda/LoG.m
+17
-17
MaxFilter.m
src/MATLAB/+HIP/@Cuda/MaxFilter.m
+22
-22
MeanFilter.m
src/MATLAB/+HIP/@Cuda/MeanFilter.m
+22
-22
MedianFilter.m
src/MATLAB/+HIP/@Cuda/MedianFilter.m
+22
-22
Mex.mexw64
src/MATLAB/+HIP/@Cuda/Mex.mexw64
+2
-2
MinFilter.m
src/MATLAB/+HIP/@Cuda/MinFilter.m
+22
-22
MinMax.m
src/MATLAB/+HIP/@Cuda/MinMax.m
+15
-15
MultiplySum.m
src/MATLAB/+HIP/@Cuda/MultiplySum.m
+22
-22
Opener.m
src/MATLAB/+HIP/@Cuda/Opener.m
+22
-22
StdFilter.m
src/MATLAB/+HIP/@Cuda/StdFilter.m
+22
-22
Sum.m
src/MATLAB/+HIP/@Cuda/Sum.m
+14
-14
VarFilter.m
src/MATLAB/+HIP/@Cuda/VarFilter.m
+22
-22
WienerFilter.m
src/MATLAB/+HIP/@Cuda/WienerFilter.m
+22
-22
Closure.m
src/MATLAB/+HIP/Closure.m
+28
-28
ElementWiseDifference.m
src/MATLAB/+HIP/ElementWiseDifference.m
+24
-24
EntropyFilter.m
src/MATLAB/+HIP/EntropyFilter.m
+24
-24
Gaussian.m
src/MATLAB/+HIP/Gaussian.m
+27
-27
GetMinMax.m
src/MATLAB/+HIP/GetMinMax.m
+19
-19
Help.m
src/MATLAB/+HIP/Help.m
+5
-5
HighPassFilter.m
src/MATLAB/+HIP/HighPassFilter.m
+23
-23
Info.m
src/MATLAB/+HIP/Info.m
+16
-16
LoG.m
src/MATLAB/+HIP/LoG.m
+23
-23
MaxFilter.m
src/MATLAB/+HIP/MaxFilter.m
+28
-28
MeanFilter.m
src/MATLAB/+HIP/MeanFilter.m
+28
-28
MedianFilter.m
src/MATLAB/+HIP/MedianFilter.m
+28
-28
MinFilter.m
src/MATLAB/+HIP/MinFilter.m
+28
-28
MinMax.m
src/MATLAB/+HIP/MinMax.m
+21
-21
MultiplySum.m
src/MATLAB/+HIP/MultiplySum.m
+28
-28
Opener.m
src/MATLAB/+HIP/Opener.m
+28
-28
StdFilter.m
src/MATLAB/+HIP/StdFilter.m
+28
-28
Sum.m
src/MATLAB/+HIP/Sum.m
+20
-20
VarFilter.m
src/MATLAB/+HIP/VarFilter.m
+28
-28
WienerFilter.m
src/MATLAB/+HIP/WienerFilter.m
+28
-28
CudaImageProcessor.vcxproj
src/c/CudaImageProcessor.vcxproj
+202
-202
CudaMex.vcxproj
src/c/CudaMex.vcxproj
+139
-136
CudaPy3DLL.vcxproj
src/c/CudaPy3DLL.vcxproj
+212
-212
Mex.mexw64
src/c/Mex.mexw64
+2
-2
MexDeviceStats.cpp
src/c/Mex/MexDeviceStats.cpp
+1
-1
No files found.
src/MATLAB/+HIP/@Cuda/Closure.m
View file @
222dce71
% Closure - This kernel will dilate follow by an erosion.
% arrayOut = HIP.Cuda.Closure(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
Closure
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'Closure'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
% Closure - This kernel will dilate follow by an erosion.
% arrayOut = HIP.Cuda.Closure(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
Closure
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'Closure'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
src/MATLAB/+HIP/@Cuda/Cuda.m
View file @
222dce71
classdef
(
Abstract
,
Sealed
)
Cuda
methods
(
Static
)
commandInfo
=
Info
()
Help
(
command
)
[
numCudaDevices
,
memoryStats
]
=
DeviceCount
()
deviceStatsArray
=
DeviceStats
()
arrayOut
=
Closure
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
ElementWiseDifference
(
array1In
,
array2In
,
device
)
arrayOut
=
EntropyFilter
(
arrayIn
,
kernel
,
device
)
arrayOut
=
Gaussian
(
arrayIn
,
sigmas
,
numIterations
,
device
)
[
minValue
,
maxValue
]
=
GetMinMax
(
arrayIn
,
device
)
arrayOut
=
HighPassFilter
(
arrayIn
,
sigmas
,
device
)
arrayOut
=
LoG
(
arrayIn
,
sigmas
,
device
)
arrayOut
=
MaxFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
MeanFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
MedianFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
MinFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
minOut
,
maxOut
]
=
MinMax
(
arrayIn
,
device
)
arrayOut
=
MultiplySum
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
Opener
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
StdFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
valueOut
=
Sum
(
arrayIn
,
device
)
arrayOut
=
VarFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
WienerFilter
(
arrayIn
,
kernel
,
noiseVariance
,
device
)
end
methods
(
Static
,
Access
=
private
)
varargout
=
Mex
(
command
,
varargin
)
end
end
classdef
(
Abstract
,
Sealed
)
Cuda
methods
(
Static
)
commandInfo
=
Info
()
Help
(
command
)
[
numCudaDevices
,
memoryStats
]
=
DeviceCount
()
deviceStatsArray
=
DeviceStats
()
arrayOut
=
Closure
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
ElementWiseDifference
(
array1In
,
array2In
,
device
)
arrayOut
=
EntropyFilter
(
arrayIn
,
kernel
,
device
)
arrayOut
=
Gaussian
(
arrayIn
,
sigmas
,
numIterations
,
device
)
[
minValue
,
maxValue
]
=
GetMinMax
(
arrayIn
,
device
)
arrayOut
=
HighPassFilter
(
arrayIn
,
sigmas
,
device
)
arrayOut
=
LoG
(
arrayIn
,
sigmas
,
device
)
arrayOut
=
MaxFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
MeanFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
MedianFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
MinFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
minOut
,
maxOut
]
=
MinMax
(
arrayIn
,
device
)
arrayOut
=
MultiplySum
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
Opener
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
StdFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
valueOut
=
Sum
(
arrayIn
,
device
)
arrayOut
=
VarFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
arrayOut
=
WienerFilter
(
arrayIn
,
kernel
,
noiseVariance
,
device
)
end
methods
(
Static
,
Access
=
private
)
varargout
=
Mex
(
command
,
varargin
)
end
end
src/MATLAB/+HIP/@Cuda/DeviceCount.m
View file @
222dce71
% DeviceCount - This will return the number of Cuda devices available, and their memory.
% [numCudaDevices,memoryStats] = HIP.Cuda.DeviceCount()
% NumCudaDevices -- this is the number of Cuda devices available.
% MemoryStats -- this is an array of structures where each entry corresponds to a Cuda device.
% The memory structure contains the total memory on the device and the memory available for a Cuda call.
function
[
numCudaDevices
,
memoryStats
]
=
DeviceCount
()
[
numCudaDevices
,
memoryStats
]
=
HIP
.
Cuda
.
Mex
(
'DeviceCount'
);
end
% DeviceCount - This will return the number of Cuda devices available, and their memory.
% [numCudaDevices,memoryStats] = HIP.Cuda.DeviceCount()
% NumCudaDevices -- this is the number of Cuda devices available.
% MemoryStats -- this is an array of structures where each entry corresponds to a Cuda device.
% The memory structure contains the total memory on the device and the memory available for a Cuda call.
function
[
numCudaDevices
,
memoryStats
]
=
DeviceCount
()
[
numCudaDevices
,
memoryStats
]
=
HIP
.
Cuda
.
Mex
(
'DeviceCount'
);
end
src/MATLAB/+HIP/@Cuda/DeviceStats.m
View file @
222dce71
% DeviceStats - This will return the statistics of each Cuda capable device installed.
% deviceStatsArray = HIP.Cuda.DeviceStats()
% DeviceStatsArray -- this is an array of structs, one struct per device.
% The struct has these fields: name, major, minor, constMem, sharedMem, totalMem, tccDriver, mpCount, threadsPerMP, warpSize, maxThreads.
function
deviceStatsArray
=
DeviceStats
()
[
deviceStatsArray
]
=
HIP
.
Cuda
.
Mex
(
'DeviceStats'
);
end
% DeviceStats - This will return the statistics of each Cuda capable device installed.
% deviceStatsArray = HIP.Cuda.DeviceStats()
% DeviceStatsArray -- this is an array of structs, one struct per device.
% The struct has these fields: name, major, minor, constMem, sharedMem, totalMem, tccDriver, mpCount, threadsPerMP, warpSize, maxThreads.
function
deviceStatsArray
=
DeviceStats
()
[
deviceStatsArray
]
=
HIP
.
Cuda
.
Mex
(
'DeviceStats'
);
end
src/MATLAB/+HIP/@Cuda/ElementWiseDifference.m
View file @
222dce71
% ElementWiseDifference - This subtracts the second array from the first, element by element (A-B).
% arrayOut = HIP.Cuda.ElementWiseDifference(array1In,array2In,[device])
% image1In = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% image2In = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
ElementWiseDifference
(
array1In
,
array2In
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'ElementWiseDifference'
,
array1In
,
array2In
,
device
);
end
% ElementWiseDifference - This subtracts the second array from the first, element by element (A-B).
% arrayOut = HIP.Cuda.ElementWiseDifference(array1In,array2In,[device])
% image1In = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% image2In = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
ElementWiseDifference
(
array1In
,
array2In
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'ElementWiseDifference'
,
array1In
,
array2In
,
device
);
end
src/MATLAB/+HIP/@Cuda/EntropyFilter.m
View file @
222dce71
% EntropyFilter - This calculates the entropy within the neighborhood given by the kernel.
% arrayOut = HIP.Cuda.EntropyFilter(arrayIn,kernel,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
EntropyFilter
(
arrayIn
,
kernel
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'EntropyFilter'
,
arrayIn
,
kernel
,
device
);
end
% EntropyFilter - This calculates the entropy within the neighborhood given by the kernel.
% arrayOut = HIP.Cuda.EntropyFilter(arrayIn,kernel,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
EntropyFilter
(
arrayIn
,
kernel
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'EntropyFilter'
,
arrayIn
,
kernel
,
device
);
end
src/MATLAB/+HIP/@Cuda/Gaussian.m
View file @
222dce71
% Gaussian - Gaussian smoothing.
% arrayOut = HIP.Cuda.Gaussian(arrayIn,sigmas,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% Sigmas = This should be an array of three positive values that represent the standard deviation of a Gaussian curve.
% Zeros (0) in this array will not smooth in that direction.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
Gaussian
(
arrayIn
,
sigmas
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'Gaussian'
,
arrayIn
,
sigmas
,
numIterations
,
device
);
end
% Gaussian - Gaussian smoothing.
% arrayOut = HIP.Cuda.Gaussian(arrayIn,sigmas,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% Sigmas = This should be an array of three positive values that represent the standard deviation of a Gaussian curve.
% Zeros (0) in this array will not smooth in that direction.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
Gaussian
(
arrayIn
,
sigmas
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'Gaussian'
,
arrayIn
,
sigmas
,
numIterations
,
device
);
end
src/MATLAB/+HIP/@Cuda/GetMinMax.m
View file @
222dce71
% GetMinMax - This function finds the lowest and highest value in the array that is passed in.
% [minValue,maxValue] = HIP.Cuda.GetMinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% minValue = This is the lowest value found in the array.
% maxValue = This is the highest value found in the array.
function
[
minValue
,
maxValue
]
=
GetMinMax
(
arrayIn
,
device
)
[
minValue
,
maxValue
]
=
HIP
.
Cuda
.
Mex
(
'GetMinMax'
,
arrayIn
,
device
);
end
% GetMinMax - This function finds the lowest and highest value in the array that is passed in.
% [minValue,maxValue] = HIP.Cuda.GetMinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% minValue = This is the lowest value found in the array.
% maxValue = This is the highest value found in the array.
function
[
minValue
,
maxValue
]
=
GetMinMax
(
arrayIn
,
device
)
[
minValue
,
maxValue
]
=
HIP
.
Cuda
.
Mex
(
'GetMinMax'
,
arrayIn
,
device
);
end
src/MATLAB/+HIP/@Cuda/Help.m
View file @
222dce71
% Help - Help on a specified command.
% HIP.Cuda.Help(command)
% Print detailed usage information for the specified command.
function
Help
(
command
)
HIP
.
Cuda
.
Mex
(
'Help'
,
command
);
end
% Help - Help on a specified command.
% HIP.Cuda.Help(command)
% Print detailed usage information for the specified command.
function
Help
(
command
)
HIP
.
Cuda
.
Mex
(
'Help'
,
command
);
end
src/MATLAB/+HIP/@Cuda/HighPassFilter.m
View file @
222dce71
% HighPassFilter - Filters out low frequency by subtracting a Gaussian blurred version of the input based on the sigmas provided.
% arrayOut = HIP.Cuda.HighPassFilter(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% Sigmas = This should be an array of three positive values that represent the standard deviation of a Gaussian curve.
% Zeros (0) in this array will not smooth in that direction.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
HighPassFilter
(
arrayIn
,
sigmas
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'HighPassFilter'
,
arrayIn
,
sigmas
,
device
);
end
% HighPassFilter - Filters out low frequency by subtracting a Gaussian blurred version of the input based on the sigmas provided.
% arrayOut = HIP.Cuda.HighPassFilter(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% Sigmas = This should be an array of three positive values that represent the standard deviation of a Gaussian curve.
% Zeros (0) in this array will not smooth in that direction.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
HighPassFilter
(
arrayIn
,
sigmas
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'HighPassFilter'
,
arrayIn
,
sigmas
,
device
);
end
src/MATLAB/+HIP/@Cuda/Info.m
View file @
222dce71
% Info - Get information on all available mex commands.
% commandInfo = HIP.Cuda.Info()
% Returns commandInfo structure array containing information on all mex commands.
% commandInfo.command - Command string
% commandInfo.outArgs - Cell array of output arguments
% commandInfo.inArgs - Cell array of input arguments
% commandInfo.helpLines - Cell array of input arguments
function
commandInfo
=
Info
()
[
commandInfo
]
=
HIP
.
Cuda
.
Mex
(
'Info'
);
end
% Info - Get information on all available mex commands.
% commandInfo = HIP.Cuda.Info()
% Returns commandInfo structure array containing information on all mex commands.
% commandInfo.command - Command string
% commandInfo.outArgs - Cell array of output arguments
% commandInfo.inArgs - Cell array of input arguments
% commandInfo.helpLines - Cell array of input arguments
function
commandInfo
=
Info
()
[
commandInfo
]
=
HIP
.
Cuda
.
Mex
(
'Info'
);
end
src/MATLAB/+HIP/@Cuda/LoG.m
View file @
222dce71
% LoG - Apply a Lapplacian of Gaussian filter with the given sigmas.
% arrayOut = HIP.Cuda.LoG(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% Sigmas = This should be an array of three positive values that represent the standard deviation of a Gaussian curve.
% Zeros (0) in this array will not smooth in that direction.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
LoG
(
arrayIn
,
sigmas
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'LoG'
,
arrayIn
,
sigmas
,
device
);
end
% LoG - Apply a Lapplacian of Gaussian filter with the given sigmas.
% arrayOut = HIP.Cuda.LoG(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% Sigmas = This should be an array of three positive values that represent the standard deviation of a Gaussian curve.
% Zeros (0) in this array will not smooth in that direction.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
LoG
(
arrayIn
,
sigmas
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'LoG'
,
arrayIn
,
sigmas
,
device
);
end
src/MATLAB/+HIP/@Cuda/MaxFilter.m
View file @
222dce71
% MaxFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HIP.Cuda.MaxFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MaxFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MaxFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
% MaxFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HIP.Cuda.MaxFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MaxFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MaxFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
src/MATLAB/+HIP/@Cuda/MeanFilter.m
View file @
222dce71
% MeanFilter - This will take the mean of the given neighborhood.
% arrayOut = HIP.Cuda.MeanFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MeanFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MeanFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
% MeanFilter - This will take the mean of the given neighborhood.
% arrayOut = HIP.Cuda.MeanFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MeanFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MeanFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
src/MATLAB/+HIP/@Cuda/MedianFilter.m
View file @
222dce71
% MedianFilter - This will calculate the median for each neighborhood defined by the kernel.
% arrayOut = HIP.Cuda.MedianFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MedianFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MedianFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
% MedianFilter - This will calculate the median for each neighborhood defined by the kernel.
% arrayOut = HIP.Cuda.MedianFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MedianFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MedianFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
src/MATLAB/+HIP/@Cuda/Mex.mexw64
LFS
View file @
222dce71
No preview for this file type
src/MATLAB/+HIP/@Cuda/MinFilter.m
View file @
222dce71
% MinFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HIP.Cuda.MinFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MinFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MinFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
% MinFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HIP.Cuda.MinFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MinFilter
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MinFilter'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
src/MATLAB/+HIP/@Cuda/MinMax.m
View file @
222dce71
% MinMax - This returns the global min and max values.
% [minOut,maxOut] = HIP.Cuda.MinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% minOut = This is the minimum value found in the input.
% maxOut = This is the maximum value found in the input.
function
[
minOut
,
maxOut
]
=
MinMax
(
arrayIn
,
device
)
[
minOut
,
maxOut
]
=
HIP
.
Cuda
.
Mex
(
'MinMax'
,
arrayIn
,
device
);
end
% MinMax - This returns the global min and max values.
% [minOut,maxOut] = HIP.Cuda.MinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% minOut = This is the minimum value found in the input.
% maxOut = This is the maximum value found in the input.
function
[
minOut
,
maxOut
]
=
MinMax
(
arrayIn
,
device
)
[
minOut
,
maxOut
]
=
HIP
.
Cuda
.
Mex
(
'MinMax'
,
arrayIn
,
device
);
end
src/MATLAB/+HIP/@Cuda/MultiplySum.m
View file @
222dce71
% MultiplySum - Multiplies the kernel with the neighboring values and sums these new values.
% arrayOut = HIP.Cuda.MultiplySum(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MultiplySum
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MultiplySum'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
% MultiplySum - Multiplies the kernel with the neighboring values and sums these new values.
% arrayOut = HIP.Cuda.MultiplySum(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
MultiplySum
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'MultiplySum'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
src/MATLAB/+HIP/@Cuda/Opener.m
View file @
222dce71
% Opener - This kernel will erode follow by a dilation.
% arrayOut = HIP.Cuda.Opener(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
Opener
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'Opener'
,
arrayIn
,
kernel
,
numIterations
,
device
);
end
% Opener - This kernel will erode follow by a dilation.
% arrayOut = HIP.Cuda.Opener(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial.
% The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block.
%
% kernel = This is a one to three dimensional array that will be used to determine neighborhood operations.
% In this case, the positions in the kernel that do not equal zeros will be evaluated.
% In other words, this can be viewed as a structuring element for the max neighborhood.
%
% numIterations (optional) = This is the number of iterations to run the max filter for a given position.
% This is useful for growing regions by the shape of the structuring element or for very large neighborhoods.
% Can be empty an array [].
%
% device (optional) = Use this if you have multiple devices and want to select one explicitly.
% Setting this to [] allows the algorithm to either pick the best device and/or will try to split
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function
arrayOut
=
Opener
(
arrayIn
,
kernel
,
numIterations
,
device
)
[
arrayOut
]
=
HIP
.
Cuda
.
Mex
(
'Opener'
,
arrayIn
,
kernel
,
numIterations
,
device
);