@JDWarner, actually, instead of iterating, setting one of the sampling dimensions to a very large number should produce the desired output, no? =)

On Tue, Jul 15, 2014 at 11:13 AM, Josh Warner <silvertrumpet999@gmail.com> wrote:

I don’t believe sampling works like this. The sampling= kwarg tells the algorithm the spacing of each pixel/voxel in each spatial dimension. It then calculates the distance transform. So if you put a zero in, it will traverse in that dimension with a distance cost of zero for each step. This will generate a result that has mostly spurious zero distances, rather than select a particular axis to calculate the distance transform along.

To calculate the correct distance function along a specific axis probably requires repeated calls along that axis; since scipy.ndimage is by definition n-dimensional it should be able to efficiently handle rank-1 arrays without issue.

I use the super handy Chrome extension “Markdown Here” to write in Markdown and then have my free entry fields converted to pretty HTML prior to posting. At this point I pretty much think in Markdown…


You received this message because you are subscribed to the Google Groups "scikit-image" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.