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

Fixed a type bug

parent 29faa354
No related branches found
No related tags found
No related merge requests found
......@@ -190,9 +190,17 @@ IMAGE_PROCESSOR_API size_t sumArray(const int* imageIn, size_t n, int device=0);
IMAGE_PROCESSOR_API double sumArray(const float* imageIn, size_t n, int device=0);
IMAGE_PROCESSOR_API double sumArray(const double* imageIn, size_t n, int device=0);
IMAGE_PROCESSOR_API unsigned char* segment(const unsigned char* imageIn, Vec<size_t> dims, double alpha, Vec<size_t> kernelDims, float* kernel=NULL, unsigned char** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API unsigned short* segment(const unsigned short* imageIn, Vec<size_t> dims, double alpha, Vec<size_t> kernelDims, float* kernel=NULL, unsigned short** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API short* segment(const short* imageIn, Vec<size_t> dims, double alpha, Vec<size_t> kernelDims, float* kernel=NULL, short** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API unsigned int* segment(const unsigned int* imageIn, Vec<size_t> dims, double alpha, Vec<size_t> kernelDims, float* kernel=NULL, unsigned int** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API int* segment(const int* imageIn, Vec<size_t> dims, double alpha, Vec<size_t> kernelDims, float* kernel=NULL, int** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API float* segment(const float* imageIn, Vec<size_t> dims, double alpha, Vec<size_t> kernelDims, float* kernel=NULL, float** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API double* segment(const double* imageIn, Vec<size_t> dims, double alpha, Vec<size_t> kernelDims, float* kernel=NULL, double** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API unsigned char* thresholdFilter(const unsigned char* imageIn, Vec<size_t> dims, unsigned char thresh, unsigned char** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API unsigned short* thresholdFilter(const unsigned short* imageIn, Vec<size_t> dims, unsigned short thresh, unsigned short** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API short* thresholdFilter(const short* imageIn, Vec<size_t> dims, int thresh, short** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API short* thresholdFilter(const short* imageIn, Vec<size_t> dims, short thresh, short** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API unsigned int* thresholdFilter(const unsigned int* imageIn, Vec<size_t> dims, unsigned int thresh, unsigned int** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API int* thresholdFilter(const int* imageIn, Vec<size_t> dims, int thresh, int** imageOut=NULL, int device=0);
IMAGE_PROCESSOR_API float* thresholdFilter(const float* imageIn, Vec<size_t> dims, float thresh, float** imageOut=NULL, int device=0);
......
......@@ -20,13 +20,27 @@ void MexThresholdFilter::execute( int nlhs, mxArray* plhs[], int nrhs, const mxA
thresholdFilter(imageIn,imageDims,(unsigned char)thresh,&imageOut,device);
}
else if (mxIsUint16(prhs[0]))
{
unsigned short* imageIn,* imageOut;
setupImagePointers(prhs[0],&imageIn,&imageDims,&plhs[0],&imageOut);
thresholdFilter(imageIn,imageDims,(unsigned short)thresh,&imageOut,device);
}
else if (mxIsInt16(prhs[0]))
{
short* imageIn,* imageOut;
setupImagePointers(prhs[0],&imageIn,&imageDims,&plhs[0],&imageOut);
thresholdFilter(imageIn,imageDims,(short)thresh,&imageOut,device);
}
else if (mxIsUint32(prhs[0]))
{
unsigned int* imageIn,* imageOut;
setupImagePointers(prhs[0],&imageIn,&imageDims,&plhs[0],&imageOut);
thresholdFilter(imageIn,imageDims,(unsigned int)thresh,&imageOut,device);
}
else if (mxIsInt16(prhs[0]))
else if (mxIsInt32(prhs[0]))
{
int* imageIn,* imageOut;
setupImagePointers(prhs[0],&imageIn,&imageDims,&plhs[0],&imageOut);
......
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