diff options
Diffstat (limited to 'Wrappers/Matlab')
21 files changed, 233 insertions, 51 deletions
| diff --git a/Wrappers/Matlab/CMakeLists.txt b/Wrappers/Matlab/CMakeLists.txt new file mode 100755 index 0000000..0c26148 --- /dev/null +++ b/Wrappers/Matlab/CMakeLists.txt @@ -0,0 +1,147 @@ +project(regulariserMatlab)
 +
 +
 +find_package(Matlab REQUIRED COMPONENTS MAIN_PROGRAM MX_LIBRARY ENG_LIBRARY )
 +
 +
 +
 +#C:\Users\ofn77899\Documents\Projects\CCPi\GitHub\CCPi-FISTA_Reconstruction\Core\regularisers_CPU
 +# matlab_add_mex(
 +    # NAME CPU_ROF
 +    # SRC 
 +      # ${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_CPU/ROF_TV.c
 +    # LINK_TO cilreg ${Matlab_LIBRARIES}
 +    # )
 +    
 +# target_include_directories(CPU_ROF 
 +   # PUBLIC ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU
 +   # ${CMAKE_SOURCE_DIR}/Core/regularisers_GPU
 +   # ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU
 +   # ${CMAKE_SOURCE_DIR}/Core/
 +   # ${MATLAB_INCLUDE_DIR})
 +   
 +   # matlab_add_mex(
 +    # NAME CPU_TNV
 +    # SRC 
 +      # ${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_CPU/TNV.c 
 +    # LINK_TO cilreg ${Matlab_LIBRARIES}
 +    # )
 +    
 +# target_include_directories(CPU_TNV 
 +   # PUBLIC ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU
 +   # ${CMAKE_SOURCE_DIR}/Core/regularisers_GPU
 +   # ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU
 +   # ${CMAKE_SOURCE_DIR}/Core/
 +   # ${MATLAB_INCLUDE_DIR})
 +   
 +#set (CPU_MEX_FILES "regularisers_CPU/TNV.c;regularisers_CPU/ROF_TV.c")
 +#set (MEX_TARGETS "CPU_TNV;CPU_ROF")
 +#list(APPEND MEX_TARGETS "CPU_TNV")
 +#list(APPEND MEX_TARGETS "CPU_ROF")
 +
 +file(GLOB CPU_MEX_FILES
 +    "${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_CPU/*.c"
 +    #"${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_GPU/*.c"
 +)
 +
 +#message("CPU_MEX_FILES " ${CPU_MEX_FILES})
 +
 +list(LENGTH CPU_MEX_FILES num)
 +
 +
 +MATH(EXPR num "${num}-1")
 +#set(num "-1")
 +message("found ${num} files")
 +
 +foreach(tgt RANGE 0 ${num})
 +  message("number " ${tgt})
 +  list(LENGTH CPU_MEX_FILES num2)
 +  message("the list is ${num2}")
 +  #list(GET CPU_TARGETS ${tgt} current_target)
 +  list(GET CPU_MEX_FILES ${tgt} current_file_name)
 +  get_filename_component(current_file ${current_file_name} NAME)
 +  string(REGEX MATCH "(.+).c" match ${current_file})
 +  if (NOT ${match} EQUAL "" )
 +  set (current_target ${CMAKE_MATCH_1})
 +  endif()
 +  message("matlab_add_mex target " ${current_file} " and " ${current_target})
 +  matlab_add_mex(
 +    NAME ${current_target}
 +    SRC 
 +      ${current_file_name} 
 +            #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/FGP_TV_core.c
 +	    #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/SB_TV_core.c
 +	    #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/TGV_core.c
 +	    #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/Diffusion_core.c
 +	    #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/Diffus4th_order_core.c
 +	    #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/LLT_ROF_core.c
 +            #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/ROF_TV_core.c
 +            #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/FGP_dTV_core.c
 +            #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/TNV_core.c
 +            #${CMAKE_SOURCE_DIR}/Core/regularisers_CPU/utils.c
 +	    #${CMAKE_SOURCE_DIR}/Core/inpainters_CPU/Diffusion_Inpaint_core.c
 +	    #${CMAKE_SOURCE_DIR}/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c
 +    LINK_TO cilreg ${Matlab_LIBRARIES}
 +    )
 +    
 +target_include_directories(${current_target}
 +   PUBLIC ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU
 +   ${CMAKE_SOURCE_DIR}/Core/regularisers_GPU
 +   ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU
 +   ${CMAKE_SOURCE_DIR}/Core/
 +   ${MATLAB_INCLUDE_DIR})
 +   set_property(TARGET ${current_target} PROPERTY C_STANDARD 99)
 +   list(APPEND CPU_MEX_TARGETS ${current_target})
 +   INSTALL(TARGETS ${current_target} DESTINATION "${MATLAB_DEST}")
 +endforeach()
 +   
 +add_custom_target(MatlabWrapper DEPENDS ${CPU_MEX_TARGETS})
 +
 +if (BUILD_CUDA)
 +    find_package(CUDA)
 +    if (CUDA_FOUND)
 +      file(GLOB GPU_MEX_FILES
 +        "${CMAKE_SOURCE_DIR}/Wrappers/Matlab/mex_compile/regularisers_GPU/*.cpp"
 +      )
 +
 +      list(LENGTH GPU_MEX_FILES num)
 +message("number of GPU files  " ${num})
 +
 +      MATH(EXPR num "${num}-1")
 +    #set(num "-1")
 +
 +      foreach(tgt RANGE ${num})
 +        message("number " ${tgt})
 +  list(LENGTH GPU_MEX_FILES num2)
 +  message("the list is ${num2}")
 +  #list(GET CPU_TARGETS ${tgt} current_target)
 +  list(GET GPU_MEX_FILES ${tgt} current_file_name)
 +  get_filename_component(current_file ${current_file_name} NAME)
 +  string(REGEX MATCH "(.+).c" match ${current_file})
 +  if (NOT ${match} EQUAL "" )
 +  set (current_target ${CMAKE_MATCH_1})
 +  endif()
 +  message("matlab_add_mex target " ${current_file} " and " ${current_target})
 +        message("matlab_add_mex " ${current_target})
 +        matlab_add_mex(
 +          NAME ${current_target}
 +          SRC 
 +            ${current_file_name} 
 +          LINK_TO cilregcuda ${Matlab_LIBRARIES}
 +          )
 +        
 +        target_include_directories(${current_target}
 +        PUBLIC ${CMAKE_SOURCE_DIR}/Core/regularisers_CPU
 +               ${CMAKE_SOURCE_DIR}/Core/regularisers_GPU
 +               ${CMAKE_SOURCE_DIR}/Core/inpainters_CPU
 +               ${CMAKE_SOURCE_DIR}/Core/
 +               ${MATLAB_INCLUDE_DIR})
 +       
 +        list(APPEND GPU_MEX_TARGETS ${current_target})
 +        INSTALL(TARGETS ${current_target} DESTINATION "${MATLAB_DEST}")
 +      endforeach()
 +       
 +      add_custom_target(MatlabWrapperGPU DEPENDS ${GPU_MEX_TARGETS})
 +      
 +    endif()
 +endif()
 diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c index 81c0600..66ea9be 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/Diffusion_4thO.c @@ -42,8 +42,9 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter_numb, dimX, dimY, dimZ; -    const int  *dim_array; +    int number_of_dims, iter_numb; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;      float *Input, *Output=NULL, lambda, tau, sigma;      dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c index aae1cb7..642362f 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_TV.c @@ -44,8 +44,9 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch, nonneg; -    const int  *dim_array; +    int number_of_dims, iter, methTV, printswitch, nonneg; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;      float *Input, *Output=NULL, lambda, epsil;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c index bb868c7..1a0c070 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/FGP_dTV.c @@ -49,9 +49,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch, nonneg; -    const int  *dim_array; -    const int  *dim_array2; +    int number_of_dims, iter, methTV, printswitch, nonneg; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +    const mwSize *dim_array2;          float *Input, *InputRef, *Output=NULL, lambda, epsil, eta;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c index 81b717d..ab45446 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/LLT_ROF.c @@ -46,8 +46,9 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iterationsNumb, dimX, dimY, dimZ; -    const int  *dim_array; +    int number_of_dims, iterationsNumb; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;          float *Input, *Output=NULL, lambdaROF, lambdaLLT, tau;      dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c index e05f5d4..ec35b8b 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff.c @@ -43,8 +43,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter_numb, dimX, dimY, dimZ, penaltytype; -    const int  *dim_array; +    int number_of_dims, iter_numb, penaltytype; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;    +          float *Input, *Output=NULL, lambda, tau, sigma;      dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c index eaab4a7..9833392 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlDiff_Inp.c @@ -45,9 +45,11 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter_numb, dimX, dimY, dimZ, penaltytype, i, inpaint_elements; -    const int  *dim_array; -    const int  *dim_array2; +    int number_of_dims, iter_numb, penaltytype, i, inpaint_elements; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;    +    const mwSize *dim_array2;    +          float *Input, *Output=NULL, lambda, tau, sigma;      unsigned char *Mask; @@ -95,7 +97,7 @@ void mexFunction(      }          inpaint_elements = 0; -    for (i=0; i<dimY*dimX*dimZ; i++) if (Mask[i] == 1) inpaint_elements++; +    for (i=0; i<(int)(dimY*dimX*dimZ); i++) if (Mask[i] == 1) inpaint_elements++;      if (inpaint_elements == 0) mexErrMsgTxt("The mask is full of zeros, nothing to inpaint");              Diffusion_Inpaint_CPU_main(Input, Mask, Output, lambda, sigma, iter_numb, tau, penaltytype, dimX, dimY, dimZ);  }
\ No newline at end of file diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlocalMarching_Inpaint.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlocalMarching_Inpaint.c index 36cf05c..b3f2c98 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlocalMarching_Inpaint.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/NonlocalMarching_Inpaint.c @@ -42,9 +42,11 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, dimX, dimY, dimZ, iterations, SW_increment; -    const int  *dim_array; -    const int  *dim_array2; +    int number_of_dims, iterations, SW_increment; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +    const mwSize *dim_array2; +          float *Input, *Output=NULL;      unsigned char *Mask, *Mask_upd=NULL; diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/ROF_TV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/ROF_TV.c index 6b9e1ea..55ef2b1 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/ROF_TV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/ROF_TV.c @@ -1,3 +1,4 @@ +  /*   * This work is part of the Core Imaging Library developed by   * Visual Analytics and Imaging System Group of the Science Technology @@ -43,11 +44,12 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter_numb, dimX, dimY, dimZ; -    const int  *dim_array; -    float *Input, *Output=NULL, lambda, tau; +    int number_of_dims, iter_numb; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array_i; +    float *Input, *Output=NULL, lambda, tau;     -    dim_array = mxGetDimensions(prhs[0]); +    dim_array_i = mxGetDimensions(prhs[0]);      number_of_dims = mxGetNumberOfDimensions(prhs[0]);      /*Handling Matlab input data*/ @@ -59,15 +61,17 @@ void mexFunction(      if (mxGetClassID(prhs[0]) != mxSINGLE_CLASS) {mexErrMsgTxt("The input image must be in a single precision"); }      if(nrhs != 4) mexErrMsgTxt("Four inputs reqired: Image(2D,3D), regularization parameter, iterations number,  marching step constant");      /*Handling Matlab output data*/ -    dimX = dim_array[0]; dimY = dim_array[1]; dimZ = dim_array[2]; +    dimX = dim_array_i[0]; dimY = dim_array_i[1]; dimZ = dim_array_i[2];              /* output arrays*/      if (number_of_dims == 2) {          dimZ = 1; /*2D case*/          /* output image/volume */ -        Output = (float*)mxGetPr(plhs[0] = mxCreateNumericArray(2, dim_array, mxSINGLE_CLASS, mxREAL));                         +        Output = (float*)mxGetPr(plhs[0] = mxCreateNumericArray(2, dim_array_i, mxSINGLE_CLASS, mxREAL));                }     -    if (number_of_dims == 3) Output = (float*)mxGetPr(plhs[0] = mxCreateNumericArray(3, dim_array, mxSINGLE_CLASS, mxREAL)); -     +    if (number_of_dims == 3) { +        Output = (float*)mxGetPr(plhs[0] = mxCreateNumericArray(3, dim_array_i, mxSINGLE_CLASS, mxREAL)); +    } +           TV_ROF_CPU_main(Input, Output, lambda, iter_numb, tau, dimX, dimY, dimZ);      }
\ No newline at end of file diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/SB_TV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/SB_TV.c index d284cac..8636322 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/SB_TV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/SB_TV.c @@ -42,8 +42,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch; -    const int  *dim_array; +    int number_of_dims, iter, methTV, printswitch; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +          float *Input, *Output=NULL, lambda, epsil;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/TGV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/TGV.c index 9516869..5459bf5 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/TGV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/TGV.c @@ -43,8 +43,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY; -    const int  *dim_array; +    int number_of_dims, iter; +    mwSize dimX, dimY; +    const mwSize *dim_array; +          float *Input, *Output=NULL, lambda, alpha0, alpha1, L2;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/TNV.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/TNV.c index e0584c4..acea75d 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/TNV.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/TNV.c @@ -41,8 +41,9 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY, dimZ; -    const int  *dim_array; +    int number_of_dims, iter; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;      float *Input, *Output=NULL, lambda, epsil;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_CPU/TV_energy.c b/Wrappers/Matlab/mex_compile/regularisers_CPU/TV_energy.c index f9eb2ce..d457f46 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_CPU/TV_energy.c +++ b/Wrappers/Matlab/mex_compile/regularisers_CPU/TV_energy.c @@ -36,8 +36,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, dimX, dimY, dimZ, type; -    const int  *dim_array; +    int number_of_dims, type; +     +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;      float *Input, *Input0, lambda;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/Diffusion_4thO_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/Diffusion_4thO_GPU.cpp index 0edc067..0cc042b 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/Diffusion_4thO_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/Diffusion_4thO_GPU.cpp @@ -42,8 +42,9 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter_numb, dimX, dimY, dimZ; -    const int  *dim_array; +    int number_of_dims, iter_numb; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array;      float *Input, *Output=NULL, lambda, tau, sigma;      dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_TV_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_TV_GPU.cpp index 9ed9ae0..c174e75 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_TV_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_TV_GPU.cpp @@ -43,8 +43,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch, nonneg; -    const int  *dim_array; +    int number_of_dims, iter, methTV, printswitch, nonneg; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +          float *Input, *Output=NULL, lambda, epsil;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_dTV_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_dTV_GPU.cpp index 5b80616..3f5a4b3 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_dTV_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/FGP_dTV_GPU.cpp @@ -47,9 +47,11 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch, nonneg; -    const int  *dim_array; -    const int  *dim_array2; +    int number_of_dims, iter, methTV, printswitch, nonneg; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +    const mwSize *dim_array2; +          float *Input, *InputRef, *Output=NULL, lambda, epsil, eta;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/LLT_ROF_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/LLT_ROF_GPU.cpp index 37563b0..e8da4ce 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/LLT_ROF_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/LLT_ROF_GPU.cpp @@ -46,8 +46,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iterationsNumb, dimX, dimY, dimZ; -    const int  *dim_array; +    int number_of_dims, iterationsNumb; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +          float *Input, *Output=NULL, lambdaROF, lambdaLLT, tau;      dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/NonlDiff_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/NonlDiff_GPU.cpp index bfba9ea..1cd0cdc 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/NonlDiff_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/NonlDiff_GPU.cpp @@ -46,8 +46,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter_numb, dimX, dimY, dimZ, penaltytype; -    const int  *dim_array; +    int number_of_dims, iter_numb, penaltytype; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +          float *Input, *Output=NULL, lambda, tau, sigma;      dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/ROF_TV_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/ROF_TV_GPU.cpp index f60ba7b..bd01d55 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/ROF_TV_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/ROF_TV_GPU.cpp @@ -42,8 +42,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter_numb, dimX, dimY, dimZ; -    const int  *dim_array; +    int number_of_dims, iter_numb; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +          float *Input, *Output=NULL, lambda, tau;      dim_array = mxGetDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/SB_TV_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/SB_TV_GPU.cpp index 60847d9..9d1328f 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/SB_TV_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/SB_TV_GPU.cpp @@ -42,8 +42,10 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY, dimZ, methTV, printswitch; -    const int  *dim_array; +    int number_of_dims, iter, methTV, printswitch; +    mwSize dimX, dimY, dimZ; +    const mwSize *dim_array; +          float *Input, *Output=NULL, lambda, epsil;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); diff --git a/Wrappers/Matlab/mex_compile/regularisers_GPU/TGV_GPU.cpp b/Wrappers/Matlab/mex_compile/regularisers_GPU/TGV_GPU.cpp index 5a0df5b..edb551d 100644 --- a/Wrappers/Matlab/mex_compile/regularisers_GPU/TGV_GPU.cpp +++ b/Wrappers/Matlab/mex_compile/regularisers_GPU/TGV_GPU.cpp @@ -43,8 +43,9 @@ void mexFunction(          int nrhs, const mxArray *prhs[])  { -    int number_of_dims, iter, dimX, dimY; -    const int  *dim_array; +    int number_of_dims, iter; +    mwSize dimX, dimY; +    const mwSize *dim_array;      float *Input, *Output=NULL, lambda, alpha0, alpha1, L2;      number_of_dims = mxGetNumberOfDimensions(prhs[0]); | 
