Daniil Kazantsev

Results 42 comments of Daniil Kazantsev

@paskino not sure what you mean exactly? C functions currently return either zero or a pointer to an array. What do you mean by `int`?

ok it makes sense. Will try to incorporate.

Thanks a lot @gfardell, I find this as a quite neat solution actually! The problem I'm currently having is how to process inputs in Cython. E.g. this function/wrapper ``` def...

Actually I think I know what I should do. I need to check what `regularisation_parameter` is before calling the function. ``` def TV_ROF_CPU(inputData, regularisation_parameter, iterationsNumb, marching_step_parameter,tolerance_param): if inputData.ndim == 2:...

probably not very neat but this is what I do: ``` def TV_ROF_CPU(inputData, regularisation_parameter, iterationsNumb, marching_step_parameter,tolerance_param): if inputData.ndim == 2: if regularisation_parameter.ndim == 2: return TV_ROF_2D_vecreg(inputData, regularisation_parameter, iterationsNumb, marching_step_parameter,tolerance_param) else:...

Thanks. I've got 2 errors: ``` return TV_ROF_2D(inputData, &regularisation_parameter[0,0], 1, iterationsNumb, marching_step_parameter,tolerance_param) src/cpu_regularisers.pyx:45:40: Cannot take address of Python object``` ``` and ``` return TV_ROF_2D(inputData, &lambdareg, 0, iterationsNumb, marching_step_parameter,tolerance_param) src/cpu_regularisers.pyx:48:40: Cannot...

thanks, we still get the `Cannot take address of Python object` error for `&regularisation_parameter[0,0]`

OK, as if by magic - all works! Thanks @gfardell and @paskino ! I'm already removing artifacts in reconstruction with that. Will adapt all the modules tmr and do PR....

I assume this means wrapping C/CUDA functions into C++ classes? Is it possible or one needs to change C syntax to C++ ?

makes sense. Happy to support this where I can.