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

Bare bones Cuda compile. Removed all of the Mex/Matlab functions to be rewritten

parent c3a355f0
No related branches found
Tags deletedOld
No related merge requests found
Showing
with 0 additions and 131 deletions
% AddConstant - This will add a constant value at every voxel location.
% imageOut = ImProc.Cuda.AddConstant(imageIn,additive,device)
% ImageIn -- can be an image up to three dimensions and of type (uint8,int8,uint16,int16,uint32,int32,single,double).
% Additive -- must be a double and will be floored if input is an integer type.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% ImageOut -- will have the same dimensions and type as imageIn. Values are clamped to the range of the image space.
function imageOut = AddConstant(imageIn,additive,device)
[imageOut] = ImProc.Cuda.Mex('AddConstant',imageIn,additive,device);
end
% AddImageWith - This takes two images and adds them together.
% imageOut = ImProc.Cuda.AddImageWith(imageIn1,imageIn2,factor,device)
% ImageIn1 -- can be an image up to three dimensions and of type (uint8,int8,uint16,int16,uint32,int32,single,double).
% ImageIn2 -- can be an image up to three dimensions and of the same type as imageIn1.
% Factor -- this is a multiplier to the second image in the form imageOut = imageIn1 + factor*imageIn2.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% imageOut -- this is the result of imageIn1 + factor*imageIn2 and will be of the same type as imageIn1.
function imageOut = AddImageWith(imageIn1,imageIn2,factor,device)
[imageOut] = ImProc.Cuda.Mex('AddImageWith',imageIn1,imageIn2,factor,device);
end
% ApplyPolyTransformation - This returns an image with the quadradic function applied. ImageOut = a*ImageIn^2 + b*ImageIn + c
% imageOut = ImProc.Cuda.ApplyPolyTransformation(imageIn,a,b,c,min,max,device)
% A -- this multiplier is applied to the square of the image.
% B -- this multiplier is applied to the image.
% C -- is the constant additive.
% Min -- this is an optional parameter to clamp the output to and is useful for signed or floating point to remove negative values.
% Max -- this is an optional parameter to clamp the output to.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% ImageOut -- this is the result of ImageOut = a*ImageIn^2 + b*ImageIn + c and is the same dimension and type as imageIn.
function imageOut = ApplyPolyTransformation(imageIn,a,b,c,min,max,device)
[imageOut] = ImProc.Cuda.Mex('ApplyPolyTransformation',imageIn,a,b,c,min,max,device);
end
% ContrastEnhancement - This attempts to increase contrast by removing noise as proposed by Michel et al. This starts with subtracting off a highly smoothed version of imageIn followed by median filter.
% imageOut = ImProc.Cuda.ContrastEnhancement(imageIn,sigma,MedianNeighborhood,device)
% ImageIn -- can be an image up to three dimensions and of type (uint8,int8,uint16,int16,uint32,int32,single,double).
% Sigma -- these values will create a n-dimensional Gaussian kernel to get a smoothed image that will be subtracted of the original.
% N is the number of dimensions of imageIn
% The larger the sigma the more object preserving the high pass filter will be (e.g. sigma > 35)
% MedianNeighborhood -- this is the neighborhood size in each dimension that will be evaluated for the median neighborhood filter.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% ImageOut -- will have the same dimensions and type as imageIn.
function imageOut = ContrastEnhancement(imageIn,sigma,MedianNeighborhood,device)
[imageOut] = ImProc.Cuda.Mex('ContrastEnhancement',imageIn,sigma,MedianNeighborhood,device);
end
% EntropyFilter - imageOut = EntropyFilter(imageIn,kernel,device)
function imageOut = EntropyFilter(imageIn,kernel,device)
[imageOut] = ImProc.Cuda.Mex('EntropyFilter',imageIn,kernel,device);
end
% GaussianFilter - Smooths image using a Gaussian kernel.
% imageOut = ImProc.Cuda.GaussianFilter(imageIn,sigma,device)
% ImageIn -- can be an image up to three dimensions and of type (uint8,int8,uint16,int16,uint32,int32,single,double).
% Sigma -- these values will create a n-dimensional Gaussian kernel to get a smoothed image that will be subtracted of the original.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% ImageOut -- will have the same dimensions and type as imageIn. Values are clamped to the range of the image space.
function imageOut = GaussianFilter(imageIn,sigma,device)
[imageOut] = ImProc.Cuda.Mex('GaussianFilter',imageIn,sigma,device);
end
% Histogram - Creates a histogram array with numBins bins between min/max values.
% histogram = ImProc.Cuda.Histogram(imageIn,numBins,min,max,device)
% ImageIn -- can be an image up to three dimensions and of type (uint8,int8,uint16,int16,uint32,int32,single,double).
% NumBins -- number of bins that the histogram should partition the signal into.
% Min -- this is the minimum value for the histogram.
% If min is not provided, the min of the image type is used.
% Max -- this is the maximum value for the histogram.
% If min is not provided, the min of the image type is used.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% ImageOut -- will have the same dimensions and type as imageIn. Values are clamped to the range of the image space.
function histogram = Histogram(imageIn,numBins,min,max,device)
[histogram] = ImProc.Cuda.Mex('Histogram',imageIn,numBins,min,max,device);
end
% ImagePow - This will raise each voxel value to the power provided.
% imageOut = ImProc.Cuda.ImagePow(imageIn,power,device)
% ImageIn -- can be an image up to three dimensions and of type (uint8,int8,uint16,int16,uint32,int32,single,double).
% Power -- must be a double.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% ImageOut -- will have the same dimensions and type as imageIn. Values are clamped to the range of the image space.
function imageOut = ImagePow(imageIn,power,device)
[imageOut] = ImProc.Cuda.Mex('ImagePow',imageIn,power,device);
end
% LinearUnmixing - imageOut = LinearUnmixing(mixedImages,unmixMatrix,device)
function imageOut = LinearUnmixing(mixedImages,unmixMatrix,device)
[imageOut] = ImProc.Cuda.Mex('LinearUnmixing',mixedImages,unmixMatrix,device);
end
% LoG - Smooths image using a Gaussian kernel.
% imageOut = ImProc.Cuda.LoG(imageIn,sigma,device)
% ImageIn -- can be an image up to three dimensions and of type (uint8,int8,uint16,int16,uint32,int32,single,double).
% Sigma -- these values will create a n-dimensional Gaussian kernel to get a smoothed image that will be subtracted of the original.
% Device -- this is an optional parameter that indicates which Cuda capable device to use.
% ImageOut -- will have the same dimensions and type as imageIn. Values are clamped to the range of the image space.
function imageOut = LoG(imageIn,sigma,device)
[imageOut] = ImProc.Cuda.Mex('LoG',imageIn,sigma,device);
end
% MarkovRandomFieldDenoiser - imageOut = MarkovRandomFieldDenoiser(imageIn,maxIterations,device)
function imageOut = MarkovRandomFieldDenoiser(imageIn,maxIterations,device)
[imageOut] = ImProc.Cuda.Mex('MarkovRandomFieldDenoiser',imageIn,maxIterations,device);
end
% MaxFilterEllipsoid - imageOut = MaxFilterEllipsoid(imageIn,radius,device)
function imageOut = MaxFilterEllipsoid(imageIn,radius,device)
[imageOut] = ImProc.Cuda.Mex('MaxFilterEllipsoid',imageIn,radius,device);
end
% MaxFilterKernel - imageOut = MaxFilterKernel(imageIn,kernel,device)
function imageOut = MaxFilterKernel(imageIn,kernel,device)
[imageOut] = ImProc.Cuda.Mex('MaxFilterKernel',imageIn,kernel,device);
end
% MaxFilterNeighborhood - imageOut = MaxFilterNeighborhood(imageIn,Neighborhood,device)
function imageOut = MaxFilterNeighborhood(imageIn,Neighborhood,device)
[imageOut] = ImProc.Cuda.Mex('MaxFilterNeighborhood',imageIn,Neighborhood,device);
end
% MeanFilter - imageOut = MeanFilter(imageIn,Neighborhood,device)
function imageOut = MeanFilter(imageIn,Neighborhood,device)
[imageOut] = ImProc.Cuda.Mex('MeanFilter',imageIn,Neighborhood,device);
end
% MedianFilter - imageOut = MedianFilter(imageIn,Neighborhood,device)
function imageOut = MedianFilter(imageIn,Neighborhood,device)
[imageOut] = ImProc.Cuda.Mex('MedianFilter',imageIn,Neighborhood,device);
end
% MinFilterEllipsoid - imageOut = MinFilterEllipsoid(imageIn,radius,device)
function imageOut = MinFilterEllipsoid(imageIn,radius,device)
[imageOut] = ImProc.Cuda.Mex('MinFilterEllipsoid',imageIn,radius,device);
end
% MinFilterKernel - imageOut = MinFilterKernel(imageIn,kernel,device)
function imageOut = MinFilterKernel(imageIn,kernel,device)
[imageOut] = ImProc.Cuda.Mex('MinFilterKernel',imageIn,kernel,device);
end
% MinFilterNeighborhood - imageOut = MinFilterNeighborhood(imageIn,Neighborhood,device)
function imageOut = MinFilterNeighborhood(imageIn,Neighborhood,device)
[imageOut] = ImProc.Cuda.Mex('MinFilterNeighborhood',imageIn,Neighborhood,device);
end
% MinMax - [min,max] = MinMax(imageIn,device)
function [min,max] = MinMax(imageIn,device)
[min,max] = ImProc.Cuda.Mex('MinMax',imageIn,device);
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