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

Name changed to Hydra Image Processor (HIP)

parent 45167174
No related branches found
No related tags found
No related merge requests found
Showing
with 46 additions and 46 deletions
% Opener - This kernel will erode follow by a dilation. % Opener - This kernel will erode follow by a dilation.
% arrayOut = HSP.Cuda.Opener(arrayIn,kernel,[numIterations],[device]) % 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. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
% %
% imageOut = This will be an array of the same type and shape as the input array. % imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = Opener(arrayIn,kernel,numIterations,device) function arrayOut = Opener(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('Opener',arrayIn,kernel,numIterations,device); [arrayOut] = HIP.Cuda.Mex('Opener',arrayIn,kernel,numIterations,device);
end end
% StdFilter - This will take the standard deviation of the given neighborhood. % StdFilter - This will take the standard deviation of the given neighborhood.
% arrayOut = HSP.Cuda.StdFilter(arrayIn,kernel,[numIterations],[device]) % arrayOut = HIP.Cuda.StdFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
% %
% imageOut = This will be an array of the same type and shape as the input array. % imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = StdFilter(arrayIn,kernel,numIterations,device) function arrayOut = StdFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('StdFilter',arrayIn,kernel,numIterations,device); [arrayOut] = HIP.Cuda.Mex('StdFilter',arrayIn,kernel,numIterations,device);
end end
% Sum - This sums up the entire array in. % Sum - This sums up the entire array in.
% valueOut = HSP.Cuda.Sum(arrayIn,[device]) % valueOut = HIP.Cuda.Sum(arrayIn,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
% %
% valueOut = This is the summation of the entire array. % valueOut = This is the summation of the entire array.
function valueOut = Sum(arrayIn,device) function valueOut = Sum(arrayIn,device)
[valueOut] = HSP.Cuda.Mex('Sum',arrayIn,device); [valueOut] = HIP.Cuda.Mex('Sum',arrayIn,device);
end end
% VarFilter - This will take the variance deviation of the given neighborhood. % VarFilter - This will take the variance deviation of the given neighborhood.
% arrayOut = HSP.Cuda.VarFilter(arrayIn,kernel,[numIterations],[device]) % arrayOut = HIP.Cuda.VarFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
% %
% imageOut = This will be an array of the same type and shape as the input array. % imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = VarFilter(arrayIn,kernel,numIterations,device) function arrayOut = VarFilter(arrayIn,kernel,numIterations,device)
[arrayOut] = HSP.Cuda.Mex('VarFilter',arrayIn,kernel,numIterations,device); [arrayOut] = HIP.Cuda.Mex('VarFilter',arrayIn,kernel,numIterations,device);
end end
% WienerFilter - A Wiener filter aims to denoise an image in a linear fashion. % WienerFilter - A Wiener filter aims to denoise an image in a linear fashion.
% arrayOut = HSP.Cuda.WienerFilter(arrayIn,[kernel],[noiseVariance],[device]) % arrayOut = HIP.Cuda.WienerFilter(arrayIn,[kernel],[noiseVariance],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -18,5 +18,5 @@ ...@@ -18,5 +18,5 @@
% %
% imageOut = This will be an array of the same type and shape as the input array. % imageOut = This will be an array of the same type and shape as the input array.
function arrayOut = WienerFilter(arrayIn,kernel,noiseVariance,device) function arrayOut = WienerFilter(arrayIn,kernel,noiseVariance,device)
[arrayOut] = HSP.Cuda.Mex('WienerFilter',arrayIn,kernel,noiseVariance,device); [arrayOut] = HIP.Cuda.Mex('WienerFilter',arrayIn,kernel,noiseVariance,device);
end end
File moved
...@@ -12,11 +12,11 @@ excludeList = ... ...@@ -12,11 +12,11 @@ excludeList = ...
curPath = pwd(); curPath = pwd();
% find where the image processing package is % find where the image processing package is
cudaPath = fileparts(which('HSP.BuildMexObject')); cudaPath = fileparts(which('HIP.BuildMexObject'));
cd(cudaPath) cd(cudaPath)
% create the m files that correspond to the commands in the mex interface % create the m files that correspond to the commands in the mex interface
HSP.BuildMexObject('..\..\c\Mex.mexw64','Cuda','HSP'); HIP.BuildMexObject('..\..\c\Mex.mexw64','Cuda','HIP');
packagePath = cudaPath; packagePath = cudaPath;
cudaPath = fullfile(cudaPath,'@Cuda'); cudaPath = fullfile(cudaPath,'@Cuda');
...@@ -77,9 +77,9 @@ for i=1:length(dList) ...@@ -77,9 +77,9 @@ for i=1:length(dList)
funcCallFilled = funcCall; funcCallFilled = funcCall;
fprintf(f,'\nfunction %s = %s(%s)\n',funcCall.out,funcCall.name,funcCall.param); fprintf(f,'\nfunction %s = %s(%s)\n',funcCall.out,funcCall.name,funcCall.param);
fprintf(f,' try\n'); fprintf(f,' try\n');
fprintf(f,' %s = HSP.Cuda.%s(%s);\n',funcCall.out,funcCall.name,funcCall.param); fprintf(f,' %s = HIP.Cuda.%s(%s);\n',funcCall.out,funcCall.name,funcCall.param);
fprintf(f,' catch errMsg\n'); fprintf(f,' catch errMsg\n');
localFuctionCall = sprintf('%s = HSP.Local.%s(%s)',funcCall.out,funcCall.name,funcCall.param); localFuctionCall = sprintf('%s = HIP.Local.%s(%s)',funcCall.out,funcCall.name,funcCall.param);
fprintf(f,' warning(errMsg.message);\n'); fprintf(f,' warning(errMsg.message);\n');
fprintf(f,' %s;\n', localFuctionCall); fprintf(f,' %s;\n', localFuctionCall);
fprintf(f,' end\n'); fprintf(f,' end\n');
...@@ -136,6 +136,6 @@ for i=1:length(dList) ...@@ -136,6 +136,6 @@ for i=1:length(dList)
end end
end end
fprintf('HSP BuildScript wrote %d functions\n',numFunctions); fprintf('HIP BuildScript wrote %d functions\n',numFunctions);
% go back to the original directory % go back to the original directory
cd(curPath) cd(curPath)
% Closure - This kernel will dilate follow by an erosion. % Closure - This kernel will dilate follow by an erosion.
% arrayOut = HSP.Closure(arrayIn,kernel,[numIterations],[device]) % arrayOut = HIP.Closure(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
function arrayOut = Closure(arrayIn,kernel,numIterations,device) function arrayOut = Closure(arrayIn,kernel,numIterations,device)
try try
arrayOut = HSP.Cuda.Closure(arrayIn,kernel,numIterations,device); arrayOut = HIP.Cuda.Closure(arrayIn,kernel,numIterations,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.Closure(arrayIn,kernel,numIterations,device); arrayOut = HIP.Local.Closure(arrayIn,kernel,numIterations,device);
end end
end end
% ElementWiseDifference - This subtracts the second array from the first, element by element (A-B). % ElementWiseDifference - This subtracts the second array from the first, element by element (A-B).
% arrayOut = HSP.ElementWiseDifference(array1In,array2In,[device]) % arrayOut = HIP.ElementWiseDifference(array1In,array2In,[device])
% image1In = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
function arrayOut = ElementWiseDifference(array1In,array2In,device) function arrayOut = ElementWiseDifference(array1In,array2In,device)
try try
arrayOut = HSP.Cuda.ElementWiseDifference(array1In,array2In,device); arrayOut = HIP.Cuda.ElementWiseDifference(array1In,array2In,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.ElementWiseDifference(array1In,array2In,device); arrayOut = HIP.Local.ElementWiseDifference(array1In,array2In,device);
end end
end end
% EntropyFilter - This calculates the entropy within the neighborhood given by the kernel. % EntropyFilter - This calculates the entropy within the neighborhood given by the kernel.
% arrayOut = HSP.EntropyFilter(arrayIn,kernel,[device]) % arrayOut = HIP.EntropyFilter(arrayIn,kernel,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
function arrayOut = EntropyFilter(arrayIn,kernel,device) function arrayOut = EntropyFilter(arrayIn,kernel,device)
try try
arrayOut = HSP.Cuda.EntropyFilter(arrayIn,kernel,device); arrayOut = HIP.Cuda.EntropyFilter(arrayIn,kernel,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.EntropyFilter(arrayIn,kernel,device); arrayOut = HIP.Local.EntropyFilter(arrayIn,kernel,device);
end end
end end
% Gaussian - Gaussian smoothing. % Gaussian - Gaussian smoothing.
% arrayOut = HSP.Gaussian(arrayIn,sigmas,[numIterations],[device]) % arrayOut = HIP.Gaussian(arrayIn,sigmas,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
function arrayOut = Gaussian(arrayIn,sigmas,numIterations,device) function arrayOut = Gaussian(arrayIn,sigmas,numIterations,device)
try try
arrayOut = HSP.Cuda.Gaussian(arrayIn,sigmas,numIterations,device); arrayOut = HIP.Cuda.Gaussian(arrayIn,sigmas,numIterations,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.Gaussian(arrayIn,sigmas,numIterations,device); arrayOut = HIP.Local.Gaussian(arrayIn,sigmas,numIterations,device);
end end
end end
% GetMinMax - This function finds the lowest and highest value in the array that is passed in. % GetMinMax - This function finds the lowest and highest value in the array that is passed in.
% [minValue,maxValue] = HSP.GetMinMax(arrayIn,[device]) % [minValue,maxValue] = HIP.GetMinMax(arrayIn,[device])
% imageIn = This is a one to five dimensional array. % imageIn = This is a one to five dimensional array.
% %
% device (optional) = Use this if you have multiple devices and want to select one explicitly. % device (optional) = Use this if you have multiple devices and want to select one explicitly.
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
function [minValue,maxValue] = GetMinMax(arrayIn,device) function [minValue,maxValue] = GetMinMax(arrayIn,device)
try try
[minValue,maxValue] = HSP.Cuda.GetMinMax(arrayIn,device); [minValue,maxValue] = HIP.Cuda.GetMinMax(arrayIn,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
[minValue,maxValue] = HSP.Local.GetMinMax(arrayIn,device); [minValue,maxValue] = HIP.Local.GetMinMax(arrayIn,device);
end end
end end
% Help - Help on a specified command. % Help - Help on a specified command.
% HSP.Help(command) % HIP.Help(command)
% Print detailed usage information for the specified command. % Print detailed usage information for the specified command.
function Help(command) function Help(command)
end end
% HighPassFilter - Filters out low frequency by subtracting a Gaussian blurred version of the input based on the sigmas provided. % HighPassFilter - Filters out low frequency by subtracting a Gaussian blurred version of the input based on the sigmas provided.
% arrayOut = HSP.HighPassFilter(arrayIn,sigmas,[device]) % arrayOut = HIP.HighPassFilter(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
function arrayOut = HighPassFilter(arrayIn,sigmas,device) function arrayOut = HighPassFilter(arrayIn,sigmas,device)
try try
arrayOut = HSP.Cuda.HighPassFilter(arrayIn,sigmas,device); arrayOut = HIP.Cuda.HighPassFilter(arrayIn,sigmas,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.HighPassFilter(arrayIn,sigmas,device); arrayOut = HIP.Local.HighPassFilter(arrayIn,sigmas,device);
end end
end end
% Info - Get information on all available mex commands. % Info - Get information on all available mex commands.
% commandInfo = HSP.Info() % commandInfo = HIP.Info()
% Returns commandInfo structure array containing information on all mex commands. % Returns commandInfo structure array containing information on all mex commands.
% commandInfo.command - Command string % commandInfo.command - Command string
% commandInfo.outArgs - Cell array of output arguments % commandInfo.outArgs - Cell array of output arguments
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
function commandInfo = Info() function commandInfo = Info()
try try
commandInfo = HSP.Cuda.Info(); commandInfo = HIP.Cuda.Info();
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
commandInfo = HSP.Local.Info(); commandInfo = HIP.Local.Info();
end end
end end
% LoG - Apply a Lapplacian of Gaussian filter with the given sigmas. % LoG - Apply a Lapplacian of Gaussian filter with the given sigmas.
% arrayOut = HSP.LoG(arrayIn,sigmas,[device]) % arrayOut = HIP.LoG(arrayIn,sigmas,[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
function arrayOut = LoG(arrayIn,sigmas,device) function arrayOut = LoG(arrayIn,sigmas,device)
try try
arrayOut = HSP.Cuda.LoG(arrayIn,sigmas,device); arrayOut = HIP.Cuda.LoG(arrayIn,sigmas,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.LoG(arrayIn,sigmas,device); arrayOut = HIP.Local.LoG(arrayIn,sigmas,device);
end end
end end
File moved
% MaxFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel. % MaxFilter - This will set each pixel/voxel to the max value of the neighborhood defined by the given kernel.
% arrayOut = HSP.MaxFilter(arrayIn,kernel,[numIterations],[device]) % arrayOut = HIP.MaxFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
function arrayOut = MaxFilter(arrayIn,kernel,numIterations,device) function arrayOut = MaxFilter(arrayIn,kernel,numIterations,device)
try try
arrayOut = HSP.Cuda.MaxFilter(arrayIn,kernel,numIterations,device); arrayOut = HIP.Cuda.MaxFilter(arrayIn,kernel,numIterations,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.MaxFilter(arrayIn,kernel,numIterations,device); arrayOut = HIP.Local.MaxFilter(arrayIn,kernel,numIterations,device);
end end
end end
% MeanFilter - This will take the mean of the given neighborhood. % MeanFilter - This will take the mean of the given neighborhood.
% arrayOut = HSP.MeanFilter(arrayIn,kernel,[numIterations],[device]) % arrayOut = HIP.MeanFilter(arrayIn,kernel,[numIterations],[device])
% imageIn = This is a one to five dimensional array. The first three dimensions are treated as spatial. % 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 % The spatial dimensions will have the kernel applied. The last two dimensions will determine
% how to stride or jump to the next spatial block. % how to stride or jump to the next spatial block.
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
function arrayOut = MeanFilter(arrayIn,kernel,numIterations,device) function arrayOut = MeanFilter(arrayIn,kernel,numIterations,device)
try try
arrayOut = HSP.Cuda.MeanFilter(arrayIn,kernel,numIterations,device); arrayOut = HIP.Cuda.MeanFilter(arrayIn,kernel,numIterations,device);
catch errMsg catch errMsg
warning(errMsg.message); warning(errMsg.message);
arrayOut = HSP.Local.MeanFilter(arrayIn,kernel,numIterations,device); arrayOut = HIP.Local.MeanFilter(arrayIn,kernel,numIterations,device);
end end
end end
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