Commit 6d9b2baa authored by Eric Wait's avatar Eric Wait

Compiled for Windows

parent 15f6b460
% Closure - This kernel will dilate follow by an erosion.
% arrayOut = HIP.Cuda.Closure(arrayIn,kernel,[numIterations],[device])
% Closure - This kernel will apply a dilation followed by an erosion.
% [imageOut] = HIP.Cuda.Closure(imageIn,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.
......@@ -17,6 +17,6 @@
% 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);
function [imageOut] = Closure(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('Closure',imageIn,kernel,numIterations,device);
end
classdef (Abstract,Sealed) Cuda
methods (Static)
commandInfo = Info()
[imageOut] = Closure(imageIn,kernel,numIterations,device)
[imageOut] = HighPassFilter(imageIn,sigmas,device)
[numCudaDevices,memStats] = DeviceCount()
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 = IdentityFilter(arrayIn,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)
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)
[minVal,maxVal] = GetMinMax(imageIn,device)
[cmdInfo] = Info()
[imageOut] = Gaussian(imageIn,sigmas,numIterations,device)
[imageOut] = MeanFilter(imageIn,kernel,numIterations,device)
[deviceStatsArray] = DeviceStats()
[imageOut] = ElementWiseDifference(image1In,image2In,device)
[imageOut] = MultiplySum(imageIn,kernel,numIterations,device)
[imageOut] = EntropyFilter(imageIn,kernel,device)
[imageOut] = StdFilter(imageIn,kernel,numIterations,device)
[imageOut] = IdentityFilter(imageIn,device)
[imageOut] = LoG(imageIn,sigmas,device)
[imageOut] = MedianFilter(imageIn,kernel,numIterations,device)
[imageOut] = MinFilter(imageIn,kernel,numIterations,device)
[imageOut] = MaxFilter(imageIn,kernel,numIterations,device)
[imageOut] = Opener(imageIn,kernel,numIterations,device)
[imageOut] = Sum(imageIn,device)
[imageOut] = VarFilter(imageIn,kernel,numIterations,device)
[imageOut] = WienerFilter(imageIn,kernel,noiseVariance,device)
end
methods (Static, Access = private)
varargout = Mex(command, varargin)
......
% DeviceCount - This will return the number of Cuda devices available, and their memory.
% [numCudaDevices,memoryStats] = HIP.Cuda.DeviceCount()
% [numCudaDevices,memStats] = 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');
%
function [numCudaDevices,memStats] = DeviceCount()
[numCudaDevices,memStats] = HIP.Cuda.Mex('DeviceCount');
end
% DeviceStats - This will return the statistics of each Cuda capable device installed.
% deviceStatsArray = HIP.Cuda.DeviceStats()
% [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()
function [deviceStatsArray] = DeviceStats()
[deviceStatsArray] = HIP.Cuda.Mex('DeviceStats');
end
% ElementWiseDifference - This subtracts the second array from the first, element by element (A-B).
% arrayOut = HIP.Cuda.ElementWiseDifference(array1In,array2In,[device])
% [imageOut] = HIP.Cuda.ElementWiseDifference(image1In,image2In,[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.
......@@ -13,6 +13,6 @@
% 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);
function [imageOut] = ElementWiseDifference(image1In,image2In,device)
[imageOut] = HIP.Cuda.Mex('ElementWiseDifference',image1In,image2In,device);
end
% EntropyFilter - This calculates the entropy within the neighborhood given by the kernel.
% arrayOut = HIP.Cuda.EntropyFilter(arrayIn,kernel,[device])
% [imageOut] = HIP.Cuda.EntropyFilter(imageIn,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.
......@@ -13,6 +13,7 @@
% 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);
%
function [imageOut] = EntropyFilter(imageIn,kernel,device)
[imageOut] = HIP.Cuda.Mex('EntropyFilter',imageIn,kernel,device);
end
% Gaussian - Gaussian smoothing.
% arrayOut = HIP.Cuda.Gaussian(arrayIn,sigmas,[numIterations],[device])
% [imageOut] = HIP.Cuda.Gaussian(imageIn,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.
......@@ -16,6 +16,7 @@
% 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);
%
function [imageOut] = Gaussian(imageIn,sigmas,numIterations,device)
[imageOut] = HIP.Cuda.Mex('Gaussian',imageIn,sigmas,numIterations,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])
% [minVal,maxVal] = HIP.Cuda.GetMinMax(imageIn,[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.
......@@ -8,6 +8,7 @@
%
% 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);
%
function [minVal,maxVal] = GetMinMax(imageIn,device)
[minVal,maxVal] = HIP.Cuda.Mex('GetMinMax',imageIn,device);
end
% Help - Help on a specified command.
% HIP.Cuda.Help(command)
% Print detailed usage information for the specified command.
% Help - Print detailed usage information for the specified command.
% HIP.Cuda.Help([command])
function Help(command)
HIP.Cuda.Mex('Help',command);
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])
% [imageOut] = HIP.Cuda.HighPassFilter(imageIn,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.
......@@ -12,6 +12,7 @@
% 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);
%
function [imageOut] = HighPassFilter(imageIn,sigmas,device)
[imageOut] = HIP.Cuda.Mex('HighPassFilter',imageIn,sigmas,device);
end
% IdentityFilter - Identity Filter for testing. Copies image data to GPU memory and back into output image
% arrayOut = HIP.Cuda.IdentityFilter(arrayIn,[device])
% IdentityFilter - Identity Filter for testing. Copies image data to GPU memory and back into output image.
% [imageOut] = HIP.Cuda.IdentityFilter(imageIn,[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.
......@@ -9,6 +9,7 @@
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = IdentityFilter(arrayIn,device)
[arrayOut] = HIP.Cuda.Mex('IdentityFilter',arrayIn,device);
%
function [imageOut] = IdentityFilter(imageIn,device)
[imageOut] = HIP.Cuda.Mex('IdentityFilter',imageIn,device);
end
% Info - Get information on all available mex commands.
% commandInfo = HIP.Cuda.Info()
% [cmdInfo] = 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');
% commandInfo.outArgs - Comma-delimited string list of output arguments
% commandInfo.inArgs - Comma-delimited string list of input arguments
% commandInfo.helpLines - Help string
%
function [cmdInfo] = Info()
[cmdInfo] = HIP.Cuda.Mex('Info');
end
% LoG - Apply a Lapplacian of Gaussian filter with the given sigmas.
% arrayOut = HIP.Cuda.LoG(arrayIn,sigmas,[device])
% [imageOut] = HIP.Cuda.LoG(imageIn,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.
......@@ -12,6 +12,7 @@
% 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);
%
function [imageOut] = LoG(imageIn,sigmas,device)
[imageOut] = HIP.Cuda.Mex('LoG',imageIn,sigmas,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])
% [imageOut] = HIP.Cuda.MaxFilter(imageIn,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.
......@@ -17,6 +17,7 @@
% 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);
%
function [imageOut] = MaxFilter(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('MaxFilter',imageIn,kernel,numIterations,device);
end
% MeanFilter - This will take the mean of the given neighborhood.
% arrayOut = HIP.Cuda.MeanFilter(arrayIn,kernel,[numIterations],[device])
% [imageOut] = HIP.Cuda.MeanFilter(imageIn,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.
......@@ -17,6 +17,7 @@
% 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);
%
function [imageOut] = MeanFilter(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('MeanFilter',imageIn,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])
% [imageOut] = HIP.Cuda.MedianFilter(imageIn,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.
......@@ -17,6 +17,7 @@
% 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);
%
function [imageOut] = MedianFilter(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('MedianFilter',imageIn,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])
% [imageOut] = HIP.Cuda.MinFilter(imageIn,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.
......@@ -17,6 +17,7 @@
% 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);
%
function [imageOut] = MinFilter(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('MinFilter',imageIn,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])
% [imageOut] = HIP.Cuda.MultiplySum(imageIn,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.
......@@ -17,6 +17,7 @@
% 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);
%
function [imageOut] = MultiplySum(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('MultiplySum',imageIn,kernel,numIterations,device);
end
% Opener - This kernel will erode follow by a dilation.
% arrayOut = HIP.Cuda.Opener(arrayIn,kernel,[numIterations],[device])
% [imageOut] = HIP.Cuda.Opener(imageIn,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.
......@@ -17,6 +17,7 @@
% 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);
%
function [imageOut] = Opener(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('Opener',imageIn,kernel,numIterations,device);
end
% StdFilter - This will take the standard deviation of the given neighborhood.
% arrayOut = HIP.Cuda.StdFilter(arrayIn,kernel,[numIterations],[device])
% [imageOut] = HIP.Cuda.StdFilter(imageIn,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.
......@@ -17,6 +17,7 @@
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = StdFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HIP.Cuda.Mex('StdFilter',arrayIn,kernel,numIterations,device);
%
function [imageOut] = StdFilter(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('StdFilter',imageIn,kernel,numIterations,device);
end
% Sum - This sums up the entire array in.
% valueOut = HIP.Cuda.Sum(arrayIn,[device])
% [imageOut] = HIP.Cuda.Sum(imageIn,[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.
......@@ -9,6 +9,7 @@
% the data across multiple devices.
%
% valueOut = This is the summation of the entire array.
function valueOut = Sum(arrayIn,device)
[valueOut] = HIP.Cuda.Mex('Sum',arrayIn,device);
%
function [imageOut] = Sum(imageIn,device)
[imageOut] = HIP.Cuda.Mex('Sum',imageIn,device);
end
% VarFilter - This will take the variance deviation of the given neighborhood.
% arrayOut = HIP.Cuda.VarFilter(arrayIn,kernel,[numIterations],[device])
% [imageOut] = HIP.Cuda.VarFilter(imageIn,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.
......@@ -17,6 +17,7 @@
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = VarFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HIP.Cuda.Mex('VarFilter',arrayIn,kernel,numIterations,device);
%
function [imageOut] = VarFilter(imageIn,kernel,numIterations,device)
[imageOut] = HIP.Cuda.Mex('VarFilter',imageIn,kernel,numIterations,device);
end
% WienerFilter - A Wiener filter aims to denoise an image in a linear fashion.
% arrayOut = HIP.Cuda.WienerFilter(arrayIn,[kernel],[noiseVariance],[device])
% [imageOut] = HIP.Cuda.WienerFilter(imageIn,kernel,[noiseVariance],[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.
......@@ -17,6 +17,7 @@
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = WienerFilter(arrayIn,kernel,noiseVariance,device)
[arrayOut] = HIP.Cuda.Mex('WienerFilter',arrayIn,kernel,noiseVariance,device);
%
function [imageOut] = WienerFilter(imageIn,kernel,noiseVariance,device)
[imageOut] = HIP.Cuda.Mex('WienerFilter',imageIn,kernel,noiseVariance,device);
end
% Closure - This kernel will dilate follow by an erosion.
% arrayOut = HIP.Closure(arrayIn,kernel,[numIterations],[device])
% Closure - This kernel will apply a dilation followed by an erosion.
% [imageOut] = HIP.Closure(imageIn,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.
......@@ -18,11 +18,11 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = Closure(arrayIn,kernel,numIterations,device)
function [imageOut] = Closure(imageIn,kernel,numIterations,device)
try
arrayOut = HIP.Cuda.Closure(arrayIn,kernel,numIterations,device);
[imageOut] = HIP.Cuda.Closure(imageIn,kernel,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.Closure(arrayIn,kernel,numIterations,device);
[imageOut] = HIP.Local.Closure(imageIn,kernel,numIterations,device);
end
end
% ElementWiseDifference - This subtracts the second array from the first, element by element (A-B).
% arrayOut = HIP.ElementWiseDifference(array1In,array2In,[device])
% [imageOut] = HIP.ElementWiseDifference(image1In,image2In,[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.
......@@ -14,11 +14,11 @@
%
% imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = ElementWiseDifference(array1In,array2In,device)
function [imageOut] = ElementWiseDifference(image1In,image2In,device)
try
arrayOut = HIP.Cuda.ElementWiseDifference(array1In,array2In,device);
[imageOut] = HIP.Cuda.ElementWiseDifference(image1In,image2In,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.ElementWiseDifference(array1In,array2In,device);
[imageOut] = HIP.Local.ElementWiseDifference(image1In,image2In,device);
end
end
% EntropyFilter - This calculates the entropy within the neighborhood given by the kernel.
% arrayOut = HIP.EntropyFilter(arrayIn,kernel,[device])
% [imageOut] = HIP.EntropyFilter(imageIn,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.
......@@ -13,12 +13,13 @@
% 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)
function [imageOut] = EntropyFilter(imageIn,kernel,device)
try
arrayOut = HIP.Cuda.EntropyFilter(arrayIn,kernel,device);
[imageOut] = HIP.Cuda.EntropyFilter(imageIn,kernel,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.EntropyFilter(arrayIn,kernel,device);
[imageOut] = HIP.Local.EntropyFilter(imageIn,kernel,device);
end
end
% Gaussian - Gaussian smoothing.
% arrayOut = HIP.Gaussian(arrayIn,sigmas,[numIterations],[device])
% [imageOut] = HIP.Gaussian(imageIn,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.
......@@ -16,12 +16,13 @@
% 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)
function [imageOut] = Gaussian(imageIn,sigmas,numIterations,device)
try
arrayOut = HIP.Cuda.Gaussian(arrayIn,sigmas,numIterations,device);
[imageOut] = HIP.Cuda.Gaussian(imageIn,sigmas,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.Gaussian(arrayIn,sigmas,numIterations,device);
[imageOut] = HIP.Local.Gaussian(imageIn,sigmas,numIterations,device);
end
end
% GetMinMax - This function finds the lowest and highest value in the array that is passed in.
% [minValue,maxValue] = HIP.GetMinMax(arrayIn,[device])
% [minVal,maxVal] = HIP.GetMinMax(imageIn,[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.
......@@ -8,12 +8,13 @@
%
% 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)
function [minVal,maxVal] = GetMinMax(imageIn,device)
try
[minValue,maxValue] = HIP.Cuda.GetMinMax(arrayIn,device);
[minVal,maxVal] = HIP.Cuda.GetMinMax(imageIn,device);
catch errMsg
warning(errMsg.message);
[minValue,maxValue] = HIP.Local.GetMinMax(arrayIn,device);
[minVal,maxVal] = HIP.Local.GetMinMax(imageIn,device);
end
end
% Help - Help on a specified command.
% HIP.Help(command)
% Print detailed usage information for the specified command.
% Help - Print detailed usage information for the specified command.
% HIP.Help([command])
function Help(command)
end
% HighPassFilter - Filters out low frequency by subtracting a Gaussian blurred version of the input based on the sigmas provided.
% arrayOut = HIP.HighPassFilter(arrayIn,sigmas,[device])
% [imageOut] = HIP.HighPassFilter(imageIn,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.
......@@ -12,12 +12,13 @@
% 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)
function [imageOut] = HighPassFilter(imageIn,sigmas,device)
try
arrayOut = HIP.Cuda.HighPassFilter(arrayIn,sigmas,device);
[imageOut] = HIP.Cuda.HighPassFilter(imageIn,sigmas,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.HighPassFilter(arrayIn,sigmas,device);
[imageOut] = HIP.Local.HighPassFilter(imageIn,sigmas,device);
end
end
% IdentityFilter - Identity Filter for testing. Copies image data to GPU memory and back into output image
% arrayOut = HIP.IdentityFilter(arrayIn,[device])
% IdentityFilter - Identity Filter for testing. Copies image data to GPU memory and back into output image.
% [imageOut] = HIP.IdentityFilter(imageIn,[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.
......@@ -9,12 +9,13 @@
% the data across multiple devices.
%
% imageOut = This will be an array of the same type and shape as the input array.
%
function arrayOut = IdentityFilter(arrayIn,device)
function [imageOut] = IdentityFilter(imageIn,device)
try
arrayOut = HIP.Cuda.IdentityFilter(arrayIn,device);
[imageOut] = HIP.Cuda.IdentityFilter(imageIn,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.IdentityFilter(arrayIn,device);
[imageOut] = HIP.Local.IdentityFilter(imageIn,device);
end
end
% Info - Get information on all available mex commands.
% commandInfo = HIP.Info()
% [cmdInfo] = HIP.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
% commandInfo.outArgs - Comma-delimited string list of output arguments
% commandInfo.inArgs - Comma-delimited string list of input arguments
% commandInfo.helpLines - Help string
%
function commandInfo = Info()
function [cmdInfo] = Info()
try
commandInfo = HIP.Cuda.Info();
[cmdInfo] = HIP.Cuda.Info();
catch errMsg
warning(errMsg.message);
commandInfo = HIP.Local.Info();
[cmdInfo] = HIP.Local.Info();
end
end
% LoG - Apply a Lapplacian of Gaussian filter with the given sigmas.
% arrayOut = HIP.LoG(arrayIn,sigmas,[device])
% [imageOut] = HIP.LoG(imageIn,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.
......@@ -12,12 +12,13 @@
% 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)
function [imageOut] = LoG(imageIn,sigmas,device)
try
arrayOut = HIP.Cuda.LoG(arrayIn,sigmas,device);
[imageOut] = HIP.Cuda.LoG(imageIn,sigmas,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.LoG(arrayIn,sigmas,device);
[imageOut] = HIP.Local.LoG(imageIn,sigmas,device);
end
end
% MaxFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HIP.MaxFilter(arrayIn,kernel,[numIterations],[device])
% [imageOut] = HIP.MaxFilter(imageIn,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.
......@@ -17,12 +17,13 @@
% 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)
function [imageOut] = MaxFilter(imageIn,kernel,numIterations,device)
try
arrayOut = HIP.Cuda.MaxFilter(arrayIn,kernel,numIterations,device);
[imageOut] = HIP.Cuda.MaxFilter(imageIn,kernel,numIterations,device);
catch errMsg
warning(errMsg.message);
arrayOut = HIP.Local.MaxFilter(arrayIn,kernel,numIterations,device);
[imageOut] = HIP.Local.MaxFilter(imageIn,kernel,numIterations,device);
end
end
% MeanFilter - This will take the mean of the given neighborhood.
% arrayOut = HIP.MeanFilter(arrayIn,kernel,[numIterations],[device])