Dear Thomas Morzadec,
Thanks for your message and for your interest in scikit-fmm.
The signed distance function is negative on the negative side of the
zero level set.
I am not sure what you mean when you say you only get 0 level sets?
Can you give an example and describe what the problem is?
Depending on how you know the initial shape of the interface there are
different ways to initialize the array phi. Internally, scikit-fmm
reconstructs phi with interpolation to determine the distance to the
initial interface. Currently this uses linear interpolation but I have
a branch which uses bi-cubic or tricubic interpolation to reconstruct
phi. See
https://github.com/scikit-fmm/scikit-fmm/tree/new-init
There is no Cython version of scikit-fmm but scikit-fmm is 90% written
in C++. By looking at the Python wrapper in the source code you should
be able to figure out how to call it directly from C. Although note
that the overhead from Python is small since all the calculation is
done in C++.
Thanks,
Jason
On Fri, Feb 16, 2018 at 9:54 AM, Thomas Morzadec
<
thomas....@inria.fr> wrote:
> Dear Sir,
>
> I am Thomas Morzadec, I am a post-doc at the French Lab INRIA.
>
> I try to use your method scikit-fmm in Python, but I have troubles: I only
> get zero level sets!
>
> Here is the way I give the "original shape": in the np.array Phi, I put 1
> every where, except at the pixels where the shape is, there I put -1 (The
> shape is a disconnected union of closed lines, one surrounding the others)
>
> I only get 0 level-sets doing so...
>
> I have two questions:
>
> Since I want a signed distance function, how could it know where is the
> interior, where is the exterior (since the boundary is not oriented)?
>
> Do you have a Cython version of the code, to use it via Cython, without
> using Python?
>
> Thank you for your help,
>
> Sincerely yours,
>
> Thomas
>
>